Changeset 35874 for trunk/src/wp-admin/includes/deprecated.php
- Timestamp:
- 12/11/2015 10:11:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/deprecated.php
r34822 r35874 1306 1306 _deprecated_function( __FUNCTION__, '3.9' ); 1307 1307 } 1308 1309 /** 1310 * Add a top-level menu page in the 'objects' section. 1311 * 1312 * This function takes a capability which will be used to determine whether 1313 * or not a page is included in the menu. 1314 * 1315 * The function which is hooked in to handle the output of the page must check 1316 * that the user has the required capability as well. 1317 * 1318 * @since 2.7.0 1319 * 1320 * @deprecated 4.5.0 Use add_menu_page() 1321 * @see add_menu_page() 1322 * @global int $_wp_last_object_menu 1323 * 1324 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1325 * @param string $menu_title The text to be used for the menu. 1326 * @param string $capability The capability required for this menu to be displayed to the user. 1327 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1328 * @param callable $function The function to be called to output the content for this page. 1329 * @param string $icon_url The url to the icon to be used for this menu. 1330 * @return string The resulting page's hook_suffix. 1331 */ 1332 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { 1333 _deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' ); 1334 1335 global $_wp_last_object_menu; 1336 1337 $_wp_last_object_menu++; 1338 1339 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu); 1340 } 1341 1342 /** 1343 * Add a top-level menu page in the 'utility' section. 1344 * 1345 * This function takes a capability which will be used to determine whether 1346 * or not a page is included in the menu. 1347 * 1348 * The function which is hooked in to handle the output of the page must check 1349 * that the user has the required capability as well. 1350 * 1351 * @since 2.7.0 1352 * 1353 * @deprecated 4.5.0 Use add_menu_page() 1354 * @see add_menu_page() 1355 * @global int $_wp_last_utility_menu 1356 * 1357 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. 1358 * @param string $menu_title The text to be used for the menu. 1359 * @param string $capability The capability required for this menu to be displayed to the user. 1360 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1361 * @param callable $function The function to be called to output the content for this page. 1362 * @param string $icon_url The url to the icon to be used for this menu. 1363 * @return string The resulting page's hook_suffix. 1364 */ 1365 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') { 1366 _deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' ); 1367 1368 global $_wp_last_utility_menu; 1369 1370 $_wp_last_utility_menu++; 1371 1372 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu); 1373 }
Note: See TracChangeset
for help on using the changeset viewer.