diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-includes/deprecated.php
--- a/wp/wp-includes/deprecated.php Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-includes/deprecated.php Tue Dec 15 13:49:49 2020 +0100
@@ -53,7 +53,7 @@
*
* Use The Loop instead.
*
- * @link https://codex.wordpress.org/The_Loop
+ * @link https://developer.wordpress.org/themes/basics/the-loop/
*
* @since 1.0.1
* @deprecated 1.5.0
@@ -247,8 +247,8 @@
$post_author_data = get_userdata($post->post_author);
if ( (($user_id == $post_author_data->ID) && !($post->post_status == 'publish' && $author_data->user_level < 2))
- || ($author_data->user_level > $post_author_data->user_level)
- || ($author_data->user_level >= 10) ) {
+ || ($author_data->user_level > $post_author_data->user_level)
+ || ($author_data->user_level >= 10) ) {
return true;
} else {
return false;
@@ -270,7 +270,7 @@
function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
- // right now if one can edit, one can delete
+ // Right now if one can edit, one can delete.
return user_can_edit_post($user_id, $post_id, $blog_id);
}
@@ -327,7 +327,7 @@
function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
- // right now if one can edit a post, one can edit comments made on it
+ // Right now if one can edit a post, one can edit comments made on it.
return user_can_edit_post($user_id, $post_id, $blog_id);
}
@@ -346,7 +346,7 @@
function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
- // right now if one can edit comments, one can delete comments
+ // Right now if one can edit comments, one can delete comments.
return user_can_edit_post_comments($user_id, $post_id, $blog_id);
}
@@ -379,22 +379,27 @@
* @deprecated 2.1.0 Use get_bookmarks()
* @see get_bookmarks()
*
- * @param string $cat_name Optional. The category name to use. If no match is found uses all.
- * @param string $before Optional. The html to output before the link.
- * @param string $after Optional. The html to output after the link.
- * @param string $between Optional. The html to output between the link/image and its description. Not used if no image or $show_images is true.
- * @param bool $show_images Optional. Whether to show images (if defined).
- * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner.
- * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a
- * random order.
- * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
- * @param bool $show_rating Optional. Show rating stars/chars.
- * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated Optional. Whether to show last updated timestamp
+ * @param string $cat_name Optional. The category name to use. If no match is found, uses all.
+ * Default 'noname'.
+ * @param string $before Optional. The HTML to output before the link. Default empty.
+ * @param string $after Optional. The HTML to output after the link. Default '
'.
+ * @param string $between Optional. The HTML to output between the link/image and its description.
+ * Not used if no image or $show_images is true. Default ' '.
+ * @param bool $show_images Optional. Whether to show images (if defined). Default true.
+ * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
+ * 'description', 'rating', or 'owner'. Default 'id'.
+ * If you start the name with an underscore, the order will be reversed.
+ * Specifying 'rand' as the order will return links in a random order.
+ * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
+ * Default true.
+ * @param bool $show_rating Optional. Show rating stars/chars. Default false.
+ * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
+ * Default -1.
+ * @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
*/
function get_linksbyname($cat_name = "noname", $before = '', $after = '
', $between = " ", $show_images = true, $orderby = 'id',
- $show_description = true, $show_rating = false,
- $limit = -1, $show_updated = 0) {
+ $show_description = true, $show_rating = false,
+ $limit = -1, $show_updated = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
$cat_id = -1;
@@ -430,9 +435,9 @@
'title_li' => '',
);
- $r = wp_parse_args( $args, $defaults );
-
- return wp_list_bookmarks($r);
+ $parsed_args = wp_parse_args( $args, $defaults );
+
+ return wp_list_bookmarks($parsed_args);
}
/**
@@ -447,11 +452,14 @@
* @deprecated 2.1.0 Use get_bookmarks()
* @see get_bookmarks()
*
- * @param string $cat_name The category name to use. If no match is found uses all.
- * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'.
- * Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
- * specify 'rand' as the order which will return links in a random order.
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
+ * @param string $cat_name Optional. The category name to use. If no match is found, uses all.
+ * Default 'noname'.
+ * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
+ * 'description', 'rating', or 'owner'. Default 'name'.
+ * If you start the name with an underscore, the order will be reversed.
+ * Specifying 'rand' as the order will return links in a random order.
+ * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
+ * Default -1.
* @return array
*/
function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
@@ -497,12 +505,14 @@
* @deprecated 2.1.0 Use get_bookmarks()
* @see get_bookmarks()
*
- * @param int $category The category to use. If no category supplied uses all
- * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
- * 'description', or 'rating'. Or maybe owner. If you start the name with an
- * underscore the order will be reversed. You can also specify 'rand' as the
- * order which will return links in a random order.
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
+ * @param int $category Optional. The category to use. If no category supplied, uses all.
+ * Default 0.
+ * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
+ * 'description', 'rating', or 'owner'. Default 'name'.
+ * If you start the name with an underscore, the order will be reversed.
+ * Specifying 'rand' as the order will return links in a random order.
+ * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
+ * Default 0.
* @return array
*/
function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
@@ -524,18 +534,22 @@
* @deprecated 2.1.0 Use get_bookmarks()
* @see get_bookmarks()
*
- * @param string $cat_name The category name to use. If no match is found uses all
- * @param string $before The html to output before the link
- * @param string $after The html to output after the link
- * @param string $between The html to output between the link/image and its description. Not used if no image or show_images is true
- * @param bool $show_images Whether to show images (if defined).
- * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
- * 'description', or 'rating'. Or maybe owner. If you start the name with an
- * underscore the order will be reversed. You can also specify 'rand' as the
- * order which will return links in a random order.
- * @param bool $show_description Whether to show the description if show_images=false/not defined
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated Whether to show last updated timestamp
+ * @param string $cat_name Optional. The category name to use. If no match is found, uses all.
+ * Default 'noname'.
+ * @param string $before Optional. The HTML to output before the link. Default empty.
+ * @param string $after Optional. The HTML to output after the link. Default '
'.
+ * @param string $between Optional. The HTML to output between the link/image and its description.
+ * Not used if no image or $show_images is true. Default ' '.
+ * @param bool $show_images Optional. Whether to show images (if defined). Default true.
+ * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
+ * 'description', 'rating', or 'owner'. Default 'id'.
+ * If you start the name with an underscore, the order will be reversed.
+ * Specifying 'rand' as the order will return links in a random order.
+ * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
+ * Default true.
+ * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
+ * Default -1.
+ * @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
*/
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '
', $between = " ",
$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
@@ -551,21 +565,25 @@
* @deprecated 2.1.0 Use get_bookmarks()
* @see get_bookmarks()
*
- * @param int $category The category to use. If no category supplied uses all
- * @param string $before The html to output before the link
- * @param string $after The html to output after the link
- * @param string $between The html to output between the link/image and its description. Not used if no image or show_images == true
- * @param bool $show_images Whether to show images (if defined).
- * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url',
- * 'description', or 'rating'. Or maybe owner. If you start the name with an
- * underscore the order will be reversed. You can also specify 'rand' as the
- * order which will return links in a random order.
- * @param bool $show_description Whether to show the description if show_images=false/not defined.
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated Whether to show last updated timestamp
+ * @param int $category Optional. The category to use. If no category supplied, uses all.
+ * Default 0.
+ * @param string $before Optional. The HTML to output before the link. Default empty.
+ * @param string $after Optional. The HTML to output after the link. Default '
'.
+ * @param string $between Optional. The HTML to output between the link/image and its description.
+ * Not used if no image or $show_images is true. Default ' '.
+ * @param bool $show_images Optional. Whether to show images (if defined). Default true.
+ * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
+ * 'description', 'rating', or 'owner'. Default 'id'.
+ * If you start the name with an underscore, the order will be reversed.
+ * Specifying 'rand' as the order will return links in a random order.
+ * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
+ * Default true.
+ * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
+ * Default -1.
+ * @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
*/
function get_links_withrating($category = -1, $before = '', $after = '
', $between = " ", $show_images = true,
- $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
+ $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
@@ -610,11 +628,11 @@
* @param string $feed_image
* @param string $exclude
* @param bool $hierarchical
- * @return false|null
+ * @return null|false
*/
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
- $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
- $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
+ $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
+ $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
@@ -630,29 +648,29 @@
* @see wp_list_categories()
*
* @param string|array $args
- * @return false|null|string
+ * @return null|string|false
*/
function wp_list_cats($args = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
- $r = wp_parse_args( $args );
+ $parsed_args = wp_parse_args( $args );
// Map to new names.
- if ( isset($r['optionall']) && isset($r['all']))
- $r['show_option_all'] = $r['all'];
- if ( isset($r['sort_column']) )
- $r['orderby'] = $r['sort_column'];
- if ( isset($r['sort_order']) )
- $r['order'] = $r['sort_order'];
- if ( isset($r['optiondates']) )
- $r['show_last_update'] = $r['optiondates'];
- if ( isset($r['optioncount']) )
- $r['show_count'] = $r['optioncount'];
- if ( isset($r['list']) )
- $r['style'] = $r['list'] ? 'list' : 'break';
- $r['title_li'] = '';
-
- return wp_list_categories($r);
+ if ( isset($parsed_args['optionall']) && isset($parsed_args['all']))
+ $parsed_args['show_option_all'] = $parsed_args['all'];
+ if ( isset($parsed_args['sort_column']) )
+ $parsed_args['orderby'] = $parsed_args['sort_column'];
+ if ( isset($parsed_args['sort_order']) )
+ $parsed_args['order'] = $parsed_args['sort_order'];
+ if ( isset($parsed_args['optiondates']) )
+ $parsed_args['show_last_update'] = $parsed_args['optiondates'];
+ if ( isset($parsed_args['optioncount']) )
+ $parsed_args['show_count'] = $parsed_args['optioncount'];
+ if ( isset($parsed_args['list']) )
+ $parsed_args['style'] = $parsed_args['list'] ? 'list' : 'break';
+ $parsed_args['title_li'] = '';
+
+ return wp_list_categories($parsed_args);
}
/**
@@ -732,7 +750,7 @@
}
/**
- * Sets the categories that the post id belongs to.
+ * Sets the categories that the post ID belongs to.
*
* @since 1.0.1
* @deprecated 2.1.0
@@ -892,33 +910,36 @@
'title_li' => '',
);
- $r = wp_parse_args( $args, $defaults );
-
- return wp_list_bookmarks($r);
+ $parsed_args = wp_parse_args( $args, $defaults );
+
+ return wp_list_bookmarks($parsed_args);
}
/**
- * Gets the links associated with category by id.
+ * Gets the links associated with category by ID.
*
* @since 0.71
* @deprecated 2.1.0 Use get_bookmarks()
* @see get_bookmarks()
*
- * @param int $category The category to use. If no category supplied uses all
- * @param string $before the html to output before the link
- * @param string $after the html to output after the link
- * @param string $between the html to output between the link/image and its description.
- * Not used if no image or show_images == true
- * @param bool $show_images whether to show images (if defined).
- * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
- * 'description', or 'rating'. Or maybe owner. If you start the name with an
- * underscore the order will be reversed. You can also specify 'rand' as the order
- * which will return links in a random order.
- * @param bool $show_description whether to show the description if show_images=false/not defined.
- * @param bool $show_rating show rating stars/chars
- * @param int $limit Limit to X entries. If not specified, all entries are shown.
- * @param int $show_updated whether to show last updated timestamp
- * @param bool $echo whether to echo the results, or return them instead
+ * @param int $category Optional. The category to use. If no category supplied uses all.
+ * Default 0.
+ * @param string $before Optional. The HTML to output before the link. Default empty.
+ * @param string $after Optional. The HTML to output after the link. Default '
'.
+ * @param string $between Optional. The HTML to output between the link/image and its description.
+ * Not used if no image or $show_images is true. Default ' '.
+ * @param bool $show_images Optional. Whether to show images (if defined). Default true.
+ * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
+ * 'description', 'rating', or 'owner'. Default 'name'.
+ * If you start the name with an underscore, the order will be reversed.
+ * Specifying 'rand' as the order will return links in a random order.
+ * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
+ * Default true.
+ * @param bool $show_rating Optional. Show rating stars/chars. Default false.
+ * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
+ * Default -1.
+ * @param int $show_updated Optional. Whether to show last updated timestamp. Default 1.
+ * @param bool $echo Whether to echo the results, or return them instead.
* @return null|string
*/
function get_links($category = -1, $before = '', $after = '
', $between = ' ', $show_images = true, $orderby = 'name',
@@ -931,7 +952,7 @@
$orderby = substr($orderby, 1);
}
- if ( $category == -1 ) //get_bookmarks uses '' to signify all categories
+ if ( $category == -1 ) // get_bookmarks() uses '' to signify all categories.
$category = '';
$results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit));
@@ -960,7 +981,7 @@
if ( $show_updated )
if (substr($row->link_updated_f, 0, 2) != '00')
- $title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
+ $title .= ' ('.__('Last updated') . ' ' . gmdate(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
if ( '' != $title )
$title = ' title="' . $title . '"';
@@ -976,7 +997,7 @@
if ( $row->link_image != null && $show_images ) {
if ( strpos($row->link_image, 'http') !== false )
$output .= "link_image\" $alt $title />";
- else // If it's a relative path
+ else // If it's a relative path.
$output .= "
link_image\" $alt $title />";
} else {
$output .= $name;
@@ -995,7 +1016,7 @@
}
$output .= "$after\n";
- } // end while
+ } // End while.
if ( !$echo )
return $output;
@@ -1019,7 +1040,7 @@
$order = strtolower($order);
- // Handle link category sorting
+ // Handle link category sorting.
$direction = 'ASC';
if ( '_' == substr($order,0,1) ) {
$direction = 'DESC';
@@ -1031,17 +1052,17 @@
$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));
- // Display each category
+ // Display each category.
if ( $cats ) {
foreach ( (array) $cats as $cat ) {
// Handle each category.
- // Display the category name
+ // Display the category name.
echo '
...` HTML block are not - * converted into paragraphs or line-breaks. + * converted into paragraphs or line breaks. * * @since 1.2.0 * @deprecated 3.4.0 * * @param array|string $matches The array or string - * @return string The pre block without paragraph/line-break conversion. + * @return string The pre block without paragraph/line break conversion. */ function clean_pre($matches) { _deprecated_function( __FUNCTION__, '3.4.0' ); @@ -3182,7 +3205,7 @@ $file = get_attached_file( $file ); if ( ! is_file( $file ) ) { - /* translators: %s: file name */ + /* translators: %s: File name. */ return sprintf( __( 'File “%s” doesn’t exist?' ), $file ); } @@ -3195,7 +3218,7 @@ $image = imagecreatefromstring( file_get_contents( $file ) ); if ( ! is_resource( $image ) ) { - /* translators: %s: file name */ + /* translators: %s: File name. */ return sprintf( __( 'File “%s” is not an image.' ), $file ); } @@ -3217,13 +3240,13 @@ * @deprecated 3.5.0 Use wp_get_image_editor() * @see wp_get_image_editor() * - * @param string $file Image file path. - * @param int $max_w Maximum width to resize to. - * @param int $max_h Maximum height to resize to. - * @param bool $crop Optional. Whether to crop image or resize. - * @param string $suffix Optional. File suffix. - * @param string $dest_path Optional. New image file path. - * @param int $jpeg_quality Optional, default is 90. Image quality percentage. + * @param string $file Image file path. + * @param int $max_w Maximum width to resize to. + * @param int $max_h Maximum height to resize to. + * @param bool $crop Optional. Whether to crop image or resize. Default false. + * @param string $suffix Optional. File suffix. Default null. + * @param string $dest_path Optional. New image file path. Default null. + * @param int $jpeg_quality Optional. Image quality percentage. Default 90. * @return mixed WP_Error on failure. String with new destination path. */ function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) { @@ -3345,7 +3368,7 @@ $units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' ); $log = log( $bytes, KB_IN_BYTES ); $power = (int) $log; - $size = pow( KB_IN_BYTES, $log - $power ); + $size = KB_IN_BYTES ** ( $log - $power ); if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) { $unit = $units[ $power ]; @@ -3598,7 +3621,7 @@ _deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' ); if ( !empty($output) ) - $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > & + $output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // Convert only '< > &'. /** * Filters the text before it is formatted for the HTML editor. @@ -3675,7 +3698,7 @@ if ( false == $file_path ) return $headers; - // GET request - write it to the supplied filename + // GET request - write it to the supplied filename. $out_fp = fopen($file_path, 'w'); if ( !$out_fp ) return $headers; @@ -3718,15 +3741,15 @@ /** * Determines whether the current URL is within the comments popup window. - * + * * For more information on this and similar theme functions, check out - * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ + * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. - * + * * @since 1.5.0 * @deprecated 4.5.0 * - * @return bool + * @return false Always returns false. */ function is_comments_popup() { _deprecated_function( __FUNCTION__, '4.5.0' ); @@ -3928,7 +3951,7 @@ function wp_ajax_press_this_save_post() { _deprecated_function( __FUNCTION__, '4.9.0' ); if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) { - include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' ); + include WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php'; $wp_press_this = new WP_Press_This_Plugin(); $wp_press_this->save_post(); } else { @@ -3945,10 +3968,135 @@ function wp_ajax_press_this_add_category() { _deprecated_function( __FUNCTION__, '4.9.0' ); if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) { - include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' ); + include WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php'; $wp_press_this = new WP_Press_This_Plugin(); $wp_press_this->add_category(); } else { wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) ); } } + +/** + * Return the user request object for the specified request ID. + * + * @since 4.9.6 + * @deprecated 5.4.0 Use wp_get_user_request() + * @see wp_get_user_request() + * + * @param int $request_id The ID of the user request. + * @return WP_User_Request|false + */ +function wp_get_user_request_data( $request_id ) { + _deprecated_function( __FUNCTION__, '5.4.0', 'wp_get_user_request()' ); + return wp_get_user_request( $request_id ); +} + +/** + * Filters 'img' elements in post content to add 'srcset' and 'sizes' attributes. + * + * @since 4.4.0 + * @deprecated 5.5.0 + * + * @see wp_image_add_srcset_and_sizes() + * + * @param string $content The raw post content to be filtered. + * @return string Converted content with 'srcset' and 'sizes' attributes added to images. + */ +function wp_make_content_images_responsive( $content ) { + _deprecated_function( __FUNCTION__, '5.5.0', 'wp_filter_content_tags()' ); + + // This will also add the `loading` attribute to `img` tags, if enabled. + return wp_filter_content_tags( $content ); +} + +/** + * Turn register globals off. + * + * @since 2.1.0 + * @access private + * @deprecated 5.5.0 + */ +function wp_unregister_GLOBALS() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid + // register_globals was deprecated in PHP 5.3 and removed entirely in PHP 5.4. + _deprecated_function( __FUNCTION__, '5.5.0' ); +} + +/** + * Does comment contain disallowed characters or words. + * + * @since 1.5.0 + * @deprecated 5.5.0 Use wp_check_comment_disallowed_list() instead. + * Please consider writing more inclusive code. + * + * @param string $author The author of the comment + * @param string $email The email of the comment + * @param string $url The url used in the comment + * @param string $comment The comment content + * @param string $user_ip The comment author's IP address + * @param string $user_agent The author's browser user agent + * @return bool True if comment contains disallowed content, false if comment does not + */ +function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) { + _deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' ); + + return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent ); +} + +/** + * Filters out `register_meta()` args based on an allowed list. + * + * `register_meta()` args may change over time, so requiring the allowed list + * to be explicitly turned off is a warranty seal of sorts. + * + * @access private + * @since 4.6.0 + * @deprecated 5.5.0 Use _wp_register_meta_args_allowed_list() instead. + * Please consider writing more inclusive code. + * + * @param array $args Arguments from `register_meta()`. + * @param array $default_args Default arguments for `register_meta()`. + * @return array Filtered arguments. + */ +function _wp_register_meta_args_whitelist( $args, $default_args ) { + _deprecated_function( __FUNCTION__, '5.5.0', '_wp_register_meta_args_allowed_list()' ); + + return _wp_register_meta_args_allowed_list( $args, $default_args ); +} + +/** + * Adds an array of options to the list of allowed options. + * + * @since 2.7.0 + * @deprecated 5.5.0 Use add_allowed_options() instead. + * Please consider writing more inclusive code. + * + * @global array $allowed_options + * + * @param array $new_options + * @param string|array $options + * @return array + */ +function add_option_whitelist( $new_options, $options = '' ) { + _deprecated_function( __FUNCTION__, '5.5.0', 'add_allowed_options()' ); + + return add_allowed_options( $new_options, $options ); +} + +/** + * Removes a list of options from the allowed options list. + * + * @since 2.7.0 + * @deprecated 5.5.0 Use remove_allowed_options() instead. + * Please consider writing more inclusive code. + * + * @global array $allowed_options + * + * @param array $del_options + * @param string|array $options + * @return array + */ +function remove_option_whitelist( $del_options, $options = '' ) { + _deprecated_function( __FUNCTION__, '5.5.0', 'remove_allowed_options()' ); + + return remove_allowed_options( $del_options, $options ); +}