--- a/wp/wp-admin/includes/deprecated.php Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/includes/deprecated.php Tue Sep 27 16:37:53 2022 +0200
@@ -77,11 +77,11 @@
*
* @global int $post_ID
*
- * @param int $default Unused.
- * @param int $parent Unused.
- * @param array $popular_ids Unused.
+ * @param int $default_category Unused.
+ * @param int $category_parent Unused.
+ * @param array $popular_ids Unused.
*/
-function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
+function dropdown_categories( $default_category = 0, $category_parent = 0, $popular_ids = array() ) {
_deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
global $post_ID;
wp_category_checklist( $post_ID );
@@ -96,9 +96,9 @@
*
* @global int $link_id
*
- * @param int $default Unused.
+ * @param int $default_link_category Unused.
*/
-function dropdown_link_categories( $default = 0 ) {
+function dropdown_link_categories( $default_link_category = 0 ) {
_deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' );
global $link_id;
wp_link_category_checklist( $link_id );
@@ -127,28 +127,28 @@
* @deprecated 3.0.0 Use wp_dropdown_categories()
* @see wp_dropdown_categories()
*
- * @param int $currentcat Optional. ID of the current category. Default 0.
- * @param int $currentparent Optional. Current parent category ID. Default 0.
- * @param int $parent Optional. Parent ID to retrieve categories for. Default 0.
- * @param int $level Optional. Number of levels deep to display. Default 0.
- * @param array $categories Optional. Categories to include in the control. Default 0.
+ * @param int $current_cat Optional. ID of the current category. Default 0.
+ * @param int $current_parent Optional. Current parent category ID. Default 0.
+ * @param int $category_parent Optional. Parent ID to retrieve categories for. Default 0.
+ * @param int $level Optional. Number of levels deep to display. Default 0.
+ * @param array $categories Optional. Categories to include in the control. Default 0.
* @return void|false Void on success, false if no categories were found.
*/
-function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
+function wp_dropdown_cats( $current_cat = 0, $current_parent = 0, $category_parent = 0, $level = 0, $categories = 0 ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
if (!$categories )
$categories = get_categories( array('hide_empty' => 0) );
if ( $categories ) {
foreach ( $categories as $category ) {
- if ( $currentcat != $category->term_id && $parent == $category->parent) {
+ if ( $current_cat != $category->term_id && $category_parent == $category->parent) {
$pad = str_repeat( '– ', $level );
$category->name = esc_html( $category->name );
echo "\n\t<option value='$category->term_id'";
- if ( $currentparent == $category->term_id )
+ if ( $current_parent == $category->term_id )
echo " selected='selected'";
echo ">$pad$category->name</option>";
- wp_dropdown_cats( $currentcat, $currentparent, $category->term_id, $level +1, $categories );
+ wp_dropdown_cats( $current_cat, $current_parent, $category->term_id, $level +1, $categories );
}
}
} else {
@@ -163,11 +163,11 @@
* @deprecated 3.0.0 Use register_setting()
* @see register_setting()
*
- * @param string $option_group A settings group name. Should correspond to an allowed option key name.
- * Default allowed option key names include 'general', 'discussion', 'media',
- * 'reading', 'writing', 'misc', 'options', and 'privacy'.
- * @param string $option_name The name of an option to sanitize and save.
- * @param callable $sanitize_callback A callback function that sanitizes the option's value.
+ * @param string $option_group A settings group name. Should correspond to an allowed option key name.
+ * Default allowed option key names include 'general', 'discussion', 'media',
+ * 'reading', 'writing', and 'options'.
+ * @param string $option_name The name of an option to sanitize and save.
+ * @param callable $sanitize_callback Optional. A callback function that sanitizes the option's value.
*/
function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
@@ -181,9 +181,9 @@
* @deprecated 3.0.0 Use unregister_setting()
* @see unregister_setting()
*
- * @param string $option_group
- * @param string $option_name
- * @param callable $sanitize_callback
+ * @param string $option_group The settings group name used during registration.
+ * @param string $option_name The name of the option to unregister.
+ * @param callable $sanitize_callback Optional. Deprecated.
*/
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
@@ -203,7 +203,7 @@
}
/**
- * Adds JavaScript required to make CodePress work on the theme/plugin editors.
+ * Adds JavaScript required to make CodePress work on the theme/plugin file editors.
*
* @since 2.8.0
* @deprecated 3.0.0
@@ -1426,18 +1426,18 @@
* @param string $menu_title The text to be used for the menu.
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
- * @param callable $function The function to be called to output the content for this page.
- * @param string $icon_url The url to the icon to be used for this menu.
+ * @param callable $callback Optional. The function to be called to output the content for this page.
+ * @param string $icon_url Optional. The URL to the icon to be used for this menu.
* @return string The resulting page's hook_suffix.
*/
-function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
+function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '') {
_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
global $_wp_last_object_menu;
$_wp_last_object_menu++;
- return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_object_menu);
+ return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $_wp_last_object_menu);
}
/**
@@ -1459,18 +1459,18 @@
* @param string $menu_title The text to be used for the menu.
* @param string $capability The capability required for this menu to be displayed to the user.
* @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
- * @param callable $function The function to be called to output the content for this page.
- * @param string $icon_url The url to the icon to be used for this menu.
+ * @param callable $callback Optional. The function to be called to output the content for this page.
+ * @param string $icon_url Optional. The URL to the icon to be used for this menu.
* @return string The resulting page's hook_suffix.
*/
-function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
+function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $callback = '', $icon_url = '') {
_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
global $_wp_last_utility_menu;
$_wp_last_utility_menu++;
- return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $_wp_last_utility_menu);
+ return add_menu_page($page_title, $menu_title, $capability, $menu_slug, $callback, $icon_url, $_wp_last_utility_menu);
}
/**
@@ -1507,7 +1507,7 @@
function options_permalink_add_js() {
?>
<script type="text/javascript">
- jQuery(document).ready(function() {
+ jQuery( function() {
jQuery('.permalink-structure input:radio').change(function() {
if ( 'custom' == this.value )
return;
@@ -1516,7 +1516,7 @@
jQuery( '#permalink_structure' ).on( 'click input', function() {
jQuery( '#custom_selection' ).prop( 'checked', true );
});
- });
+ } );
</script>
<?php
}
@@ -1567,3 +1567,20 @@
function _wp_privacy_requests_screen_options() {
_deprecated_function( __FUNCTION__, '5.3.0' );
}
+
+/**
+ * Was used to filter input from media_upload_form_handler() and to assign a default
+ * post_title from the file name if none supplied.
+ *
+ * @since 2.5.0
+ * @deprecated 6.0.0
+ *
+ * @param array $post The WP_Post attachment object converted to an array.
+ * @param array $attachment An array of attachment metadata.
+ * @return array Attachment post object converted to an array.
+ */
+function image_attachment_fields_to_save( $post, $attachment ) {
+ _deprecated_function( __FUNCTION__, '6.0.0' );
+
+ return $post;
+}