Changeset 53184
- Timestamp:
- 04/14/2022 03:24:09 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/deprecated.php
r52406 r53184 78 78 * @global int $post_ID 79 79 * 80 * @param int $defaultUnused.81 * @param int $parentUnused.82 * @param array $popular_ids Unused.83 */ 84 function dropdown_categories( $default = 0, $parent= 0, $popular_ids = array() ) {80 * @param int $default_category Unused. 81 * @param int $parent_category Unused. 82 * @param array $popular_ids Unused. 83 */ 84 function dropdown_categories( $default_category = 0, $parent_category = 0, $popular_ids = array() ) { 85 85 _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' ); 86 86 global $post_ID; … … 97 97 * @global int $link_id 98 98 * 99 * @param int $default Unused.100 */ 101 function dropdown_link_categories( $default = 0 ) {99 * @param int $default_link_category Unused. 100 */ 101 function dropdown_link_categories( $default_link_category = 0 ) { 102 102 _deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' ); 103 103 global $link_id; … … 128 128 * @see wp_dropdown_categories() 129 129 * 130 * @param int $current cat Optional. ID of the current category. Default 0.131 * @param int $current parent Optional. Current parent category ID. Default 0.132 * @param int $parent 133 * @param int $level Optional. Number of levels deep to display. Default 0.134 * @param array $categories Optional. Categories to include in the control. Default 0.130 * @param int $current_cat Optional. ID of the current category. Default 0. 131 * @param int $current_parent Optional. Current parent category ID. Default 0. 132 * @param int $parent_cat Optional. Parent ID to retrieve categories for. Default 0. 133 * @param int $level Optional. Number of levels deep to display. Default 0. 134 * @param array $categories Optional. Categories to include in the control. Default 0. 135 135 * @return void|false Void on success, false if no categories were found. 136 136 */ 137 function wp_dropdown_cats( $current cat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {137 function wp_dropdown_cats( $current_cat = 0, $current_parent = 0, $parent_cat = 0, $level = 0, $categories = 0 ) { 138 138 _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' ); 139 139 if (!$categories ) … … 142 142 if ( $categories ) { 143 143 foreach ( $categories as $category ) { 144 if ( $current cat != $category->term_id && $parent == $category->parent) {144 if ( $current_cat != $category->term_id && $parent_cat == $category->parent) { 145 145 $pad = str_repeat( '– ', $level ); 146 146 $category->name = esc_html( $category->name ); 147 147 echo "\n\t<option value='$category->term_id'"; 148 if ( $current parent == $category->term_id )148 if ( $current_parent == $category->term_id ) 149 149 echo " selected='selected'"; 150 150 echo ">$pad$category->name</option>"; 151 wp_dropdown_cats( $current cat, $currentparent, $category->term_id, $level +1, $categories );151 wp_dropdown_cats( $current_cat, $current_parent, $category->term_id, $level +1, $categories ); 152 152 } 153 153 } … … 1427 1427 * @param string $capability The capability required for this menu to be displayed to the user. 1428 1428 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1429 * @param callable $ functionOptional. The function to be called to output the content for this page.1429 * @param callable $callback Optional. The function to be called to output the content for this page. 1430 1430 * @param string $icon_url Optional. The URL to the icon to be used for this menu. 1431 1431 * @return string The resulting page's hook_suffix. 1432 1432 */ 1433 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $ function= '', $icon_url = '') {1433 function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '') { 1434 1434 _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' ); 1435 1435 … … 1438 1438 $_wp_last_object_menu++; 1439 1439 1440 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $ function, $icon_url, $_wp_last_object_menu);1440 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $_wp_last_object_menu); 1441 1441 } 1442 1442 … … 1460 1460 * @param string $capability The capability required for this menu to be displayed to the user. 1461 1461 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). 1462 * @param callable $ functionOptional. The function to be called to output the content for this page.1462 * @param callable $callback Optional. The function to be called to output the content for this page. 1463 1463 * @param string $icon_url Optional. The URL to the icon to be used for this menu. 1464 1464 * @return string The resulting page's hook_suffix. 1465 1465 */ 1466 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $ function= '', $icon_url = '') {1466 function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '') { 1467 1467 _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' ); 1468 1468 … … 1471 1471 $_wp_last_utility_menu++; 1472 1472 1473 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $ function, $icon_url, $_wp_last_utility_menu);1473 return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $_wp_last_utility_menu); 1474 1474 } 1475 1475
Note: See TracChangeset
for help on using the changeset viewer.