mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-17 23:30:22 +00:00
Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability. See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -69,7 +69,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
global $self, $parent_file, $submenu_file, $plugin_page, $typenow;
|
||||
|
||||
$first = true;
|
||||
// 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes, 5 = hookname, 6 = icon_url
|
||||
// 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes, 5 = hookname, 6 = icon_url.
|
||||
foreach ( $menu as $key => $item ) {
|
||||
$admin_is_parent = false;
|
||||
$class = array();
|
||||
@@ -184,7 +184,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
|
||||
$first = true;
|
||||
|
||||
// 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes
|
||||
// 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes.
|
||||
foreach ( $submenu_items as $sub_key => $sub_item ) {
|
||||
if ( ! current_user_can( $sub_item[1] ) ) {
|
||||
continue;
|
||||
@@ -238,7 +238,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
||||
$title = wptexturize( $sub_item[0] );
|
||||
|
||||
if ( ! empty( $menu_hook ) || ( ( 'index.php' != $sub_item[2] ) && file_exists( WP_PLUGIN_DIR . "/$sub_file" ) && ! file_exists( ABSPATH . "/wp-admin/$sub_file" ) ) ) {
|
||||
// If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
|
||||
// If admin.php is the current page or if the parent exists as a file in the plugins or admin directory.
|
||||
if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) ) {
|
||||
$sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), $item[2] );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user