Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability. See #48303. Built from https://develop.svn.wordpress.org/trunk@47122 git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -60,7 +60,7 @@ if ( ! is_multisite() ) {
|
||||
|
||||
$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
|
||||
|
||||
// $menu[5] = Posts
|
||||
// $menu[5] = Posts.
|
||||
|
||||
$menu[10] = array( __( 'Media' ), 'upload_files', 'upload.php', '', 'menu-top menu-icon-media', 'menu-media', 'dashicons-admin-media' );
|
||||
$submenu['upload.php'][5] = array( __( 'Library' ), 'upload_files', 'upload.php' );
|
||||
@@ -82,7 +82,7 @@ $menu[15] = array( __( 'Links' ), 'manage_links', 'lin
|
||||
$submenu['link-manager.php'][10] = array( _x( 'Add New', 'link' ), 'manage_links', 'link-add.php' );
|
||||
$submenu['link-manager.php'][15] = array( __( 'Link Categories' ), 'manage_categories', 'edit-tags.php?taxonomy=link_category' );
|
||||
|
||||
// $menu[20] = Pages
|
||||
// $menu[20] = Pages.
|
||||
|
||||
// Avoid the comment count query for users who cannot edit_posts.
|
||||
if ( current_user_can( 'edit_posts' ) ) {
|
||||
@@ -107,7 +107,7 @@ if ( current_user_can( 'edit_posts' ) ) {
|
||||
|
||||
$submenu['edit-comments.php'][0] = array( __( 'All Comments' ), 'edit_posts', 'edit-comments.php' );
|
||||
|
||||
$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
|
||||
$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group.
|
||||
|
||||
$types = (array) get_post_types(
|
||||
array(
|
||||
@@ -139,7 +139,7 @@ foreach ( array_merge( $builtin, $types ) as $ptype ) {
|
||||
}
|
||||
|
||||
$menu_class = 'menu-top menu-icon-' . $ptype_for_id;
|
||||
// 'post' special case
|
||||
// 'post' special case.
|
||||
if ( 'post' === $ptype ) {
|
||||
$menu_class .= ' open-if-no-js';
|
||||
$ptype_file = 'edit.php';
|
||||
@@ -219,7 +219,7 @@ if ( ! is_multisite() ) {
|
||||
* @since 3.0.0
|
||||
*/
|
||||
function _add_themes_utility_last() {
|
||||
// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
|
||||
// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook.
|
||||
add_submenu_page( 'themes.php', __( 'Theme Editor' ), __( 'Theme Editor' ), 'edit_themes', 'theme-editor.php' );
|
||||
}
|
||||
|
||||
@@ -297,11 +297,11 @@ $menu[80] = array( __( 'Settings' ), 'manage_optio
|
||||
$submenu['options-general.php'][40] = array( __( 'Permalinks' ), 'manage_options', 'options-permalink.php' );
|
||||
$submenu['options-general.php'][45] = array( __( 'Privacy' ), 'manage_privacy_options', 'options-privacy.php' );
|
||||
|
||||
$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
|
||||
$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group.
|
||||
|
||||
$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' );
|
||||
|
||||
// Back-compat for old top-levels
|
||||
// Back-compat for old top-levels.
|
||||
$_wp_real_parent_file['post.php'] = 'edit.php';
|
||||
$_wp_real_parent_file['post-new.php'] = 'edit.php';
|
||||
$_wp_real_parent_file['edit-pages.php'] = 'edit.php?post_type=page';
|
||||
|
||||
Reference in New Issue
Block a user