Make WordPress Core


Ignore:
Timestamp:
05/29/2015 02:05:26 AM (7 years ago)
Author:
wonderboymusic
Message:

Add @global annotations to (the rest of the?) wp-admin/* files.

Does not include list table file changes.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r32642 r32643  
    10051005 * that the user has the required capability as well.
    10061006 *
     1007 * @global array $menu
     1008 * @global array $admin_page_hooks
     1009 * @global array $_registered_pages
     1010 * @global array $_parent_pages
     1011 *
    10071012 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
    10081013 * @param string $menu_title The text to be used for the menu
     
    10631068 * that the user has the required capability as well.
    10641069 *
     1070 * @global int $_wp_last_object_menu
     1071 *
    10651072 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
    10661073 * @param string $menu_title The text to be used for the menu
     
    10891096 * that the user has the required capability as well.
    10901097 *
     1098 * @global int $_wp_last_utility_menu
     1099 *
    10911100 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
    10921101 * @param string $menu_title The text to be used for the menu
     
    11151124 * that the user has the required capability as well.
    11161125 *
     1126 * @global array $submenu
     1127 * @global array $menu
     1128 * @global type $_wp_real_parent_file
     1129 * @global bool $_wp_submenu_nopriv
     1130 * @global array $_registered_pages
     1131 * @global array $_parent_pages
     1132 *
    11171133 * @param string $parent_slug The slug name for the parent menu (or the file name of a standard WordPress admin page)
    11181134 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected
     
    11251141 */
    11261142function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ) {
    1127     global $submenu;
    1128     global $menu;
    1129     global $_wp_real_parent_file;
    1130     global $_wp_submenu_nopriv;
    1131     global $_registered_pages;
    1132     global $_parent_pages;
     1143    global $submenu, $menu, $_wp_real_parent_file, $_wp_submenu_nopriv,
     1144        $_registered_pages, $_parent_pages;
    11331145
    11341146    $menu_slug = plugin_basename( $menu_slug );
     
    14161428 * @since 3.1.0
    14171429 *
     1430 * @global array $menu
     1431 *
    14181432 * @param string $menu_slug The slug of the menu
    14191433 * @return array|bool The removed menu on success, False if not found
     
    14371451 * @since 3.1.0
    14381452 *
     1453 * @global array $submenu
     1454 *
    14391455 * @param string $menu_slug The slug for the parent menu
    14401456 * @param string $submenu_slug The slug of the submenu
     
    14631479 *
    14641480 * @since 3.0.0
     1481 *
     1482 * @global array $_parent_pages
    14651483 *
    14661484 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu)
     
    14931511// Pluggable Menu Support -- Private
    14941512//
    1495 
     1513/**
     1514 *
     1515 * @global string $parent_file
     1516 * @global array $menu
     1517 * @global array $submenu
     1518 * @global string $pagenow
     1519 * @global string $typenow
     1520 * @global string $plugin_page
     1521 * @global string $_wp_real_parent_file
     1522 * @global array $_wp_menu_nopriv
     1523 * @global array $_wp_submenu_nopriv
     1524 */
    14961525function get_admin_page_parent( $parent = '' ) {
    1497     global $parent_file;
    1498     global $menu;
    1499     global $submenu;
    1500     global $pagenow;
    1501     global $typenow;
    1502     global $plugin_page;
    1503     global $_wp_real_parent_file;
    1504     global $_wp_menu_nopriv;
    1505     global $_wp_submenu_nopriv;
     1526    global $parent_file, $menu, $submenu, $pagenow, $typenow,
     1527        $plugin_page, $_wp_real_parent_file, $_wp_menu_nopriv, $_wp_submenu_nopriv;
    15061528
    15071529    if ( !empty ( $parent ) && 'admin.php' != $parent ) {
     
    15571579}
    15581580
     1581/**
     1582 *
     1583 * @global string $title
     1584 * @global array $menu
     1585 * @global array $submenu
     1586 * @global string $pagenow
     1587 * @global string $plugin_page
     1588 * @global string $typenow
     1589 */
    15591590function get_admin_page_title() {
    1560     global $title;
    1561     global $menu;
    1562     global $submenu;
    1563     global $pagenow;
    1564     global $plugin_page;
    1565     global $typenow;
     1591    global $title, $menu, $submenu, $pagenow, $plugin_page, $typenow;
    15661592
    15671593    if ( ! empty ( $title ) )
     
    16411667}
    16421668
     1669/**
     1670 *
     1671 * @global array $admin_page_hooks
     1672 * @param string $plugin_page
     1673 * @param string $parent_page
     1674 */
    16431675function get_plugin_page_hookname( $plugin_page, $parent_page ) {
    16441676    global $admin_page_hooks;
     
    16621694}
    16631695
     1696/**
     1697 *
     1698 * @global string $pagenow
     1699 * @global array $menu
     1700 * @global array $submenu
     1701 * @global array $_wp_menu_nopriv
     1702 * @global array $_wp_submenu_nopriv
     1703 * @global string $plugin_page
     1704 * @global array $_registered_pages
     1705 */
    16641706function user_can_access_admin_page() {
    1665     global $pagenow;
    1666     global $menu;
    1667     global $submenu;
    1668     global $_wp_menu_nopriv;
    1669     global $_wp_submenu_nopriv;
    1670     global $plugin_page;
    1671     global $_registered_pages;
     1707    global $pagenow, $menu, $submenu, $_wp_menu_nopriv, $_wp_submenu_nopriv,
     1708        $plugin_page, $_registered_pages;
    16721709
    16731710    $parent = get_admin_page_parent();
     
    17421779 * @since 2.7.0
    17431780 *
     1781 * @global array $new_whitelist_options
     1782 *
    17441783 * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
    17451784 *  Default whitelisted option key names include "general," "discussion," and "reading," among others.
     
    17691808 *
    17701809 * @since 2.7.0
     1810 *
     1811 * @global array $new_whitelist_options
    17711812 *
    17721813 * @param string   $option_group
     
    17991840 * @since 2.7.0
    18001841 *
     1842 * @global array $new_whitelist_options
     1843 *
    18011844 * @param array $options
    18021845 * @return array
     
    18161859 *
    18171860 * @since 2.7.0
     1861 *
     1862 * @global array $whitelist_options
    18181863 *
    18191864 * @param array        $new_options
     
    18481893 * @since 2.7.0
    18491894 *
     1895 * @global array $whitelist_options
     1896 *
    18501897 * @param array        $del_options
    18511898 * @param string|array $options
Note: See TracChangeset for help on using the changeset viewer.