mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-02 01:20:03 +00:00
Fix syntax for single- and multi-line comments in wp-admin-directory files.
See #28931. git-svn-id: https://develop.svn.wordpress.org/trunk@29206 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -851,7 +851,7 @@ function delete_plugins( $plugins, $deprecated = '' ) {
|
||||
*/
|
||||
function validate_active_plugins() {
|
||||
$plugins = get_option( 'active_plugins', array() );
|
||||
// validate vartype: array
|
||||
// Validate vartype: array.
|
||||
if ( ! is_array( $plugins ) ) {
|
||||
update_option( 'active_plugins', array() );
|
||||
$plugins = array();
|
||||
@@ -867,7 +867,7 @@ function validate_active_plugins() {
|
||||
|
||||
$invalid = array();
|
||||
|
||||
// invalid plugins get deactivated
|
||||
// Invalid plugins get deactivated.
|
||||
foreach ( $plugins as $plugin ) {
|
||||
$result = validate_plugin( $plugin );
|
||||
if ( is_wp_error( $result ) ) {
|
||||
@@ -1119,10 +1119,12 @@ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability,
|
||||
return false;
|
||||
}
|
||||
|
||||
// If the parent doesn't already have a submenu, add a link to the parent
|
||||
// as the first item in the submenu. If the submenu file is the same as the
|
||||
// parent file someone is trying to link back to the parent manually. In
|
||||
// this case, don't automatically add a link back to avoid duplication.
|
||||
/*
|
||||
* If the parent doesn't already have a submenu, add a link to the parent
|
||||
* as the first item in the submenu. If the submenu file is the same as the
|
||||
* parent file someone is trying to link back to the parent manually. In
|
||||
* this case, don't automatically add a link back to avoid duplication.
|
||||
*/
|
||||
if (!isset( $submenu[$parent_slug] ) && $menu_slug != $parent_slug ) {
|
||||
foreach ( (array)$menu as $parent_menu ) {
|
||||
if ( $parent_menu[2] == $parent_slug && current_user_can( $parent_menu[1] ) )
|
||||
@@ -1137,11 +1139,15 @@ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability,
|
||||
add_action( $hookname, $function );
|
||||
|
||||
$_registered_pages[$hookname] = true;
|
||||
// backwards-compatibility for plugins using add_management page. See wp-admin/admin.php for redirect from edit.php to tools.php
|
||||
|
||||
/*
|
||||
* Backward-compatibility for plugins using add_management page.
|
||||
* See wp-admin/admin.php for redirect from edit.php to tools.php
|
||||
*/
|
||||
if ( 'tools.php' == $parent_slug )
|
||||
$_registered_pages[get_plugin_page_hookname( $menu_slug, 'edit.php')] = true;
|
||||
|
||||
// No parent as top level
|
||||
// No parent as top level.
|
||||
$_parent_pages[$menu_slug] = $parent_slug;
|
||||
|
||||
return $hookname;
|
||||
|
||||
Reference in New Issue
Block a user