PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 <?php 2 3 // On which page are we ? 4 if ( is_admin() ) { 5 // wp-admin pages are checked more carefully 6 preg_match('#/wp-admin/?(.*?)$#i', $PHP_SELF, $self_matches); 7 $pagenow = $self_matches[1]; 8 $pagenow = preg_replace('#\?.*?$#', '', $pagenow); 9 if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) { 10 $pagenow = 'index.php'; 11 } else { 12 preg_match('#(.*?)(/|$)#', $pagenow, $self_matches); 13 $pagenow = strtolower($self_matches[1]); 14 if ( '.php' !== substr($pagenow, -4, 4) ) 15 $pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried) 16 } 17 } else { 18 if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $PHP_SELF, $self_matches) ) 19 $pagenow = strtolower($self_matches[1]); 20 else 21 $pagenow = 'index.php'; 22 } 23 24 // Simple browser detection 25 $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = false; 26 27 if (strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false) { 28 $is_lynx = true; 29 } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false) { 30 $is_gecko = true; 31 } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Win') !== false) { 32 $is_winIE = true; 33 } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false) { 34 $is_macIE = true; 35 } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false) { 36 $is_opera = true; 37 } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Nav') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/4.') !== false) { 38 $is_NS4 = true; 39 } 40 41 $is_IE = ( $is_macIE || $is_winIE ); 42 43 // Server detection 44 $is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false; 45 $is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true : false; 46 47 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |