Ticket #37770: wp-admin-includes-plugin-php.patch
File wp-admin-includes-plugin-php.patch, 4.6 KB (added by , 8 years ago) |
---|
-
wp-admin/includes/plugin.php
1494 1494 // 1495 1495 // Pluggable Menu Support -- Private 1496 1496 // 1497 1497 1498 /** 1499 * Get the admin page parent. 1498 1500 * 1499 1501 * @global string $parent_file 1500 * @global array $menu1501 * @global array $submenu1502 * @global array $menu 1503 * @global array $submenu 1502 1504 * @global string $pagenow 1503 1505 * @global string $typenow 1504 1506 * @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 1508 1514 */ 1509 1515 function get_admin_page_parent( $parent = '' ) { 1510 1516 global $parent_file, $menu, $submenu, $pagenow, $typenow, … … 1563 1569 } 1564 1570 1565 1571 /** 1572 * Get the admin page title. 1566 1573 * 1567 1574 * @global string $title 1568 * @global array $menu1569 * @global array $submenu1575 * @global array $menu 1576 * @global array $submenu 1570 1577 * @global string $pagenow 1571 1578 * @global string $plugin_page 1572 1579 * @global string $typenow 1580 * 1581 * @return string 1573 1582 */ 1574 1583 function get_admin_page_title() { 1575 1584 global $title, $menu, $submenu, $pagenow, $plugin_page, $typenow; … … 1643 1652 } 1644 1653 1645 1654 /** 1655 * Get the plugin page hook. 1656 * 1646 1657 * @since 2.3.0 1647 1658 * 1648 1659 * @param string $plugin_page 1649 1660 * @param string $parent_page 1661 * 1650 1662 * @return string|null 1651 1663 */ 1652 1664 function get_plugin_page_hook( $plugin_page, $parent_page ) { … … 1658 1670 } 1659 1671 1660 1672 /** 1673 * Get the plugin page hook name. 1661 1674 * 1662 1675 * @global array $admin_page_hooks 1676 * 1663 1677 * @param string $plugin_page 1664 1678 * @param string $parent_page 1679 * 1680 * @return string 1665 1681 */ 1666 1682 function get_plugin_page_hookname( $plugin_page, $parent_page ) { 1667 1683 global $admin_page_hooks; … … 1685 1701 } 1686 1702 1687 1703 /** 1704 * Whether the user can access admin page or not. 1688 1705 * 1689 1706 * @global string $pagenow 1690 * @global array $menu1691 * @global array $submenu1692 * @global array $_wp_menu_nopriv1693 * @global array $_wp_submenu_nopriv1707 * @global array $menu 1708 * @global array $submenu 1709 * @global array $_wp_menu_nopriv 1710 * @global array $_wp_submenu_nopriv 1694 1711 * @global string $plugin_page 1695 * @global array $_registered_pages 1712 * @global array $_registered_pages 1713 * 1714 * @return bool 1696 1715 */ 1697 1716 function user_can_access_admin_page() { 1698 1717 global $pagenow, $menu, $submenu, $_wp_menu_nopriv, $_wp_submenu_nopriv, … … 1771 1790 * 1772 1791 * @global array $new_whitelist_options 1773 1792 * 1774 * @param string $option_groupA 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_nameThe 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. 1777 1796 * @param callable $sanitize_callback A callback function that sanitizes the option's value. 1778 1797 */ 1779 1798 function register_setting( $option_group, $option_name, $sanitize_callback = '' ) { … … 1801 1820 * 1802 1821 * @global array $new_whitelist_options 1803 1822 * 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. 1807 1827 */ 1808 1828 function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) { 1809 1829 global $new_whitelist_options; … … 1927 1947 * 1928 1948 * @since 3.7.0 1929 1949 * 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. 1931 1951 */ 1932 1952 function wp_clean_plugins_cache( $clear_update_cache = true ) { 1933 1953 if ( $clear_update_cache ) … … 1936 1956 } 1937 1957 1938 1958 /** 1939 * @param string $plugin 1959 * Plugin sandbox scrape 1960 * 1961 * @param string $plugin Plugin path to main plugin file with plugin data. 1940 1962 */ 1941 1963 function plugin_sandbox_scrape( $plugin ) { 1942 1964 wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );