変数 $pagenow
定義ファイル :/blog/wp-includes/version.php
呼び出し元 :/blog/wp-includes/version.php
最初にまとめてグローバル宣言し、関数化されず、このファイル(version.php)につらつら上から順番に書かれています。
$pagenow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | // On which page are we ? if ( is_admin() ) { // wp-admin pages are checked more carefully if ( is_network_admin() ) preg_match('#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches); elseif ( is_user_admin() ) preg_match('#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches); else preg_match('#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches); $pagenow = $self_matches[1]; $pagenow = trim($pagenow, '/'); $pagenow = preg_replace('#\?.*?$#', '', $pagenow); if ( '' === $pagenow || 'index' === $pagenow || 'index.php' === $pagenow ) { $pagenow = 'index.php'; } else { preg_match('#(.*?)(/|$)#', $pagenow, $self_matches); $pagenow = strtolower($self_matches[1]); if ( '.php' !== substr($pagenow, -4, 4) ) $pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried) } } else { if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $_SERVER['PHP_SELF'], $self_matches) ) $pagenow = strtolower($self_matches[1]); else $pagenow = 'index.php'; } unset($self_matches); |