X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..7f1521bf193b382565eb753043c161f4cb3fcda7:/wp-admin/includes/plugin.php diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index e2e37761..bb16117f 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -22,7 +22,7 @@ * Author URI: Link to the author's web site * Version: Must be set in the plugin for WordPress 2.3+ * Text Domain: Optional. Unique identifier, should be same as the one used in - * plugin_text_domain() + * load_plugin_textdomain() * Domain Path: Optional. Only useful if the translations are located in a * folder above the plugin's base path. For example, if .mo files are * located in the locale folder then Domain Path will be "/locale/" and @@ -805,9 +805,6 @@ function delete_plugins( $plugins, $deprecated = '' ) { $plugins_dir = trailingslashit( $plugins_dir ); - $translations_dir = $wp_filesystem->wp_lang_dir(); - $translations_dir = trailingslashit( $translations_dir ); - $plugin_translations = wp_get_installed_translations( 'plugins' ); $errors = array(); @@ -884,7 +881,7 @@ function validate_active_plugins() { } if ( empty( $plugins ) ) - return; + return array(); $invalid = array(); @@ -1542,11 +1539,10 @@ function get_admin_page_parent( $parent = '' ) { } elseif ( $submenu_array[2] == $pagenow && empty($typenow) && ( empty($parent_file) || false === strpos($parent_file, '?') ) ) { $parent_file = $parent; return $parent; - } else - if ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) { - $parent_file = $parent; - return $parent; - } + } elseif ( isset( $plugin_page ) && ($plugin_page == $submenu_array[2] ) ) { + $parent_file = $parent; + return $parent; + } } } @@ -1576,11 +1572,10 @@ function get_admin_page_title() { if ( $menu_array[2] == $pagenow ) { $title = $menu_array[3]; return $menu_array[3]; - } else - if ( isset( $plugin_page ) && ($plugin_page == $menu_array[2] ) && ($hook == $menu_array[3] ) ) { - $title = $menu_array[3]; - return $menu_array[3]; - } + } elseif ( isset( $plugin_page ) && ($plugin_page == $menu_array[2] ) && ($hook == $menu_array[3] ) ) { + $title = $menu_array[3]; + return $menu_array[3]; + } } else { $title = $menu_array[0]; return $title; @@ -1647,12 +1642,12 @@ function get_plugin_page_hookname( $plugin_page, $parent_page ) { $page_type = 'admin'; if ( empty ( $parent_page ) || 'admin.php' == $parent_page || isset( $admin_page_hooks[$plugin_page] ) ) { - if ( isset( $admin_page_hooks[$plugin_page] ) ) + if ( isset( $admin_page_hooks[$plugin_page] ) ) { $page_type = 'toplevel'; - else - if ( isset( $admin_page_hooks[$parent] )) - $page_type = $admin_page_hooks[$parent]; - } else if ( isset( $admin_page_hooks[$parent] ) ) { + } elseif ( isset( $admin_page_hooks[$parent] )) { + $page_type = $admin_page_hooks[$parent]; + } + } elseif ( isset( $admin_page_hooks[$parent] ) ) { $page_type = $admin_page_hooks[$parent]; } @@ -1713,7 +1708,7 @@ function user_can_access_admin_page() { return true; else return false; - } else if ( $submenu_array[2] == $pagenow ) { + } elseif ( $submenu_array[2] == $pagenow ) { if ( current_user_can( $submenu_array[1] )) return true; else