wp/wp-includes/deprecated.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    74  *
    74  *
    75  * @since 0.71
    75  * @since 0.71
    76  * @deprecated 0.71 Use get_the_category()
    76  * @deprecated 0.71 Use get_the_category()
    77  * @see get_the_category()
    77  * @see get_the_category()
    78  *
    78  *
    79  * @param bool $echo Optional. Whether to echo the output. Default true.
    79  * @param bool $display Optional. Whether to display the output. Default true.
    80  * @return int Category ID.
    80  * @return int Category ID.
    81  */
    81  */
    82 function the_category_ID($echo = true) {
    82 function the_category_ID($display = true) {
    83 	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
    83 	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
    84 
    84 
    85 	// Grab the first cat in the list.
    85 	// Grab the first cat in the list.
    86 	$categories = get_the_category();
    86 	$categories = get_the_category();
    87 	$cat = $categories[0]->term_id;
    87 	$cat = $categories[0]->term_id;
    88 
    88 
    89 	if ( $echo )
    89 	if ( $display )
    90 		echo $cat;
    90 		echo $cat;
    91 
    91 
    92 	return $cat;
    92 	return $cat;
    93 }
    93 }
    94 
    94 
   793  *
   793  *
   794  * @since 1.2.0
   794  * @since 1.2.0
   795  * @deprecated 2.1.0 Use get_author_posts_url()
   795  * @deprecated 2.1.0 Use get_author_posts_url()
   796  * @see get_author_posts_url()
   796  * @see get_author_posts_url()
   797  *
   797  *
   798  * @param bool $echo
   798  * @param bool $display
   799  * @param int $author_id
   799  * @param int $author_id
   800  * @param string $author_nicename Optional.
   800  * @param string $author_nicename Optional.
   801  * @return string|null
   801  * @return string|null
   802  */
   802  */
   803 function get_author_link($echo, $author_id, $author_nicename = '') {
   803 function get_author_link($display, $author_id, $author_nicename = '') {
   804 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
   804 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
   805 
   805 
   806 	$link = get_author_posts_url($author_id, $author_nicename);
   806 	$link = get_author_posts_url($author_id, $author_nicename);
   807 
   807 
   808 	if ( $echo )
   808 	if ( $display )
   809 		echo $link;
   809 		echo $link;
   810 	return $link;
   810 	return $link;
   811 }
   811 }
   812 
   812 
   813 /**
   813 /**
   937  *                                 Default true.
   937  *                                 Default true.
   938  * @param bool   $show_rating      Optional. Show rating stars/chars. Default false.
   938  * @param bool   $show_rating      Optional. Show rating stars/chars. Default false.
   939  * @param int    $limit            Optional. Limit to X entries. If not specified, all entries are shown.
   939  * @param int    $limit            Optional. Limit to X entries. If not specified, all entries are shown.
   940  *                                 Default -1.
   940  *                                 Default -1.
   941  * @param int    $show_updated     Optional. Whether to show last updated timestamp. Default 1.
   941  * @param int    $show_updated     Optional. Whether to show last updated timestamp. Default 1.
   942  * @param bool   $echo             Whether to echo the results, or return them instead.
   942  * @param bool   $display          Whether to display the results, or return them instead.
   943  * @return null|string
   943  * @return null|string
   944  */
   944  */
   945 function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
   945 function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
   946 			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
   946 			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $display = true) {
   947 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   947 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   948 
   948 
   949 	$order = 'ASC';
   949 	$order = 'ASC';
   950 	if ( substr($orderby, 0, 1) == '_' ) {
   950 	if ( substr($orderby, 0, 1) == '_' ) {
   951 		$order = 'DESC';
   951 		$order = 'DESC';
  1016 		}
  1016 		}
  1017 
  1017 
  1018 		$output .= "$after\n";
  1018 		$output .= "$after\n";
  1019 	} // End while.
  1019 	} // End while.
  1020 
  1020 
  1021 	if ( !$echo )
  1021 	if ( !$display )
  1022 		return $output;
  1022 		return $output;
  1023 	echo $output;
  1023 	echo $output;
  1024 }
  1024 }
  1025 
  1025 
  1026 /**
  1026 /**
  1147  *
  1147  *
  1148  * @since 1.2.0
  1148  * @since 1.2.0
  1149  * @deprecated 2.5.0 Use get_category_feed_link()
  1149  * @deprecated 2.5.0 Use get_category_feed_link()
  1150  * @see get_category_feed_link()
  1150  * @see get_category_feed_link()
  1151  *
  1151  *
  1152  * @param bool $echo
  1152  * @param bool $display
  1153  * @param int $cat_ID
  1153  * @param int $cat_ID
  1154  * @return string
  1154  * @return string
  1155  */
  1155  */
  1156 function get_category_rss_link($echo = false, $cat_ID = 1) {
  1156 function get_category_rss_link($display = false, $cat_ID = 1) {
  1157 	_deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
  1157 	_deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
  1158 
  1158 
  1159 	$link = get_category_feed_link($cat_ID, 'rss2');
  1159 	$link = get_category_feed_link($cat_ID, 'rss2');
  1160 
  1160 
  1161 	if ( $echo )
  1161 	if ( $display )
  1162 		echo $link;
  1162 		echo $link;
  1163 	return $link;
  1163 	return $link;
  1164 }
  1164 }
  1165 
  1165 
  1166 /**
  1166 /**
  1168  *
  1168  *
  1169  * @since 1.2.0
  1169  * @since 1.2.0
  1170  * @deprecated 2.5.0 Use get_author_feed_link()
  1170  * @deprecated 2.5.0 Use get_author_feed_link()
  1171  * @see get_author_feed_link()
  1171  * @see get_author_feed_link()
  1172  *
  1172  *
  1173  * @param bool $echo
  1173  * @param bool $display
  1174  * @param int $author_id
  1174  * @param int $author_id
  1175  * @return string
  1175  * @return string
  1176  */
  1176  */
  1177 function get_author_rss_link($echo = false, $author_id = 1) {
  1177 function get_author_rss_link($display = false, $author_id = 1) {
  1178 	_deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' );
  1178 	_deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' );
  1179 
  1179 
  1180 	$link = get_author_feed_link($author_id);
  1180 	$link = get_author_feed_link($author_id);
  1181 	if ( $echo )
  1181 	if ( $display )
  1182 		echo $link;
  1182 		echo $link;
  1183 	return $link;
  1183 	return $link;
  1184 }
  1184 }
  1185 
  1185 
  1186 /**
  1186 /**
  2022 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
  2022 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
  2023 	return get_bookmark($bookmark_id, $output, $filter);
  2023 	return get_bookmark($bookmark_id, $output, $filter);
  2024 }
  2024 }
  2025 
  2025 
  2026 /**
  2026 /**
  2027  * Performs esc_url() for database or redirect usage.
       
  2028  *
       
  2029  * @since 2.3.1
       
  2030  * @deprecated 2.8.0 Use esc_url_raw()
       
  2031  * @see esc_url_raw()
       
  2032  *
       
  2033  * @param string $url The URL to be cleaned.
       
  2034  * @param array $protocols An array of acceptable protocols.
       
  2035  * @return string The cleaned URL.
       
  2036  */
       
  2037 function sanitize_url( $url, $protocols = null ) {
       
  2038 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_url_raw()' );
       
  2039 	return esc_url_raw( $url, $protocols );
       
  2040 }
       
  2041 
       
  2042 /**
       
  2043  * Checks and cleans a URL.
  2027  * Checks and cleans a URL.
  2044  *
  2028  *
  2045  * A number of characters are removed from the URL. If the URL is for displaying
  2029  * A number of characters are removed from the URL. If the URL is for displaying
  2046  * (the default behaviour) ampersands are also replaced. The 'clean_url' filter
  2030  * (the default behaviour) ampersands are also replaced. The 'clean_url' filter
  2047  * is applied to the returned cleaned URL.
  2031  * is applied to the returned cleaned URL.
  2084  * Legacy escaping for HTML blocks.
  2068  * Legacy escaping for HTML blocks.
  2085  *
  2069  *
  2086  * @deprecated 2.8.0 Use esc_html()
  2070  * @deprecated 2.8.0 Use esc_html()
  2087  * @see esc_html()
  2071  * @see esc_html()
  2088  *
  2072  *
  2089  * @param string       $string        String to escape.
  2073  * @param string       $text          Text to escape.
  2090  * @param string       $quote_style   Unused.
  2074  * @param string       $quote_style   Unused.
  2091  * @param false|string $charset       Unused.
  2075  * @param false|string $charset       Unused.
  2092  * @param false        $double_encode Whether to double encode. Unused.
  2076  * @param false        $double_encode Whether to double encode. Unused.
  2093  * @return string Escaped `$string`.
  2077  * @return string Escaped `$text`.
  2094  */
  2078  */
  2095 function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
  2079 function wp_specialchars( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
  2096 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
  2080 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
  2097 	if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
  2081 	if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
  2098 		return _wp_specialchars( $string, $quote_style, $charset, $double_encode );
  2082 		return _wp_specialchars( $text, $quote_style, $charset, $double_encode );
  2099 	} else {
  2083 	} else {
  2100 		return esc_html( $string );
  2084 		return esc_html( $text );
  2101 	}
  2085 	}
  2102 }
  2086 }
  2103 
  2087 
  2104 /**
  2088 /**
  2105  * Escaping for HTML attributes.
  2089  * Escaping for HTML attributes.
  2872  * @deprecated 3.4.0 Use error_log()
  2856  * @deprecated 3.4.0 Use error_log()
  2873  * @see error_log()
  2857  * @see error_log()
  2874  *
  2858  *
  2875  * @link https://www.php.net/manual/en/function.error-log.php
  2859  * @link https://www.php.net/manual/en/function.error-log.php
  2876  *
  2860  *
  2877  * @param mixed  $fp     Unused.
  2861  * @param mixed  $fp      Unused.
  2878  * @param string $string Message to log.
  2862  * @param string $message Message to log.
  2879  */
  2863  */
  2880 function debug_fwrite( $fp, $string ) {
  2864 function debug_fwrite( $fp, $message ) {
  2881 	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
  2865 	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
  2882 	if ( ! empty( $GLOBALS['debug'] ) )
  2866 	if ( ! empty( $GLOBALS['debug'] ) )
  2883 		error_log( $string );
  2867 		error_log( $message );
  2884 }
  2868 }
  2885 
  2869 
  2886 /**
  2870 /**
  2887  * Close the debugging file handle.
  2871  * Close the debugging file handle.
  2888  *
  2872  *
  3206 	if ( is_numeric( $file ) )
  3190 	if ( is_numeric( $file ) )
  3207 		$file = get_attached_file( $file );
  3191 		$file = get_attached_file( $file );
  3208 
  3192 
  3209 	if ( ! is_file( $file ) ) {
  3193 	if ( ! is_file( $file ) ) {
  3210 		/* translators: %s: File name. */
  3194 		/* translators: %s: File name. */
  3211 		return sprintf( __( 'File &#8220;%s&#8221; doesn&#8217;t exist?' ), $file );
  3195 		return sprintf( __( 'File &#8220;%s&#8221; does not exist?' ), $file );
  3212 	}
  3196 	}
  3213 
  3197 
  3214 	if ( ! function_exists('imagecreatefromstring') )
  3198 	if ( ! function_exists('imagecreatefromstring') )
  3215 		return __('The GD image library is not installed.');
  3199 		return __('The GD image library is not installed.');
  3216 
  3200 
  3339 			case 'image/png':
  3323 			case 'image/png':
  3340 				return (imagetypes() & IMG_PNG) != 0;
  3324 				return (imagetypes() & IMG_PNG) != 0;
  3341 			case 'image/gif':
  3325 			case 'image/gif':
  3342 				return (imagetypes() & IMG_GIF) != 0;
  3326 				return (imagetypes() & IMG_GIF) != 0;
  3343 			case 'image/webp':
  3327 			case 'image/webp':
  3344 				return (imagetypes() & IMG_WEBP) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
  3328 				return (imagetypes() & IMG_WEBP) != 0;
  3345 		}
  3329 		}
  3346 	} else {
  3330 	} else {
  3347 		switch( $mime_type ) {
  3331 		switch( $mime_type ) {
  3348 			case 'image/jpeg':
  3332 			case 'image/jpeg':
  3349 				return function_exists('imagecreatefromjpeg');
  3333 				return function_exists('imagecreatefromjpeg');
  3834  * input to the return.
  3818  * input to the return.
  3835  *
  3819  *
  3836  * @since 1.0.0
  3820  * @since 1.0.0
  3837  * @deprecated 4.7.0 Officially dropped security support for Netscape 4.
  3821  * @deprecated 4.7.0 Officially dropped security support for Netscape 4.
  3838  *
  3822  *
  3839  * @param string $string
  3823  * @param string $content
  3840  * @return string
  3824  * @return string
  3841  */
  3825  */
  3842 function wp_kses_js_entities( $string ) {
  3826 function wp_kses_js_entities( $content ) {
  3843 	_deprecated_function( __FUNCTION__, '4.7.0' );
  3827 	_deprecated_function( __FUNCTION__, '4.7.0' );
  3844 
  3828 
  3845 	return preg_replace( '%&\s*\{[^}]*(\}\s*;?|$)%', '', $string );
  3829 	return preg_replace( '%&\s*\{[^}]*(\}\s*;?|$)%', '', $content );
  3846 }
  3830 }
  3847 
  3831 
  3848 /**
  3832 /**
  3849  * Sort categories by ID.
  3833  * Sort categories by ID.
  3850  *
  3834  *
  4139 function addslashes_strings_only( $value ) {
  4123 function addslashes_strings_only( $value ) {
  4140 	return is_string( $value ) ? addslashes( $value ) : $value;
  4124 	return is_string( $value ) ? addslashes( $value ) : $value;
  4141 }
  4125 }
  4142 
  4126 
  4143 /**
  4127 /**
  4144  * Displays a noindex meta tag if required by the blog configuration.
  4128  * Displays a `noindex` meta tag if required by the blog configuration.
  4145  *
  4129  *
  4146  * If a blog is marked as not being public then the noindex meta tag will be
  4130  * If a blog is marked as not being public then the `noindex` meta tag will be
  4147  * output to tell web robots not to index the page content. Add this to the
  4131  * output to tell web robots not to index the page content.
  4148  * {@see 'wp_head'} action.
       
  4149  *
  4132  *
  4150  * Typical usage is as a {@see 'wp_head'} callback:
  4133  * Typical usage is as a {@see 'wp_head'} callback:
  4151  *
  4134  *
  4152  *     add_action( 'wp_head', 'noindex' );
  4135  *     add_action( 'wp_head', 'noindex' );
  4153  *
  4136  *
  4164 		wp_no_robots();
  4147 		wp_no_robots();
  4165 	}
  4148 	}
  4166 }
  4149 }
  4167 
  4150 
  4168 /**
  4151 /**
  4169  * Display a noindex meta tag.
  4152  * Display a `noindex` meta tag.
  4170  *
  4153  *
  4171  * Outputs a noindex meta tag that tells web robots not to index the page content.
  4154  * Outputs a `noindex` meta tag that tells web robots not to index the page content.
  4172  * Typical usage is as a {@see 'wp_head'} callback. add_action( 'wp_head', 'wp_no_robots' );
  4155  *
       
  4156  * Typical usage is as a {@see 'wp_head'} callback:
       
  4157  *
       
  4158  *     add_action( 'wp_head', 'wp_no_robots' );
  4173  *
  4159  *
  4174  * @since 3.3.0
  4160  * @since 3.3.0
  4175  * @since 5.3.0 Echo "noindex,nofollow" if search engine visibility is discouraged.
  4161  * @since 5.3.0 Echo `noindex,nofollow` if search engine visibility is discouraged.
  4176  * @deprecated 5.7.0 Use wp_robots_no_robots() instead on 'wp_robots' filter.
  4162  * @deprecated 5.7.0 Use wp_robots_no_robots() instead on 'wp_robots' filter.
  4177  */
  4163  */
  4178 function wp_no_robots() {
  4164 function wp_no_robots() {
  4179 	_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_no_robots()' );
  4165 	_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_no_robots()' );
  4180 
  4166 
  4185 
  4171 
  4186 	echo "<meta name='robots' content='noindex,nofollow' />\n";
  4172 	echo "<meta name='robots' content='noindex,nofollow' />\n";
  4187 }
  4173 }
  4188 
  4174 
  4189 /**
  4175 /**
  4190  * Display a noindex,noarchive meta tag and referrer origin-when-cross-origin meta tag.
  4176  * Display a `noindex,noarchive` meta tag and referrer `strict-origin-when-cross-origin` meta tag.
  4191  *
  4177  *
  4192  * Outputs a noindex,noarchive meta tag that tells web robots not to index or cache the page content.
  4178  * Outputs a `noindex,noarchive` meta tag that tells web robots not to index or cache the page content.
  4193  * Outputs a referrer origin-when-cross-origin meta tag that tells the browser not to send the full
  4179  * Outputs a referrer `strict-origin-when-cross-origin` meta tag that tells the browser not to send
  4194  * url as a referrer to other sites when cross-origin assets are loaded.
  4180  * the full URL as a referrer to other sites when cross-origin assets are loaded.
  4195  *
  4181  *
  4196  * Typical usage is as a wp_head callback. add_action( 'wp_head', 'wp_sensitive_page_meta' );
  4182  * Typical usage is as a {@see 'wp_head'} callback:
       
  4183  *
       
  4184  *     add_action( 'wp_head', 'wp_sensitive_page_meta' );
  4197  *
  4185  *
  4198  * @since 5.0.1
  4186  * @since 5.0.1
  4199  * @deprecated 5.7.0 Use wp_robots_sensitive_page() instead on 'wp_robots' filter
  4187  * @deprecated 5.7.0 Use wp_robots_sensitive_page() instead on 'wp_robots' filter
  4200  *                   and wp_strict_cross_origin_referrer() on 'wp_head' action.
  4188  *                   and wp_strict_cross_origin_referrer() on 'wp_head' action.
       
  4189  *
       
  4190  * @see wp_robots_sensitive_page()
  4201  */
  4191  */
  4202 function wp_sensitive_page_meta() {
  4192 function wp_sensitive_page_meta() {
  4203 	_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_sensitive_page()' );
  4193 	_deprecated_function( __FUNCTION__, '5.7.0', 'wp_robots_sensitive_page()' );
  4204 
  4194 
  4205 	?>
  4195 	?>
  4210 
  4200 
  4211 /**
  4201 /**
  4212  * Render inner blocks from the `core/columns` block for generating an excerpt.
  4202  * Render inner blocks from the `core/columns` block for generating an excerpt.
  4213  *
  4203  *
  4214  * @since 5.2.0
  4204  * @since 5.2.0
  4215  * @deprecated 5.8.0
       
  4216  *
       
  4217  * @access private
  4205  * @access private
       
  4206  * @deprecated 5.8.0 Use _excerpt_render_inner_blocks() introduced in 5.8.0.
       
  4207  *
       
  4208  * @see _excerpt_render_inner_blocks()
  4218  *
  4209  *
  4219  * @param array $columns        The parsed columns block.
  4210  * @param array $columns        The parsed columns block.
  4220  * @param array $allowed_blocks The list of allowed inner blocks.
  4211  * @param array $allowed_blocks The list of allowed inner blocks.
  4221  * @return string The rendered inner blocks.
  4212  * @return string The rendered inner blocks.
  4222  */
  4213  */
  4223 function _excerpt_render_inner_columns_blocks( $columns, $allowed_blocks ) {
  4214 function _excerpt_render_inner_columns_blocks( $columns, $allowed_blocks ) {
  4224 	_deprecated_function( __FUNCTION__, '5.8.0', '_excerpt_render_inner_blocks()' );
  4215 	_deprecated_function( __FUNCTION__, '5.8.0', '_excerpt_render_inner_blocks()' );
       
  4216 
  4225 	return _excerpt_render_inner_blocks( $columns, $allowed_blocks );
  4217 	return _excerpt_render_inner_blocks( $columns, $allowed_blocks );
  4226 }
  4218 }
       
  4219 
       
  4220 /**
       
  4221  * Renders the duotone filter SVG and returns the CSS filter property to
       
  4222  * reference the rendered SVG.
       
  4223  *
       
  4224  * @since 5.9.0
       
  4225  * @deprecated 5.9.1 Use wp_get_duotone_filter_property() introduced in 5.9.1.
       
  4226  *
       
  4227  * @see wp_get_duotone_filter_property()
       
  4228  *
       
  4229  * @param array $preset Duotone preset value as seen in theme.json.
       
  4230  * @return string Duotone CSS filter property.
       
  4231  */
       
  4232 function wp_render_duotone_filter_preset( $preset ) {
       
  4233 	_deprecated_function( __FUNCTION__, '5.9.1', 'wp_get_duotone_filter_property()' );
       
  4234 
       
  4235 	return wp_get_duotone_filter_property( $preset );
       
  4236 }
       
  4237 
       
  4238 /**
       
  4239  * Checks whether serialization of the current block's border properties should occur.
       
  4240  *
       
  4241  * @since 5.8.0
       
  4242  * @access private
       
  4243  * @deprecated 6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
       
  4244  *
       
  4245  * @see wp_should_skip_block_supports_serialization()
       
  4246  *
       
  4247  * @param WP_Block_Type $block_type Block type.
       
  4248  * @return bool Whether serialization of the current block's border properties
       
  4249  *              should occur.
       
  4250  */
       
  4251 function wp_skip_border_serialization( $block_type ) {
       
  4252 	_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
       
  4253 
       
  4254 	$border_support = _wp_array_get( $block_type->supports, array( '__experimentalBorder' ), false );
       
  4255 
       
  4256 	return is_array( $border_support ) &&
       
  4257 		array_key_exists( '__experimentalSkipSerialization', $border_support ) &&
       
  4258 		$border_support['__experimentalSkipSerialization'];
       
  4259 }
       
  4260 
       
  4261 /**
       
  4262  * Checks whether serialization of the current block's dimensions properties should occur.
       
  4263  *
       
  4264  * @since 5.9.0
       
  4265  * @access private
       
  4266  * @deprecated 6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
       
  4267  *
       
  4268  * @see wp_should_skip_block_supports_serialization()
       
  4269  *
       
  4270  * @param WP_Block_type $block_type Block type.
       
  4271  * @return bool Whether to serialize spacing support styles & classes.
       
  4272  */
       
  4273 function wp_skip_dimensions_serialization( $block_type ) {
       
  4274 	_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
       
  4275 
       
  4276 	$dimensions_support = _wp_array_get( $block_type->supports, array( '__experimentalDimensions' ), false );
       
  4277 
       
  4278 	return is_array( $dimensions_support ) &&
       
  4279 		array_key_exists( '__experimentalSkipSerialization', $dimensions_support ) &&
       
  4280 		$dimensions_support['__experimentalSkipSerialization'];
       
  4281 }
       
  4282 
       
  4283 /**
       
  4284  * Checks whether serialization of the current block's spacing properties should occur.
       
  4285  *
       
  4286  * @since 5.9.0
       
  4287  * @access private
       
  4288  * @deprecated 6.0.0 Use wp_should_skip_block_supports_serialization() introduced in 6.0.0.
       
  4289  *
       
  4290  * @see wp_should_skip_block_supports_serialization()
       
  4291  *
       
  4292  * @param WP_Block_Type $block_type Block type.
       
  4293  * @return bool Whether to serialize spacing support styles & classes.
       
  4294  */
       
  4295 function wp_skip_spacing_serialization( $block_type ) {
       
  4296 	_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );
       
  4297 
       
  4298 	$spacing_support = _wp_array_get( $block_type->supports, array( 'spacing' ), false );
       
  4299 
       
  4300 	return is_array( $spacing_support ) &&
       
  4301 		array_key_exists( '__experimentalSkipSerialization', $spacing_support ) &&
       
  4302 		$spacing_support['__experimentalSkipSerialization'];
       
  4303 }
       
  4304 
       
  4305 /**
       
  4306  * Inject the block editor assets that need to be loaded into the editor's iframe as an inline script.
       
  4307  *
       
  4308  * @since 5.8.0
       
  4309  * @deprecated 6.0.0
       
  4310  */
       
  4311 function wp_add_iframed_editor_assets_html() {
       
  4312 	_deprecated_function( __FUNCTION__, '6.0.0' );
       
  4313 }