Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/menu-header.php

    r45583 r47122  
    7070
    7171    $first = true;
    72     // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes, 5 = hookname, 6 = icon_url
     72    // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes, 5 = hookname, 6 = icon_url.
    7373    foreach ( $menu as $key => $item ) {
    7474        $admin_is_parent = false;
     
    185185            $first = true;
    186186
    187             // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes
     187            // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = page_title, 4 = classes.
    188188            foreach ( $submenu_items as $sub_key => $sub_item ) {
    189189                if ( ! current_user_can( $sub_item[1] ) ) {
     
    239239
    240240                if ( ! empty( $menu_hook ) || ( ( 'index.php' != $sub_item[2] ) && file_exists( WP_PLUGIN_DIR . "/$sub_file" ) && ! file_exists( ABSPATH . "/wp-admin/$sub_file" ) ) ) {
    241                     // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
     241                    // If admin.php is the current page or if the parent exists as a file in the plugins or admin directory.
    242242                    if ( ( ! $admin_is_parent && file_exists( WP_PLUGIN_DIR . "/$menu_file" ) && ! is_dir( WP_PLUGIN_DIR . "/{$item[2]}" ) ) || file_exists( $menu_file ) ) {
    243243                        $sub_item_url = add_query_arg( array( 'page' => $sub_item[2] ), $item[2] );
Note: See TracChangeset for help on using the changeset viewer.