Ticket #23108: 23108.2.patch
File 23108.2.patch, 5.8 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/plugin.php
926 926 } 927 927 928 928 /** 929 * Add a top level menu page in the 'objects' section930 *931 * This function takes a capability which will be used to determine whether932 * 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 check935 * 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 selected938 * @param string $menu_title The text to be used for the menu939 * @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 menu943 *944 * @return string The resulting page's hook_suffix945 */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' section956 *957 * This function takes a capability which will be used to determine whether958 * 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 check961 * 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 selected964 * @param string $menu_title The text to be used for the menu965 * @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 menu969 *970 * @return string The resulting page's hook_suffix971 */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 /**981 929 * Add a sub menu page 982 930 * 983 931 * This function takes a capability which will be used to determine whether -
wp-admin/includes/deprecated.php
1026 1026 _deprecated_function( __FUNCTION__, '3.5', 'image_resize' ); 1027 1027 return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) ); 1028 1028 } 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 */ 1052 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '' ) { 1053 _deprecated_function( __FUNCTION__, '3.6', 'add_menu_page()' ); 1054 1055 global $_wp_last_object_menu; 1056 1057 $_wp_last_object_menu++; 1058 1059 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu); 1060 } 1061 1062 /** 1063 * Add a top level menu page in the 'utility' section 1064 * 1065 * This function takes a capability which will be used to determine whether 1066 * or not a page is included in the menu. 1067 * 1068 * The function which is hooked in to handle the output of the page must check 1069 * that the user has the required capability as well. 1070 * 1071 * @since 2.7.0 1072 * @deprecated 3.6.0 1073 * @deprecated Use add_menu_page() 1074 * 1075 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 1076 * @param string $menu_title The text to be used for the menu 1077 * @param string $capability The capability required for this menu to be displayed to the user. 1078 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu) 1079 * @param callback $function The function to be called to output the content for this page. 1080 * @param string $icon_url The url to the icon to be used for this menu 1081 * 1082 * @return string The resulting page's hook_suffix 1083 */ 1084 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '' ) { 1085 _deprecated_function( __FUNCTION__, '3.6', 'add_menu_page()' ); 1086 1087 global $_wp_last_utility_menu; 1088 1089 $_wp_last_utility_menu++; 1090 1091 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu); 1092 }