mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Notice fixes from jacobsantos. fixes #7255
git-svn-id: http://svn.automattic.com/wordpress/trunk@8266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
79913b557b
commit
4957f5a4cc
@ -470,18 +470,16 @@ function get_plugin_page_hookname( $plugin_page, $parent_page ) {
|
|||||||
|
|
||||||
$parent = get_admin_page_parent();
|
$parent = get_admin_page_parent();
|
||||||
|
|
||||||
|
$page_type = 'admin';
|
||||||
if ( empty ( $parent_page ) || 'admin.php' == $parent_page ) {
|
if ( empty ( $parent_page ) || 'admin.php' == $parent_page ) {
|
||||||
if ( isset( $admin_page_hooks[$plugin_page] ))
|
if ( isset( $admin_page_hooks[$plugin_page] ))
|
||||||
$page_type = 'toplevel';
|
$page_type = 'toplevel';
|
||||||
else
|
else
|
||||||
if ( isset( $admin_page_hooks[$parent] ))
|
if ( isset( $admin_page_hooks[$parent] ))
|
||||||
$page_type = $admin_page_hooks[$parent];
|
$page_type = $admin_page_hooks[$parent];
|
||||||
} else
|
} else if ( isset( $admin_page_hooks[$parent_page] ) ) {
|
||||||
if ( isset( $admin_page_hooks[$parent_page] ) ) {
|
$page_type = $admin_page_hooks[$parent_page];
|
||||||
$page_type = $admin_page_hooks[$parent_page];
|
}
|
||||||
} else {
|
|
||||||
$page_type = 'admin';
|
|
||||||
}
|
|
||||||
|
|
||||||
$plugin_name = preg_replace( '!\.php!', '', $plugin_page );
|
$plugin_name = preg_replace( '!\.php!', '', $plugin_page );
|
||||||
|
|
||||||
|
@ -2256,7 +2256,7 @@ function validate_file( $file, $allowed_files = '' ) {
|
|||||||
* @return bool True if SSL, false if not used.
|
* @return bool True if SSL, false if not used.
|
||||||
*/
|
*/
|
||||||
function is_ssl() {
|
function is_ssl() {
|
||||||
return ( 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user