Changeset 53287 for trunk/src/wp-includes/deprecated.php
- Timestamp:
- 04/26/2022 03:26:17 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/deprecated.php
r53160 r53287 77 77 * @see get_the_category() 78 78 * 79 * @param bool $ echo Optional. Whether to echothe output. Default true.79 * @param bool $display Optional. Whether to display the output. Default true. 80 80 * @return int Category ID. 81 81 */ 82 function the_category_ID($ echo= true) {82 function the_category_ID($display = true) { 83 83 _deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' ); 84 84 … … 87 87 $cat = $categories[0]->term_id; 88 88 89 if ( $ echo)89 if ( $display ) 90 90 echo $cat; 91 91 … … 796 796 * @see get_author_posts_url() 797 797 * 798 * @param bool $ echo798 * @param bool $display 799 799 * @param int $author_id 800 800 * @param string $author_nicename Optional. 801 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 804 _deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' ); 805 805 806 806 $link = get_author_posts_url($author_id, $author_nicename); 807 807 808 if ( $ echo)808 if ( $display ) 809 809 echo $link; 810 810 return $link; … … 940 940 * Default -1. 941 941 * @param int $show_updated Optional. Whether to show last updated timestamp. Default 1. 942 * @param bool $ echo Whether to echothe results, or return them instead.942 * @param bool $display Whether to display the results, or return them instead. 943 943 * @return null|string 944 944 */ 945 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 947 _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' ); 948 948 … … 1019 1019 } // End while. 1020 1020 1021 if ( !$ echo)1021 if ( !$display ) 1022 1022 return $output; 1023 1023 echo $output; … … 1150 1150 * @see get_category_feed_link() 1151 1151 * 1152 * @param bool $ echo1152 * @param bool $display 1153 1153 * @param int $cat_ID 1154 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 1157 _deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' ); 1158 1158 1159 1159 $link = get_category_feed_link($cat_ID, 'rss2'); 1160 1160 1161 if ( $ echo)1161 if ( $display ) 1162 1162 echo $link; 1163 1163 return $link; … … 1171 1171 * @see get_author_feed_link() 1172 1172 * 1173 * @param bool $ echo1173 * @param bool $display 1174 1174 * @param int $author_id 1175 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 1178 _deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' ); 1179 1179 1180 1180 $link = get_author_feed_link($author_id); 1181 if ( $ echo)1181 if ( $display ) 1182 1182 echo $link; 1183 1183 return $link; … … 2071 2071 * @see esc_html() 2072 2072 * 2073 * @param string $ string Stringto escape.2073 * @param string $text Text to escape. 2074 2074 * @param string $quote_style Unused. 2075 2075 * @param false|string $charset Unused. 2076 2076 * @param false $double_encode Whether to double encode. Unused. 2077 * @return string Escaped `$ string`.2078 */ 2079 function wp_specialchars( $ string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {2077 * @return string Escaped `$text`. 2078 */ 2079 function wp_specialchars( $text, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) { 2080 2080 _deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' ); 2081 2081 if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments. 2082 return _wp_specialchars( $ string, $quote_style, $charset, $double_encode );2082 return _wp_specialchars( $text, $quote_style, $charset, $double_encode ); 2083 2083 } else { 2084 return esc_html( $ string);2084 return esc_html( $text ); 2085 2085 } 2086 2086 } … … 2859 2859 * @link https://www.php.net/manual/en/function.error-log.php 2860 2860 * 2861 * @param mixed $fp Unused.2862 * @param string $ stringMessage to log.2863 */ 2864 function debug_fwrite( $fp, $ string) {2861 * @param mixed $fp Unused. 2862 * @param string $message Message to log. 2863 */ 2864 function debug_fwrite( $fp, $message ) { 2865 2865 _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' ); 2866 2866 if ( ! empty( $GLOBALS['debug'] ) ) 2867 error_log( $ string);2867 error_log( $message ); 2868 2868 } 2869 2869 … … 3821 3821 * @deprecated 4.7.0 Officially dropped security support for Netscape 4. 3822 3822 * 3823 * @param string $ string3823 * @param string $content 3824 3824 * @return string 3825 3825 */ 3826 function wp_kses_js_entities( $ string) {3826 function wp_kses_js_entities( $content ) { 3827 3827 _deprecated_function( __FUNCTION__, '4.7.0' ); 3828 3828 3829 return preg_replace( '%&\s*\{[^}]*(\}\s*;?|$)%', '', $ string);3829 return preg_replace( '%&\s*\{[^}]*(\}\s*;?|$)%', '', $content ); 3830 3830 } 3831 3831
Note: See TracChangeset
for help on using the changeset viewer.