75 * @deprecated 2.6.0 Use wp_category_checklist() |
75 * @deprecated 2.6.0 Use wp_category_checklist() |
76 * @see wp_category_checklist() |
76 * @see wp_category_checklist() |
77 * |
77 * |
78 * @global int $post_ID |
78 * @global int $post_ID |
79 * |
79 * |
80 * @param int $default Unused. |
80 * @param int $default_category Unused. |
81 * @param int $parent Unused. |
81 * @param int $category_parent Unused. |
82 * @param array $popular_ids Unused. |
82 * @param array $popular_ids Unused. |
83 */ |
83 */ |
84 function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) { |
84 function dropdown_categories( $default_category = 0, $category_parent = 0, $popular_ids = array() ) { |
85 _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' ); |
85 _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' ); |
86 global $post_ID; |
86 global $post_ID; |
87 wp_category_checklist( $post_ID ); |
87 wp_category_checklist( $post_ID ); |
88 } |
88 } |
89 |
89 |
94 * @deprecated 2.6.0 Use wp_link_category_checklist() |
94 * @deprecated 2.6.0 Use wp_link_category_checklist() |
95 * @see wp_link_category_checklist() |
95 * @see wp_link_category_checklist() |
96 * |
96 * |
97 * @global int $link_id |
97 * @global int $link_id |
98 * |
98 * |
99 * @param int $default Unused. |
99 * @param int $default_link_category Unused. |
100 */ |
100 */ |
101 function dropdown_link_categories( $default = 0 ) { |
101 function dropdown_link_categories( $default_link_category = 0 ) { |
102 _deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' ); |
102 _deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' ); |
103 global $link_id; |
103 global $link_id; |
104 wp_link_category_checklist( $link_id ); |
104 wp_link_category_checklist( $link_id ); |
105 } |
105 } |
106 |
106 |
125 * |
125 * |
126 * @since 1.2.0 |
126 * @since 1.2.0 |
127 * @deprecated 3.0.0 Use wp_dropdown_categories() |
127 * @deprecated 3.0.0 Use wp_dropdown_categories() |
128 * @see wp_dropdown_categories() |
128 * @see wp_dropdown_categories() |
129 * |
129 * |
130 * @param int $currentcat Optional. ID of the current category. Default 0. |
130 * @param int $current_cat Optional. ID of the current category. Default 0. |
131 * @param int $currentparent Optional. Current parent category ID. Default 0. |
131 * @param int $current_parent Optional. Current parent category ID. Default 0. |
132 * @param int $parent Optional. Parent ID to retrieve categories for. Default 0. |
132 * @param int $category_parent Optional. Parent ID to retrieve categories for. Default 0. |
133 * @param int $level Optional. Number of levels deep to display. 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. |
134 * @param array $categories Optional. Categories to include in the control. Default 0. |
135 * @return void|false Void on success, false if no categories were found. |
135 * @return void|false Void on success, false if no categories were found. |
136 */ |
136 */ |
137 function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) { |
137 function wp_dropdown_cats( $current_cat = 0, $current_parent = 0, $category_parent = 0, $level = 0, $categories = 0 ) { |
138 _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' ); |
138 _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' ); |
139 if (!$categories ) |
139 if (!$categories ) |
140 $categories = get_categories( array('hide_empty' => 0) ); |
140 $categories = get_categories( array('hide_empty' => 0) ); |
141 |
141 |
142 if ( $categories ) { |
142 if ( $categories ) { |
143 foreach ( $categories as $category ) { |
143 foreach ( $categories as $category ) { |
144 if ( $currentcat != $category->term_id && $parent == $category->parent) { |
144 if ( $current_cat != $category->term_id && $category_parent == $category->parent) { |
145 $pad = str_repeat( '– ', $level ); |
145 $pad = str_repeat( '– ', $level ); |
146 $category->name = esc_html( $category->name ); |
146 $category->name = esc_html( $category->name ); |
147 echo "\n\t<option value='$category->term_id'"; |
147 echo "\n\t<option value='$category->term_id'"; |
148 if ( $currentparent == $category->term_id ) |
148 if ( $current_parent == $category->term_id ) |
149 echo " selected='selected'"; |
149 echo " selected='selected'"; |
150 echo ">$pad$category->name</option>"; |
150 echo ">$pad$category->name</option>"; |
151 wp_dropdown_cats( $currentcat, $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 } |
154 } else { |
154 } else { |
155 return false; |
155 return false; |
156 } |
156 } |
161 * |
161 * |
162 * @since 2.7.0 |
162 * @since 2.7.0 |
163 * @deprecated 3.0.0 Use register_setting() |
163 * @deprecated 3.0.0 Use register_setting() |
164 * @see register_setting() |
164 * @see register_setting() |
165 * |
165 * |
166 * @param string $option_group A settings group name. Should correspond to an allowed option key name. |
166 * @param string $option_group A settings group name. Should correspond to an allowed option key name. |
167 * Default allowed option key names include 'general', 'discussion', 'media', |
167 * Default allowed option key names include 'general', 'discussion', 'media', |
168 * 'reading', 'writing', 'misc', 'options', and 'privacy'. |
168 * 'reading', 'writing', and 'options'. |
169 * @param string $option_name The name of an option to sanitize and save. |
169 * @param string $option_name The name of an option to sanitize and save. |
170 * @param callable $sanitize_callback A callback function that sanitizes the option's value. |
170 * @param callable $sanitize_callback Optional. A callback function that sanitizes the option's value. |
171 */ |
171 */ |
172 function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { |
172 function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { |
173 _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' ); |
173 _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' ); |
174 register_setting( $option_group, $option_name, $sanitize_callback ); |
174 register_setting( $option_group, $option_name, $sanitize_callback ); |
175 } |
175 } |
179 * |
179 * |
180 * @since 2.7.0 |
180 * @since 2.7.0 |
181 * @deprecated 3.0.0 Use unregister_setting() |
181 * @deprecated 3.0.0 Use unregister_setting() |
182 * @see unregister_setting() |
182 * @see unregister_setting() |
183 * |
183 * |
184 * @param string $option_group |
184 * @param string $option_group The settings group name used during registration. |
185 * @param string $option_name |
185 * @param string $option_name The name of the option to unregister. |
186 * @param callable $sanitize_callback |
186 * @param callable $sanitize_callback Optional. Deprecated. |
187 */ |
187 */ |
188 function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { |
188 function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { |
189 _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' ); |
189 _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' ); |
190 unregister_setting( $option_group, $option_name, $sanitize_callback ); |
190 unregister_setting( $option_group, $option_name, $sanitize_callback ); |
191 } |
191 } |
1424 * |
1424 * |
1425 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. |
1425 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. |
1426 * @param string $menu_title The text to be used for the menu. |
1426 * @param string $menu_title The text to be used for the menu. |
1427 * @param string $capability The capability required for this menu to be displayed to the user. |
1427 * @param string $capability The capability required for this menu to be displayed to the user. |
1428 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). |
1428 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). |
1429 * @param callable $function 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 * @param string $icon_url The url to the icon to be used for this menu. |
1430 * @param string $icon_url Optional. The URL to the icon to be used for this menu. |
1431 * @return string The resulting page's hook_suffix. |
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 _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' ); |
1434 _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' ); |
1435 |
1435 |
1436 global $_wp_last_object_menu; |
1436 global $_wp_last_object_menu; |
1437 |
1437 |
1438 $_wp_last_object_menu++; |
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 |
1443 /** |
1443 /** |
1444 * Add a top-level menu page in the 'utility' section. |
1444 * Add a top-level menu page in the 'utility' section. |
1445 * |
1445 * |
1457 * |
1457 * |
1458 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. |
1458 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected. |
1459 * @param string $menu_title The text to be used for the menu. |
1459 * @param string $menu_title The text to be used for the menu. |
1460 * @param string $capability The capability required for this menu to be displayed to the user. |
1460 * @param string $capability The capability required for this menu to be displayed to the user. |
1461 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). |
1461 * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu). |
1462 * @param callable $function 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 * @param string $icon_url The url to the icon to be used for this menu. |
1463 * @param string $icon_url Optional. The URL to the icon to be used for this menu. |
1464 * @return string The resulting page's hook_suffix. |
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 _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' ); |
1467 _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' ); |
1468 |
1468 |
1469 global $_wp_last_utility_menu; |
1469 global $_wp_last_utility_menu; |
1470 |
1470 |
1471 $_wp_last_utility_menu++; |
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 |
1476 /** |
1476 /** |
1477 * Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers, |
1477 * Disables autocomplete on the 'post' form (Add/Edit Post screens) for WebKit browsers, |
1478 * as they disregard the autocomplete setting on the editor textarea. That can break the editor |
1478 * as they disregard the autocomplete setting on the editor textarea. That can break the editor |
1505 * @deprecated 4.9.0 |
1505 * @deprecated 4.9.0 |
1506 */ |
1506 */ |
1507 function options_permalink_add_js() { |
1507 function options_permalink_add_js() { |
1508 ?> |
1508 ?> |
1509 <script type="text/javascript"> |
1509 <script type="text/javascript"> |
1510 jQuery(document).ready(function() { |
1510 jQuery( function() { |
1511 jQuery('.permalink-structure input:radio').change(function() { |
1511 jQuery('.permalink-structure input:radio').change(function() { |
1512 if ( 'custom' == this.value ) |
1512 if ( 'custom' == this.value ) |
1513 return; |
1513 return; |
1514 jQuery('#permalink_structure').val( this.value ); |
1514 jQuery('#permalink_structure').val( this.value ); |
1515 }); |
1515 }); |
1516 jQuery( '#permalink_structure' ).on( 'click input', function() { |
1516 jQuery( '#permalink_structure' ).on( 'click input', function() { |
1517 jQuery( '#custom_selection' ).prop( 'checked', true ); |
1517 jQuery( '#custom_selection' ).prop( 'checked', true ); |
1518 }); |
1518 }); |
1519 }); |
1519 } ); |
1520 </script> |
1520 </script> |
1521 <?php |
1521 <?php |
1522 } |
1522 } |
1523 |
1523 |
1524 /** |
1524 /** |
1565 * @deprecated 5.3.0 |
1565 * @deprecated 5.3.0 |
1566 */ |
1566 */ |
1567 function _wp_privacy_requests_screen_options() { |
1567 function _wp_privacy_requests_screen_options() { |
1568 _deprecated_function( __FUNCTION__, '5.3.0' ); |
1568 _deprecated_function( __FUNCTION__, '5.3.0' ); |
1569 } |
1569 } |
|
1570 |
|
1571 /** |
|
1572 * Was used to filter input from media_upload_form_handler() and to assign a default |
|
1573 * post_title from the file name if none supplied. |
|
1574 * |
|
1575 * @since 2.5.0 |
|
1576 * @deprecated 6.0.0 |
|
1577 * |
|
1578 * @param array $post The WP_Post attachment object converted to an array. |
|
1579 * @param array $attachment An array of attachment metadata. |
|
1580 * @return array Attachment post object converted to an array. |
|
1581 */ |
|
1582 function image_attachment_fields_to_save( $post, $attachment ) { |
|
1583 _deprecated_function( __FUNCTION__, '6.0.0' ); |
|
1584 |
|
1585 return $post; |
|
1586 } |