WordPress.org

Make WordPress Core

Ticket #23108: 23108.patch

File 23108.patch, 5.7 KB (added by SergeyBiryukov, 16 months ago)
  • wp-admin/includes/deprecated.php

     
    10261026        _deprecated_function( __FUNCTION__, '3.5', 'image_resize' ); 
    10271027        return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) ); 
    10281028} 
     1029 
     1030/** 
     1031 * Add a top level menu page in the 'objects' section 
     1032 * 
     1033 * This function takes a capability which will be used to determine whether 
     1034 * or not a page is included in the menu. 
     1035 * 
     1036 * The function which is hooked in to handle the output of the page must check 
     1037 * that the user has the required capability as well. 
     1038 * 
     1039 * @since 2.7.0 
     1040 * @deprecated 3.6.0 
     1041 * @deprecated Use add_menu_page() 
     1042 * 
     1043 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 
     1044 * @param string $menu_title The text to be used for the menu 
     1045 * @param string $capability The capability required for this menu to be displayed to the user. 
     1046 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
     1047 * @param callback $function The function to be called to output the content for this page. 
     1048 * @param string $icon_url The url to the icon to be used for this menu 
     1049 * 
     1050 * @return string The resulting page's hook_suffix 
     1051 */ 
     1052function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '' ) { 
     1053        global $_wp_last_object_menu; 
     1054 
     1055        $_wp_last_object_menu++; 
     1056 
     1057        return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu); 
     1058} 
     1059 
     1060/** 
     1061 * Add a top level menu page in the 'utility' section 
     1062 * 
     1063 * This function takes a capability which will be used to determine whether 
     1064 * or not a page is included in the menu. 
     1065 * 
     1066 * The function which is hooked in to handle the output of the page must check 
     1067 * that the user has the required capability as well. 
     1068 * 
     1069 * @since 2.7.0 
     1070 * @deprecated 3.6.0 
     1071 * @deprecated Use add_menu_page() 
     1072 * 
     1073 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 
     1074 * @param string $menu_title The text to be used for the menu 
     1075 * @param string $capability The capability required for this menu to be displayed to the user. 
     1076 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
     1077 * @param callback $function The function to be called to output the content for this page. 
     1078 * @param string $icon_url The url to the icon to be used for this menu 
     1079 * 
     1080 * @return string The resulting page's hook_suffix 
     1081 */ 
     1082function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '' ) { 
     1083        global $_wp_last_utility_menu; 
     1084 
     1085        $_wp_last_utility_menu++; 
     1086 
     1087        return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu); 
     1088} 
  • wp-admin/includes/plugin.php

     
    926926} 
    927927 
    928928/** 
    929  * Add a top level menu page in the 'objects' section 
    930  * 
    931  * This function takes a capability which will be used to determine whether 
    932  * or not a page is included in the menu. 
    933  * 
    934  * The function which is hooked in to handle the output of the page must check 
    935  * that the user has the required capability as well. 
    936  * 
    937  * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 
    938  * @param string $menu_title The text to be used for the menu 
    939  * @param string $capability The capability required for this menu to be displayed to the user. 
    940  * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    941  * @param callback $function The function to be called to output the content for this page. 
    942  * @param string $icon_url The url to the icon to be used for this menu 
    943  * 
    944  * @return string The resulting page's hook_suffix 
    945  */ 
    946 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { 
    947         global $_wp_last_object_menu; 
    948  
    949         $_wp_last_object_menu++; 
    950  
    951         return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu); 
    952 } 
    953  
    954 /** 
    955  * Add a top level menu page in the 'utility' section 
    956  * 
    957  * This function takes a capability which will be used to determine whether 
    958  * or not a page is included in the menu. 
    959  * 
    960  * The function which is hooked in to handle the output of the page must check 
    961  * that the user has the required capability as well. 
    962  * 
    963  * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 
    964  * @param string $menu_title The text to be used for the menu 
    965  * @param string $capability The capability required for this menu to be displayed to the user. 
    966  * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 
    967  * @param callback $function The function to be called to output the content for this page. 
    968  * @param string $icon_url The url to the icon to be used for this menu 
    969  * 
    970  * @return string The resulting page's hook_suffix 
    971  */ 
    972 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { 
    973         global $_wp_last_utility_menu; 
    974  
    975         $_wp_last_utility_menu++; 
    976  
    977         return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu); 
    978 } 
    979  
    980 /** 
    981929 * Add a sub menu page 
    982930 * 
    983931 * This function takes a capability which will be used to determine whether