~canonical-sysadmins/wordpress/4.8.3

« back to all changes in this revision

Viewing changes to wp-admin/menu-header.php

  • Committer: Ryan Finnie
  • Date: 2015-08-31 16:09:47 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: ryan.finnie@canonical.com-20150831160947-1h6rfxby9z1ec62u
Merge WP4.3 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 * The current page.
11
11
 *
12
12
 * @global string $self
13
 
 * @name $self
14
 
 * @var string
15
13
 */
16
14
$self = preg_replace('|^.*/wp-admin/network/|i', '', $_SERVER['PHP_SELF']);
17
15
$self = preg_replace('|^.*/wp-admin/|i', '', $self);
18
16
$self = preg_replace('|^.*/plugins/|i', '', $self);
19
17
$self = preg_replace('|^.*/mu-plugins/|i', '', $self);
20
18
 
21
 
global $menu, $submenu, $parent_file; //For when admin-header is included from within a function.
 
19
/**
 
20
 * For when admin-header is included from within a function.
 
21
 *
 
22
 * @global array  $menu
 
23
 * @global array  $submenu
 
24
 * @global string $parent_file
 
25
 */
 
26
global $menu, $submenu, $parent_file;
22
27
 
23
28
/**
24
29
 * Filter the parent file of an admin menu sub-menu item.
39
44
 * @access private
40
45
 * @since 2.7.0
41
46
 *
 
47
 * @global string $self
 
48
 * @global string $parent_file
 
49
 * @global string $submenu_file
 
50
 * @global string $plugin_page
 
51
 * @global string $typenow
 
52
 *
42
53
 * @param array $menu
43
54
 * @param array $submenu
44
 
 * @param bool $submenu_as_parent
 
55
 * @param bool  $submenu_as_parent
45
56
 */
46
57
function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
47
58
        global $self, $parent_file, $submenu_file, $plugin_page, $typenow;
146
157
 
147
158
                if ( ! empty( $submenu_items ) ) {
148
159
                        echo "\n\t<ul class='wp-submenu wp-submenu-wrap'>";
149
 
                        echo "<li class='wp-submenu-head'>{$item[0]}</li>";
 
160
                        echo "<li class='wp-submenu-head' aria-hidden='true'>{$item[0]}</li>";
150
161
 
151
162
                        $first = true;
152
163