Make WordPress Core

Ticket #37770: wp-admin-includes-plugin-php.patch

File wp-admin-includes-plugin-php.patch, 4.6 KB (added by ramiy, 8 years ago)

Docs in wp-admin/includes/plugin.php

  • wp-admin/includes/plugin.php

     
    14941494//
    14951495// Pluggable Menu Support -- Private
    14961496//
     1497
    14971498/**
     1499 * Get the admin page parent.
    14981500 *
    14991501 * @global string $parent_file
    1500  * @global array $menu
    1501  * @global array $submenu
     1502 * @global array  $menu
     1503 * @global array  $submenu
    15021504 * @global string $pagenow
    15031505 * @global string $typenow
    15041506 * @global string $plugin_page
    1505  * @global array $_wp_real_parent_file
    1506  * @global array $_wp_menu_nopriv
    1507  * @global array $_wp_submenu_nopriv
     1507 * @global array  $_wp_real_parent_file
     1508 * @global array  $_wp_menu_nopriv
     1509 * @global array  $_wp_submenu_nopriv
     1510 *
     1511 * @param  string $parent
     1512 *
     1513 * @return string
    15081514 */
    15091515function get_admin_page_parent( $parent = '' ) {
    15101516        global $parent_file, $menu, $submenu, $pagenow, $typenow,
     
    15631569}
    15641570
    15651571/**
     1572 * Get the admin page title.
    15661573 *
    15671574 * @global string $title
    1568  * @global array $menu
    1569  * @global array $submenu
     1575 * @global array  $menu
     1576 * @global array  $submenu
    15701577 * @global string $pagenow
    15711578 * @global string $plugin_page
    15721579 * @global string $typenow
     1580 *
     1581 * @return string
    15731582 */
    15741583function get_admin_page_title() {
    15751584        global $title, $menu, $submenu, $pagenow, $plugin_page, $typenow;
     
    16431652}
    16441653
    16451654/**
     1655 * Get the plugin page hook.
     1656 *
    16461657 * @since 2.3.0
    16471658 *
    16481659 * @param string $plugin_page
    16491660 * @param string $parent_page
     1661 *
    16501662 * @return string|null
    16511663 */
    16521664function get_plugin_page_hook( $plugin_page, $parent_page ) {
     
    16581670}
    16591671
    16601672/**
     1673 * Get the plugin page hook name.
    16611674 *
    16621675 * @global array $admin_page_hooks
     1676 *
    16631677 * @param string $plugin_page
    16641678 * @param string $parent_page
     1679 *
     1680 * @return string
    16651681 */
    16661682function get_plugin_page_hookname( $plugin_page, $parent_page ) {
    16671683        global $admin_page_hooks;
     
    16851701}
    16861702
    16871703/**
     1704 * Whether the user can access admin page or not.
    16881705 *
    16891706 * @global string $pagenow
    1690  * @global array $menu
    1691  * @global array $submenu
    1692  * @global array $_wp_menu_nopriv
    1693  * @global array $_wp_submenu_nopriv
     1707 * @global array  $menu
     1708 * @global array  $submenu
     1709 * @global array  $_wp_menu_nopriv
     1710 * @global array  $_wp_submenu_nopriv
    16941711 * @global string $plugin_page
    1695  * @global array $_registered_pages
     1712 * @global array  $_registered_pages
     1713 *
     1714 * @return bool
    16961715 */
    16971716function user_can_access_admin_page() {
    16981717        global $pagenow, $menu, $submenu, $_wp_menu_nopriv, $_wp_submenu_nopriv,
     
    17711790 *
    17721791 * @global array $new_whitelist_options
    17731792 *
    1774  * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
    1775  *      Default whitelisted option key names include "general," "discussion," and "reading," among others.
    1776  * @param string $option_name The name of an option to sanitize and save.
     1793 * @param string   $option_group      A settings group name. Should correspond to a whitelisted option key name.
     1794 *                                        Default whitelisted option key names include "general," "discussion," and "reading," among others.
     1795 * @param string   $option_name      The name of an option to sanitize and save.
    17771796 * @param callable $sanitize_callback A callback function that sanitizes the option's value.
    17781797 */
    17791798function register_setting( $option_group, $option_name, $sanitize_callback = '' ) {
     
    18011820 *
    18021821 * @global array $new_whitelist_options
    18031822 *
    1804  * @param string   $option_group
    1805  * @param string   $option_name
    1806  * @param callable $sanitize_callback
     1823 * @param string   $option_group      A settings group name. Should correspond to a whitelisted option key name.
     1824 *                                        Default whitelisted option key names include "general," "discussion," and "reading," among others.
     1825 * @param string   $option_name       The name of an option to sanitize and save.
     1826 * @param callable $sanitize_callback A callback function that sanitizes the option's value.
    18071827 */
    18081828function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) {
    18091829        global $new_whitelist_options;
     
    19271947 *
    19281948 * @since 3.7.0
    19291949 *
    1930  * @param bool $clear_update_cache Whether to clear the Plugin updates cache
     1950 * @param bool $clear_update_cache Whether to clear the Plugin updates cache.
    19311951 */
    19321952function wp_clean_plugins_cache( $clear_update_cache = true ) {
    19331953        if ( $clear_update_cache )
     
    19361956}
    19371957
    19381958/**
    1939  * @param string $plugin
     1959 * Plugin sandbox scrape
     1960 *
     1961 * @param string $plugin Plugin path to main plugin file with plugin data.
    19401962 */
    19411963function plugin_sandbox_scrape( $plugin ) {
    19421964        wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );