wp/wp-includes/deprecated.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
    11 /*
    11 /*
    12  * Deprecated functions come here to die.
    12  * Deprecated functions come here to die.
    13  */
    13  */
    14 
    14 
    15 /**
    15 /**
    16  * Entire Post data.
    16  * Retrieves all post data for a given post.
    17  *
    17  *
    18  * @since 0.71
    18  * @since 0.71
    19  * @deprecated 1.5.1
    19  * @deprecated 1.5.1 Use get_post()
    20  * @deprecated Use get_post()
       
    21  * @see get_post()
    20  * @see get_post()
    22  *
    21  *
    23  * @param int $postid
    22  * @param int $postid Post ID.
    24  * @return array
    23  * @return array Post data.
    25  */
    24  */
    26 function get_postdata($postid) {
    25 function get_postdata($postid) {
    27 	_deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );
    26 	_deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );
    28 
    27 
    29 	$post = get_post($postid);
    28 	$post = get_post($postid);
    50 }
    49 }
    51 
    50 
    52 /**
    51 /**
    53  * Sets up the WordPress Loop.
    52  * Sets up the WordPress Loop.
    54  *
    53  *
       
    54  * Use The Loop instead.
       
    55  *
       
    56  * @link https://codex.wordpress.org/The_Loop
       
    57  *
    55  * @since 1.0.1
    58  * @since 1.0.1
    56  * @deprecated 1.5.0
    59  * @deprecated 1.5.0
    57  * @deprecated Use The Loop - {@link https://codex.wordpress.org/The_Loop Use new WordPress Loop}
       
    58  */
    60  */
    59 function start_wp() {
    61 function start_wp() {
    60 	global $wp_query;
    62 	global $wp_query;
    61 
    63 
    62 	_deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') );
    64 	_deprecated_function( __FUNCTION__, '1.5.0', __('new WordPress Loop') );
    63 
    65 
    64 	// Since the old style loop is being used, advance the query iterator here.
    66 	// Since the old style loop is being used, advance the query iterator here.
    65 	$wp_query->next_post();
    67 	$wp_query->next_post();
    66 
    68 
    67 	setup_postdata( get_post() );
    69 	setup_postdata( get_post() );
    68 }
    70 }
    69 
    71 
    70 /**
    72 /**
    71  * Return or Print Category ID.
    73  * Returns or prints a category ID.
    72  *
    74  *
    73  * @since 0.71
    75  * @since 0.71
    74  * @deprecated 0.71
    76  * @deprecated 0.71 Use get_the_category()
    75  * @deprecated use get_the_category()
       
    76  * @see get_the_category()
    77  * @see get_the_category()
    77  *
    78  *
    78  * @param bool $echo
    79  * @param bool $echo Optional. Whether to echo the output. Default true.
    79  * @return null|int
    80  * @return int Category ID.
    80  */
    81  */
    81 function the_category_ID($echo = true) {
    82 function the_category_ID($echo = true) {
    82 	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
    83 	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
    83 
    84 
    84 	// Grab the first cat in the list.
    85 	// Grab the first cat in the list.
    90 
    91 
    91 	return $cat;
    92 	return $cat;
    92 }
    93 }
    93 
    94 
    94 /**
    95 /**
    95  * Print category with optional text before and after.
    96  * Prints a category with optional text before and after.
    96  *
    97  *
    97  * @since 0.71
    98  * @since 0.71
    98  * @deprecated 0.71
    99  * @deprecated 0.71 Use get_the_category_by_ID()
    99  * @deprecated use get_the_category_by_ID()
       
   100  * @see get_the_category_by_ID()
   100  * @see get_the_category_by_ID()
   101  *
   101  *
   102  * @param string $before
   102  * @param string $before Optional. Text to display before the category. Default empty.
   103  * @param string $after
   103  * @param string $after  Optional. Text to display after the category. Default empty.
   104  */
   104  */
   105 function the_category_head($before='', $after='') {
   105 function the_category_head( $before = '', $after = '' ) {
   106 	global $currentcat, $previouscat;
   106 	global $currentcat, $previouscat;
   107 
   107 
   108 	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category_by_ID()' );
   108 	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category_by_ID()' );
   109 
   109 
   110 	// Grab the first cat in the list.
   110 	// Grab the first cat in the list.
   117 		$previouscat = $currentcat;
   117 		$previouscat = $currentcat;
   118 	}
   118 	}
   119 }
   119 }
   120 
   120 
   121 /**
   121 /**
   122  * Prints link to the previous post.
   122  * Prints a link to the previous post.
   123  *
   123  *
   124  * @since 1.5.0
   124  * @since 1.5.0
   125  * @deprecated 2.0.0
   125  * @deprecated 2.0.0 Use previous_post_link()
   126  * @deprecated Use previous_post_link()
       
   127  * @see previous_post_link()
   126  * @see previous_post_link()
   128  *
   127  *
   129  * @param string $format
   128  * @param string $format
   130  * @param string $previous
   129  * @param string $previous
   131  * @param string $title
   130  * @param string $title
   132  * @param string $in_same_cat
   131  * @param string $in_same_cat
   133  * @param int $limitprev
   132  * @param int    $limitprev
   134  * @param string $excluded_categories
   133  * @param string $excluded_categories
   135  */
   134  */
   136 function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
   135 function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
   137 
   136 
   138 	_deprecated_function( __FUNCTION__, '2.0', 'previous_post_link()' );
   137 	_deprecated_function( __FUNCTION__, '2.0.0', 'previous_post_link()' );
   139 
   138 
   140 	if ( empty($in_same_cat) || 'no' == $in_same_cat )
   139 	if ( empty($in_same_cat) || 'no' == $in_same_cat )
   141 		$in_same_cat = false;
   140 		$in_same_cat = false;
   142 	else
   141 	else
   143 		$in_same_cat = true;
   142 		$in_same_cat = true;
   157 
   156 
   158 /**
   157 /**
   159  * Prints link to the next post.
   158  * Prints link to the next post.
   160  *
   159  *
   161  * @since 0.71
   160  * @since 0.71
   162  * @deprecated 2.0.0
   161  * @deprecated 2.0.0 Use next_post_link()
   163  * @deprecated Use next_post_link()
       
   164  * @see next_post_link()
   162  * @see next_post_link()
   165  *
   163  *
   166  * @param string $format
   164  * @param string $format
   167  * @param string $next
   165  * @param string $next
   168  * @param string $title
   166  * @param string $title
   169  * @param string $in_same_cat
   167  * @param string $in_same_cat
   170  * @param int $limitnext
   168  * @param int $limitnext
   171  * @param string $excluded_categories
   169  * @param string $excluded_categories
   172  */
   170  */
   173 function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
   171 function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
   174 	_deprecated_function( __FUNCTION__, '2.0', 'next_post_link()' );
   172 	_deprecated_function( __FUNCTION__, '2.0.0', 'next_post_link()' );
   175 
   173 
   176 	if ( empty($in_same_cat) || 'no' == $in_same_cat )
   174 	if ( empty($in_same_cat) || 'no' == $in_same_cat )
   177 		$in_same_cat = false;
   175 		$in_same_cat = false;
   178 	else
   176 	else
   179 		$in_same_cat = true;
   177 		$in_same_cat = true;
   193 
   191 
   194 /**
   192 /**
   195  * Whether user can create a post.
   193  * Whether user can create a post.
   196  *
   194  *
   197  * @since 1.5.0
   195  * @since 1.5.0
   198  * @deprecated 2.0.0
   196  * @deprecated 2.0.0 Use current_user_can()
   199  * @deprecated Use current_user_can()
       
   200  * @see current_user_can()
   197  * @see current_user_can()
   201  *
   198  *
   202  * @param int $user_id
   199  * @param int $user_id
   203  * @param int $blog_id Not Used
   200  * @param int $blog_id Not Used
   204  * @param int $category_id Not Used
   201  * @param int $category_id Not Used
   205  * @return bool
   202  * @return bool
   206  */
   203  */
   207 function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
   204 function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
   208 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   205 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   209 
   206 
   210 	$author_data = get_userdata($user_id);
   207 	$author_data = get_userdata($user_id);
   211 	return ($author_data->user_level > 1);
   208 	return ($author_data->user_level > 1);
   212 }
   209 }
   213 
   210 
   214 /**
   211 /**
   215  * Whether user can create a post.
   212  * Whether user can create a post.
   216  *
   213  *
   217  * @since 1.5.0
   214  * @since 1.5.0
   218  * @deprecated 2.0.0
   215  * @deprecated 2.0.0 Use current_user_can()
   219  * @deprecated Use current_user_can()
       
   220  * @see current_user_can()
   216  * @see current_user_can()
   221  *
   217  *
   222  * @param int $user_id
   218  * @param int $user_id
   223  * @param int $blog_id Not Used
   219  * @param int $blog_id Not Used
   224  * @param int $category_id Not Used
   220  * @param int $category_id Not Used
   225  * @return bool
   221  * @return bool
   226  */
   222  */
   227 function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
   223 function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
   228 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   224 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   229 
   225 
   230 	$author_data = get_userdata($user_id);
   226 	$author_data = get_userdata($user_id);
   231 	return ($author_data->user_level >= 1);
   227 	return ($author_data->user_level >= 1);
   232 }
   228 }
   233 
   229 
   234 /**
   230 /**
   235  * Whether user can edit a post.
   231  * Whether user can edit a post.
   236  *
   232  *
   237  * @since 1.5.0
   233  * @since 1.5.0
   238  * @deprecated 2.0.0
   234  * @deprecated 2.0.0 Use current_user_can()
   239  * @deprecated Use current_user_can()
       
   240  * @see current_user_can()
   235  * @see current_user_can()
   241  *
   236  *
   242  * @param int $user_id
   237  * @param int $user_id
   243  * @param int $post_id
   238  * @param int $post_id
   244  * @param int $blog_id Not Used
   239  * @param int $blog_id Not Used
   245  * @return bool
   240  * @return bool
   246  */
   241  */
   247 function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
   242 function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
   248 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   243 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   249 
   244 
   250 	$author_data = get_userdata($user_id);
   245 	$author_data = get_userdata($user_id);
   251 	$post = get_post($post_id);
   246 	$post = get_post($post_id);
   252 	$post_author_data = get_userdata($post->post_author);
   247 	$post_author_data = get_userdata($post->post_author);
   253 
   248 
   262 
   257 
   263 /**
   258 /**
   264  * Whether user can delete a post.
   259  * Whether user can delete a post.
   265  *
   260  *
   266  * @since 1.5.0
   261  * @since 1.5.0
   267  * @deprecated 2.0.0
   262  * @deprecated 2.0.0 Use current_user_can()
   268  * @deprecated Use current_user_can()
       
   269  * @see current_user_can()
   263  * @see current_user_can()
   270  *
   264  *
   271  * @param int $user_id
   265  * @param int $user_id
   272  * @param int $post_id
   266  * @param int $post_id
   273  * @param int $blog_id Not Used
   267  * @param int $blog_id Not Used
   274  * @return bool
   268  * @return bool
   275  */
   269  */
   276 function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
   270 function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
   277 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   271 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   278 
   272 
   279 	// right now if one can edit, one can delete
   273 	// right now if one can edit, one can delete
   280 	return user_can_edit_post($user_id, $post_id, $blog_id);
   274 	return user_can_edit_post($user_id, $post_id, $blog_id);
   281 }
   275 }
   282 
   276 
   283 /**
   277 /**
   284  * Whether user can set new posts' dates.
   278  * Whether user can set new posts' dates.
   285  *
   279  *
   286  * @since 1.5.0
   280  * @since 1.5.0
   287  * @deprecated 2.0.0
   281  * @deprecated 2.0.0 Use current_user_can()
   288  * @deprecated Use current_user_can()
       
   289  * @see current_user_can()
   282  * @see current_user_can()
   290  *
   283  *
   291  * @param int $user_id
   284  * @param int $user_id
   292  * @param int $blog_id Not Used
   285  * @param int $blog_id Not Used
   293  * @param int $category_id Not Used
   286  * @param int $category_id Not Used
   294  * @return bool
   287  * @return bool
   295  */
   288  */
   296 function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
   289 function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
   297 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   290 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   298 
   291 
   299 	$author_data = get_userdata($user_id);
   292 	$author_data = get_userdata($user_id);
   300 	return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
   293 	return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
   301 }
   294 }
   302 
   295 
   303 /**
   296 /**
   304  * Whether user can delete a post.
   297  * Whether user can delete a post.
   305  *
   298  *
   306  * @since 1.5.0
   299  * @since 1.5.0
   307  * @deprecated 2.0.0
   300  * @deprecated 2.0.0 Use current_user_can()
   308  * @deprecated Use current_user_can()
       
   309  * @see current_user_can()
   301  * @see current_user_can()
   310  *
   302  *
   311  * @param int $user_id
   303  * @param int $user_id
   312  * @param int $post_id
   304  * @param int $post_id
   313  * @param int $blog_id Not Used
   305  * @param int $blog_id Not Used
   314  * @return bool returns true if $user_id can edit $post_id's date
   306  * @return bool returns true if $user_id can edit $post_id's date
   315  */
   307  */
   316 function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
   308 function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
   317 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   309 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   318 
   310 
   319 	$author_data = get_userdata($user_id);
   311 	$author_data = get_userdata($user_id);
   320 	return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
   312 	return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
   321 }
   313 }
   322 
   314 
   323 /**
   315 /**
   324  * Whether user can delete a post.
   316  * Whether user can delete a post.
   325  *
   317  *
   326  * @since 1.5.0
   318  * @since 1.5.0
   327  * @deprecated 2.0.0
   319  * @deprecated 2.0.0 Use current_user_can()
   328  * @deprecated Use current_user_can()
       
   329  * @see current_user_can()
   320  * @see current_user_can()
   330  *
   321  *
   331  * @param int $user_id
   322  * @param int $user_id
   332  * @param int $post_id
   323  * @param int $post_id
   333  * @param int $blog_id Not Used
   324  * @param int $blog_id Not Used
   334  * @return bool returns true if $user_id can edit $post_id's comments
   325  * @return bool returns true if $user_id can edit $post_id's comments
   335  */
   326  */
   336 function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
   327 function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
   337 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   328 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   338 
   329 
   339 	// right now if one can edit a post, one can edit comments made on it
   330 	// right now if one can edit a post, one can edit comments made on it
   340 	return user_can_edit_post($user_id, $post_id, $blog_id);
   331 	return user_can_edit_post($user_id, $post_id, $blog_id);
   341 }
   332 }
   342 
   333 
   343 /**
   334 /**
   344  * Whether user can delete a post.
   335  * Whether user can delete a post.
   345  *
   336  *
   346  * @since 1.5.0
   337  * @since 1.5.0
   347  * @deprecated 2.0.0
   338  * @deprecated 2.0.0 Use current_user_can()
   348  * @deprecated Use current_user_can()
       
   349  * @see current_user_can()
   339  * @see current_user_can()
   350  *
   340  *
   351  * @param int $user_id
   341  * @param int $user_id
   352  * @param int $post_id
   342  * @param int $post_id
   353  * @param int $blog_id Not Used
   343  * @param int $blog_id Not Used
   354  * @return bool returns true if $user_id can delete $post_id's comments
   344  * @return bool returns true if $user_id can delete $post_id's comments
   355  */
   345  */
   356 function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
   346 function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
   357 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   347 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   358 
   348 
   359 	// right now if one can edit comments, one can delete comments
   349 	// right now if one can edit comments, one can delete comments
   360 	return user_can_edit_post_comments($user_id, $post_id, $blog_id);
   350 	return user_can_edit_post_comments($user_id, $post_id, $blog_id);
   361 }
   351 }
   362 
   352 
   363 /**
   353 /**
   364  * Can user can edit other user.
   354  * Can user can edit other user.
   365  *
   355  *
   366  * @since 1.5.0
   356  * @since 1.5.0
   367  * @deprecated 2.0.0
   357  * @deprecated 2.0.0 Use current_user_can()
   368  * @deprecated Use current_user_can()
       
   369  * @see current_user_can()
   358  * @see current_user_can()
   370  *
   359  *
   371  * @param int $user_id
   360  * @param int $user_id
   372  * @param int $other_user
   361  * @param int $other_user
   373  * @return bool
   362  * @return bool
   374  */
   363  */
   375 function user_can_edit_user($user_id, $other_user) {
   364 function user_can_edit_user($user_id, $other_user) {
   376 	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
   365 	_deprecated_function( __FUNCTION__, '2.0.0', 'current_user_can()' );
   377 
   366 
   378 	$user  = get_userdata($user_id);
   367 	$user  = get_userdata($user_id);
   379 	$other = get_userdata($other_user);
   368 	$other = get_userdata($other_user);
   380 	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
   369 	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
   381 		return true;
   370 		return true;
   385 
   374 
   386 /**
   375 /**
   387  * Gets the links associated with category $cat_name.
   376  * Gets the links associated with category $cat_name.
   388  *
   377  *
   389  * @since 0.71
   378  * @since 0.71
   390  * @deprecated 2.1.0
   379  * @deprecated 2.1.0 Use get_bookmarks()
   391  * @deprecated Use get_bookmarks()
       
   392  * @see get_bookmarks()
   380  * @see get_bookmarks()
   393  *
   381  *
   394  * @param string $cat_name Optional. The category name to use. If no match is found uses all.
   382  * @param string $cat_name Optional. The category name to use. If no match is found uses all.
   395  * @param string $before Optional. The html to output before the link.
   383  * @param string $before Optional. The html to output before the link.
   396  * @param string $after Optional. The html to output after the link.
   384  * @param string $after Optional. The html to output after the link.
   405  * @param int $show_updated Optional. Whether to show last updated timestamp
   393  * @param int $show_updated Optional. Whether to show last updated timestamp
   406  */
   394  */
   407 function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
   395 function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
   408 						 $show_description = true, $show_rating = false,
   396 						 $show_description = true, $show_rating = false,
   409 						 $limit = -1, $show_updated = 0) {
   397 						 $limit = -1, $show_updated = 0) {
   410 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
   398 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   411 
   399 
   412 	$cat_id = -1;
   400 	$cat_id = -1;
   413 	$cat = get_term_by('name', $cat_name, 'link_category');
   401 	$cat = get_term_by('name', $cat_name, 'link_category');
   414 	if ( $cat )
   402 	if ( $cat )
   415 		$cat_id = $cat->term_id;
   403 		$cat_id = $cat->term_id;
   419 
   407 
   420 /**
   408 /**
   421  * Gets the links associated with the named category.
   409  * Gets the links associated with the named category.
   422  *
   410  *
   423  * @since 1.0.1
   411  * @since 1.0.1
   424  * @deprecated 2.1.0
   412  * @deprecated 2.1.0 Use wp_list_bookmarks()
   425  * @deprecated Use wp_list_bookmarks()
       
   426  * @see wp_list_bookmarks()
   413  * @see wp_list_bookmarks()
   427  *
   414  *
   428  * @param string $category The category to use.
   415  * @param string $category The category to use.
   429  * @param string $args
   416  * @param string $args
   430  * @return string|null
   417  * @return string|null
   431  */
   418  */
   432 function wp_get_linksbyname($category, $args = '') {
   419 function wp_get_linksbyname($category, $args = '') {
   433 	_deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()');
   420 	_deprecated_function(__FUNCTION__, '2.1.0', 'wp_list_bookmarks()');
   434 
   421 
   435 	$defaults = array(
   422 	$defaults = array(
   436 		'after' => '<br />',
   423 		'after' => '<br />',
   437 		'before' => '',
   424 		'before' => '',
   438 		'categorize' => 0,
   425 		'categorize' => 0,
   455  *     foreach ( $links as $link ) {
   442  *     foreach ( $links as $link ) {
   456  *      	echo '<li>' . $link->link_name . '</li>';
   443  *      	echo '<li>' . $link->link_name . '</li>';
   457  *     }
   444  *     }
   458  *
   445  *
   459  * @since 1.0.1
   446  * @since 1.0.1
   460  * @deprecated 2.1.0
   447  * @deprecated 2.1.0 Use get_bookmarks()
   461  * @deprecated Use get_bookmarks()
       
   462  * @see get_bookmarks()
   448  * @see get_bookmarks()
   463  *
   449  *
   464  * @param string $cat_name The category name to use. If no match is found uses all.
   450  * @param string $cat_name The category name to use. If no match is found uses all.
   465  * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'.
   451  * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'.
   466  *		Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
   452  *		Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
   467  *		specify 'rand' as the order which will return links in a random order.
   453  *		specify 'rand' as the order which will return links in a random order.
   468  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   454  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   469  * @return array
   455  * @return array
   470  */
   456  */
   471 function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
   457 function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
   472 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
   458 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   473 
   459 
   474 	$cat_id = -1;
   460 	$cat_id = -1;
   475 	$cat = get_term_by('name', $cat_name, 'link_category');
   461 	$cat = get_term_by('name', $cat_name, 'link_category');
   476 	if ( $cat )
   462 	if ( $cat )
   477 		$cat_id = $cat->term_id;
   463 		$cat_id = $cat->term_id;
   506  * - link_updated
   492  * - link_updated
   507  * - link_rel
   493  * - link_rel
   508  * - link_notes
   494  * - link_notes
   509  *
   495  *
   510  * @since 1.0.1
   496  * @since 1.0.1
   511  * @deprecated 2.1.0
   497  * @deprecated 2.1.0 Use get_bookmarks()
   512  * @deprecated Use get_bookmarks()
       
   513  * @see get_bookmarks()
   498  * @see get_bookmarks()
   514  *
   499  *
   515  * @param int $category The category to use. If no category supplied uses all
   500  * @param int $category The category to use. If no category supplied uses all
   516  * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
   501  * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
   517  *		'description', or 'rating'. Or maybe owner. If you start the name with an
   502  *		'description', or 'rating'. Or maybe owner. If you start the name with an
   519  *		order which will return links in a random order.
   504  *		order which will return links in a random order.
   520  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   505  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   521  * @return array
   506  * @return array
   522  */
   507  */
   523 function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
   508 function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
   524 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
   509 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   525 
   510 
   526 	$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
   511 	$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
   527 
   512 
   528 	$links_array = array();
   513 	$links_array = array();
   529 	foreach ($links as $link)
   514 	foreach ($links as $link)
   534 
   519 
   535 /**
   520 /**
   536  * Gets the links associated with category 'cat_name' and display rating stars/chars.
   521  * Gets the links associated with category 'cat_name' and display rating stars/chars.
   537  *
   522  *
   538  * @since 0.71
   523  * @since 0.71
   539  * @deprecated 2.1.0
   524  * @deprecated 2.1.0 Use get_bookmarks()
   540  * @deprecated Use get_bookmarks()
       
   541  * @see get_bookmarks()
   525  * @see get_bookmarks()
   542  *
   526  *
   543  * @param string $cat_name The category name to use. If no match is found uses all
   527  * @param string $cat_name The category name to use. If no match is found uses all
   544  * @param string $before The html to output before the link
   528  * @param string $before The html to output before the link
   545  * @param string $after The html to output after the link
   529  * @param string $after The html to output after the link
   553  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   537  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   554  * @param int $show_updated Whether to show last updated timestamp
   538  * @param int $show_updated Whether to show last updated timestamp
   555  */
   539  */
   556 function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
   540 function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
   557 									$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
   541 									$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
   558 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
   542 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   559 
   543 
   560 	get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
   544 	get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
   561 }
   545 }
   562 
   546 
   563 /**
   547 /**
   564  * Gets the links associated with category n and display rating stars/chars.
   548  * Gets the links associated with category n and display rating stars/chars.
   565  *
   549  *
   566  * @since 0.71
   550  * @since 0.71
   567  * @deprecated 2.1.0
   551  * @deprecated 2.1.0 Use get_bookmarks()
   568  * @deprecated Use get_bookmarks()
       
   569  * @see get_bookmarks()
   552  * @see get_bookmarks()
   570  *
   553  *
   571  * @param int $category The category to use. If no category supplied uses all
   554  * @param int $category The category to use. If no category supplied uses all
   572  * @param string $before The html to output before the link
   555  * @param string $before The html to output before the link
   573  * @param string $after The html to output after the link
   556  * @param string $after The html to output after the link
   581  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   564  * @param int $limit Limit to X entries. If not specified, all entries are shown.
   582  * @param int $show_updated Whether to show last updated timestamp
   565  * @param int $show_updated Whether to show last updated timestamp
   583  */
   566  */
   584 function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
   567 function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
   585 							  $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
   568 							  $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
   586 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
   569 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   587 
   570 
   588 	get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
   571 	get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
   589 }
   572 }
   590 
   573 
   591 /**
   574 /**
   592  * Gets the auto_toggle setting.
   575  * Gets the auto_toggle setting.
   593  *
   576  *
   594  * @since 0.71
   577  * @since 0.71
   595  * @deprecated 2.1.0
   578  * @deprecated 2.1.0
   596  * @deprecated No alternative function available
       
   597  *
   579  *
   598  * @param int $id The category to get. If no category supplied uses 0
   580  * @param int $id The category to get. If no category supplied uses 0
   599  * @return int Only returns 0.
   581  * @return int Only returns 0.
   600  */
   582  */
   601 function get_autotoggle($id = 0) {
   583 function get_autotoggle($id = 0) {
   602 	_deprecated_function( __FUNCTION__, '2.1' );
   584 	_deprecated_function( __FUNCTION__, '2.1.0' );
   603 	return 0;
   585 	return 0;
   604 }
   586 }
   605 
   587 
   606 /**
   588 /**
   607  * @since 0.71
   589  * Lists categories.
   608  * @deprecated 2.1.0
   590  *
   609  * @deprecated Use wp_list_categories()
   591  * @since 0.71
       
   592  * @deprecated 2.1.0 Use wp_list_categories()
   610  * @see wp_list_categories()
   593  * @see wp_list_categories()
   611  *
   594  *
   612  * @param int $optionall
   595  * @param int $optionall
   613  * @param string $all
   596  * @param string $all
   614  * @param string $sort_column
   597  * @param string $sort_column
   630  * @return false|null
   613  * @return false|null
   631  */
   614  */
   632 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
   615 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
   633 				   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
   616 				   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
   634 				   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
   617 				   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
   635 	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
   618 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
   636 
   619 
   637 	$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
   620 	$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
   638 		'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
   621 		'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
   639 	return wp_list_cats($query);
   622 	return wp_list_cats($query);
   640 }
   623 }
   641 
   624 
   642 /**
   625 /**
       
   626  * Lists categories.
       
   627  *
   643  * @since 1.2.0
   628  * @since 1.2.0
   644  * @deprecated 2.1.0
   629  * @deprecated 2.1.0 Use wp_list_categories()
   645  * @deprecated Use wp_list_categories()
       
   646  * @see wp_list_categories()
   630  * @see wp_list_categories()
   647  *
   631  *
   648  * @param string|array $args
   632  * @param string|array $args
   649  * @return false|null|string
   633  * @return false|null|string
   650  */
   634  */
   651 function wp_list_cats($args = '') {
   635 function wp_list_cats($args = '') {
   652 	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
   636 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
   653 
   637 
   654 	$r = wp_parse_args( $args );
   638 	$r = wp_parse_args( $args );
   655 
   639 
   656 	// Map to new names.
   640 	// Map to new names.
   657 	if ( isset($r['optionall']) && isset($r['all']))
   641 	if ( isset($r['optionall']) && isset($r['all']))
   670 
   654 
   671 	return wp_list_categories($r);
   655 	return wp_list_categories($r);
   672 }
   656 }
   673 
   657 
   674 /**
   658 /**
   675  * @since 0.71
   659  * Deprecated method for generating a drop-down of categories.
   676  * @deprecated 2.1.0
   660  *
   677  * @deprecated Use wp_dropdown_categories()
   661  * @since 0.71
       
   662  * @deprecated 2.1.0 Use wp_dropdown_categories()
   678  * @see wp_dropdown_categories()
   663  * @see wp_dropdown_categories()
   679  *
   664  *
   680  * @param int $optionall
   665  * @param int $optionall
   681  * @param string $all
   666  * @param string $all
   682  * @param string $orderby
   667  * @param string $orderby
   690  * @return string
   675  * @return string
   691  */
   676  */
   692 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
   677 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
   693 		$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
   678 		$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
   694 		$selected = 0, $exclude = 0) {
   679 		$selected = 0, $exclude = 0) {
   695 	_deprecated_function( __FUNCTION__, '2.1', 'wp_dropdown_categories()' );
   680 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );
   696 
   681 
   697 	$show_option_all = '';
   682 	$show_option_all = '';
   698 	if ( $optionall )
   683 	if ( $optionall )
   699 		$show_option_all = $all;
   684 		$show_option_all = $all;
   700 
   685 
   707 	$query = add_query_arg($vars, '');
   692 	$query = add_query_arg($vars, '');
   708 	return wp_dropdown_categories($query);
   693 	return wp_dropdown_categories($query);
   709 }
   694 }
   710 
   695 
   711 /**
   696 /**
   712  * List authors.
   697  * Lists authors.
   713  *
   698  *
   714  * @since 1.2.0
   699  * @since 1.2.0
   715  * @deprecated 2.1.0
   700  * @deprecated 2.1.0 Use wp_list_authors()
   716  * @deprecated Use wp_list_authors()
       
   717  * @see wp_list_authors()
   701  * @see wp_list_authors()
   718  *
   702  *
   719  * @param bool $optioncount
   703  * @param bool $optioncount
   720  * @param bool $exclude_admin
   704  * @param bool $exclude_admin
   721  * @param bool $show_fullname
   705  * @param bool $show_fullname
   723  * @param string $feed
   707  * @param string $feed
   724  * @param string $feed_image
   708  * @param string $feed_image
   725  * @return null|string
   709  * @return null|string
   726  */
   710  */
   727 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
   711 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
   728 	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' );
   712 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_authors()' );
   729 
   713 
   730 	$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
   714 	$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
   731 	return wp_list_authors($args);
   715 	return wp_list_authors($args);
   732 }
   716 }
   733 
   717 
   734 /**
   718 /**
       
   719  * Retrieves a list of post categories.
       
   720  *
   735  * @since 1.0.1
   721  * @since 1.0.1
   736  * @deprecated 2.1.0
   722  * @deprecated 2.1.0 Use wp_get_post_categories()
   737  * @deprecated Use wp_get_post_categories()
       
   738  * @see wp_get_post_categories()
   723  * @see wp_get_post_categories()
   739  *
   724  *
   740  * @param int $blogid Not Used
   725  * @param int $blogid Not Used
   741  * @param int $post_ID
   726  * @param int $post_ID
   742  * @return array
   727  * @return array
   743  */
   728  */
   744 function wp_get_post_cats($blogid = '1', $post_ID = 0) {
   729 function wp_get_post_cats($blogid = '1', $post_ID = 0) {
   745 	_deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' );
   730 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_post_categories()' );
   746 	return wp_get_post_categories($post_ID);
   731 	return wp_get_post_categories($post_ID);
   747 }
   732 }
   748 
   733 
   749 /**
   734 /**
   750  * Sets the categories that the post id belongs to.
   735  * Sets the categories that the post id belongs to.
   758  * @param int $post_ID
   743  * @param int $post_ID
   759  * @param array $post_categories
   744  * @param array $post_categories
   760  * @return bool|mixed
   745  * @return bool|mixed
   761  */
   746  */
   762 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
   747 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
   763 	_deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' );
   748 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_set_post_categories()' );
   764 	return wp_set_post_categories($post_ID, $post_categories);
   749 	return wp_set_post_categories($post_ID, $post_categories);
   765 }
   750 }
   766 
   751 
   767 /**
   752 /**
   768  * @since 0.71
   753  * Retrieves a list of archives.
   769  * @deprecated 2.1.0
   754  *
   770  * @deprecated Use wp_get_archives()
   755  * @since 0.71
       
   756  * @deprecated 2.1.0 Use wp_get_archives()
   771  * @see wp_get_archives()
   757  * @see wp_get_archives()
   772  *
   758  *
   773  * @param string $type
   759  * @param string $type
   774  * @param string $limit
   760  * @param string $limit
   775  * @param string $format
   761  * @param string $format
   777  * @param string $after
   763  * @param string $after
   778  * @param bool $show_post_count
   764  * @param bool $show_post_count
   779  * @return string|null
   765  * @return string|null
   780  */
   766  */
   781 function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
   767 function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
   782 	_deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' );
   768 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' );
   783 	$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
   769 	$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
   784 	return wp_get_archives($args);
   770 	return wp_get_archives($args);
   785 }
   771 }
   786 
   772 
   787 /**
   773 /**
   788  * Returns or Prints link to the author's posts.
   774  * Returns or Prints link to the author's posts.
   789  *
   775  *
   790  * @since 1.2.0
   776  * @since 1.2.0
   791  * @deprecated 2.1.0
   777  * @deprecated 2.1.0 Use get_author_posts_url()
   792  * @deprecated Use get_author_posts_url()
       
   793  * @see get_author_posts_url()
   778  * @see get_author_posts_url()
   794  *
   779  *
   795  * @param bool $echo
   780  * @param bool $echo
   796  * @param int $author_id
   781  * @param int $author_id
   797  * @param string $author_nicename Optional.
   782  * @param string $author_nicename Optional.
   798  * @return string|null
   783  * @return string|null
   799  */
   784  */
   800 function get_author_link($echo, $author_id, $author_nicename = '') {
   785 function get_author_link($echo, $author_id, $author_nicename = '') {
   801 	_deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' );
   786 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
   802 
   787 
   803 	$link = get_author_posts_url($author_id, $author_nicename);
   788 	$link = get_author_posts_url($author_id, $author_nicename);
   804 
   789 
   805 	if ( $echo )
   790 	if ( $echo )
   806 		echo $link;
   791 		echo $link;
   809 
   794 
   810 /**
   795 /**
   811  * Print list of pages based on arguments.
   796  * Print list of pages based on arguments.
   812  *
   797  *
   813  * @since 0.71
   798  * @since 0.71
   814  * @deprecated 2.1.0
   799  * @deprecated 2.1.0 Use wp_link_pages()
   815  * @deprecated Use wp_link_pages()
       
   816  * @see wp_link_pages()
   800  * @see wp_link_pages()
   817  *
   801  *
   818  * @param string $before
   802  * @param string $before
   819  * @param string $after
   803  * @param string $after
   820  * @param string $next_or_number
   804  * @param string $next_or_number
   824  * @param string $more_file
   808  * @param string $more_file
   825  * @return string
   809  * @return string
   826  */
   810  */
   827 function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
   811 function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
   828 					$pagelink='%', $more_file='') {
   812 					$pagelink='%', $more_file='') {
   829 	_deprecated_function( __FUNCTION__, '2.1', 'wp_link_pages()' );
   813 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );
   830 
   814 
   831 	$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
   815 	$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
   832 	return wp_link_pages($args);
   816 	return wp_link_pages($args);
   833 }
   817 }
   834 
   818 
   835 /**
   819 /**
   836  * Get value based on option.
   820  * Get value based on option.
   837  *
   821  *
   838  * @since 0.71
   822  * @since 0.71
   839  * @deprecated 2.1.0
   823  * @deprecated 2.1.0 Use get_option()
   840  * @deprecated Use get_option()
       
   841  * @see get_option()
   824  * @see get_option()
   842  *
   825  *
   843  * @param string $option
   826  * @param string $option
   844  * @return string
   827  * @return string
   845  */
   828  */
   846 function get_settings($option) {
   829 function get_settings($option) {
   847 	_deprecated_function( __FUNCTION__, '2.1', 'get_option()' );
   830 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_option()' );
   848 
   831 
   849 	return get_option($option);
   832 	return get_option($option);
   850 }
   833 }
   851 
   834 
   852 /**
   835 /**
   853  * Print the permalink of the current post in the loop.
   836  * Print the permalink of the current post in the loop.
   854  *
   837  *
   855  * @since 0.71
   838  * @since 0.71
   856  * @deprecated 1.2.0
   839  * @deprecated 1.2.0 Use the_permalink()
   857  * @deprecated Use the_permalink()
       
   858  * @see the_permalink()
   840  * @see the_permalink()
   859  */
   841  */
   860 function permalink_link() {
   842 function permalink_link() {
   861 	_deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' );
   843 	_deprecated_function( __FUNCTION__, '1.2.0', 'the_permalink()' );
   862 	the_permalink();
   844 	the_permalink();
   863 }
   845 }
   864 
   846 
   865 /**
   847 /**
   866  * Print the permalink to the RSS feed.
   848  * Print the permalink to the RSS feed.
   867  *
   849  *
   868  * @since 0.71
   850  * @since 0.71
   869  * @deprecated 2.3.0
   851  * @deprecated 2.3.0 Use the_permalink_rss()
   870  * @deprecated Use the_permalink_rss()
       
   871  * @see the_permalink_rss()
   852  * @see the_permalink_rss()
   872  *
   853  *
   873  * @param string $deprecated
   854  * @param string $deprecated
   874  */
   855  */
   875 function permalink_single_rss($deprecated = '') {
   856 function permalink_single_rss($deprecated = '') {
   876 	_deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' );
   857 	_deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
   877 	the_permalink_rss();
   858 	the_permalink_rss();
   878 }
   859 }
   879 
   860 
   880 /**
   861 /**
   881  * Gets the links associated with category.
   862  * Gets the links associated with category.
   882  *
   863  *
   883  * @see get_links() for argument information that can be used in $args
       
   884  * @since 1.0.1
   864  * @since 1.0.1
   885  * @deprecated 2.1.0
   865  * @deprecated 2.1.0 Use wp_list_bookmarks()
   886  * @deprecated Use wp_list_bookmarks()
       
   887  * @see wp_list_bookmarks()
   866  * @see wp_list_bookmarks()
   888  *
   867  *
   889  * @param string $args a query string
   868  * @param string $args a query string
   890  * @return null|string
   869  * @return null|string
   891  */
   870  */
   892 function wp_get_links($args = '') {
   871 function wp_get_links($args = '') {
   893 	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
   872 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
   894 
   873 
   895 	if ( strpos( $args, '=' ) === false ) {
   874 	if ( strpos( $args, '=' ) === false ) {
   896 		$cat_id = $args;
   875 		$cat_id = $args;
   897 		$args = add_query_arg( 'category', $cat_id, $args );
   876 		$args = add_query_arg( 'category', $cat_id, $args );
   898 	}
   877 	}
   920 
   899 
   921 /**
   900 /**
   922  * Gets the links associated with category by id.
   901  * Gets the links associated with category by id.
   923  *
   902  *
   924  * @since 0.71
   903  * @since 0.71
   925  * @deprecated 2.1.0
   904  * @deprecated 2.1.0 Use get_bookmarks()
   926  * @deprecated Use get_bookmarks()
       
   927  * @see get_bookmarks()
   905  * @see get_bookmarks()
   928  *
   906  *
   929  * @param int $category The category to use. If no category supplied uses all
   907  * @param int $category The category to use. If no category supplied uses all
   930  * @param string $before the html to output before the link
   908  * @param string $before the html to output before the link
   931  * @param string $after the html to output after the link
   909  * @param string $after the html to output after the link
   943  * @param bool $echo whether to echo the results, or return them instead
   921  * @param bool $echo whether to echo the results, or return them instead
   944  * @return null|string
   922  * @return null|string
   945  */
   923  */
   946 function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
   924 function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
   947 			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
   925 			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
   948 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
   926 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
   949 
   927 
   950 	$order = 'ASC';
   928 	$order = 'ASC';
   951 	if ( substr($orderby, 0, 1) == '_' ) {
   929 	if ( substr($orderby, 0, 1) == '_' ) {
   952 		$order = 'DESC';
   930 		$order = 'DESC';
   953 		$orderby = substr($orderby, 1);
   931 		$orderby = substr($orderby, 1);
  1029  *
  1007  *
  1030  * Output a list of all links, listed by category, using the settings in
  1008  * Output a list of all links, listed by category, using the settings in
  1031  * $wpdb->linkcategories and output it as a nested HTML unordered list.
  1009  * $wpdb->linkcategories and output it as a nested HTML unordered list.
  1032  *
  1010  *
  1033  * @since 1.0.1
  1011  * @since 1.0.1
  1034  * @deprecated 2.1.0
  1012  * @deprecated 2.1.0 Use wp_list_bookmarks()
  1035  * @deprecated Use wp_list_bookmarks()
       
  1036  * @see wp_list_bookmarks()
  1013  * @see wp_list_bookmarks()
  1037  *
  1014  *
  1038  * @param string $order Sort link categories by 'name' or 'id'
  1015  * @param string $order Sort link categories by 'name' or 'id'
  1039  */
  1016  */
  1040 function get_links_list($order = 'name') {
  1017 function get_links_list($order = 'name') {
  1041 	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
  1018 	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
  1042 
  1019 
  1043 	$order = strtolower($order);
  1020 	$order = strtolower($order);
  1044 
  1021 
  1045 	// Handle link category sorting
  1022 	// Handle link category sorting
  1046 	$direction = 'ASC';
  1023 	$direction = 'ASC';
  1073 /**
  1050 /**
  1074  * Show the link to the links popup and the number of links.
  1051  * Show the link to the links popup and the number of links.
  1075  *
  1052  *
  1076  * @since 0.71
  1053  * @since 0.71
  1077  * @deprecated 2.1.0
  1054  * @deprecated 2.1.0
  1078  * @deprecated {@internal Use function instead is unknown}}
       
  1079  *
  1055  *
  1080  * @param string $text the text of the link
  1056  * @param string $text the text of the link
  1081  * @param int $width the width of the popup window
  1057  * @param int $width the width of the popup window
  1082  * @param int $height the height of the popup window
  1058  * @param int $height the height of the popup window
  1083  * @param string $file the page to open in the popup window
  1059  * @param string $file the page to open in the popup window
  1084  * @param bool $count the number of links in the db
  1060  * @param bool $count the number of links in the db
  1085  */
  1061  */
  1086 function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
  1062 function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
  1087 	_deprecated_function( __FUNCTION__, '2.1' );
  1063 	_deprecated_function( __FUNCTION__, '2.1.0' );
  1088 }
  1064 }
  1089 
  1065 
  1090 /**
  1066 /**
       
  1067  * Legacy function that retrieved the value of a link's link_rating field.
       
  1068  *
  1091  * @since 1.0.1
  1069  * @since 1.0.1
  1092  * @deprecated 2.1.0
  1070  * @deprecated 2.1.0 Use sanitize_bookmark_field()
  1093  * @deprecated Use sanitize_bookmark_field()
       
  1094  * @see sanitize_bookmark_field()
  1071  * @see sanitize_bookmark_field()
  1095  *
  1072  *
  1096  * @param object $link
  1073  * @param object $link Link object.
  1097  * @return mixed
  1074  * @return mixed Value of the 'link_rating' field, false otherwise.
  1098  */
  1075  */
  1099 function get_linkrating($link) {
  1076 function get_linkrating( $link ) {
  1100 	_deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' );
  1077 	_deprecated_function( __FUNCTION__, '2.1.0', 'sanitize_bookmark_field()' );
  1101 	return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
  1078 	return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
  1102 }
  1079 }
  1103 
  1080 
  1104 /**
  1081 /**
  1105  * Gets the name of category by id.
  1082  * Gets the name of category by id.
  1106  *
  1083  *
  1107  * @since 0.71
  1084  * @since 0.71
  1108  * @deprecated 2.1.0
  1085  * @deprecated 2.1.0 Use get_category()
  1109  * @deprecated Use get_category()
       
  1110  * @see get_category()
  1086  * @see get_category()
  1111  *
  1087  *
  1112  * @param int $id The category to get. If no category supplied uses 0
  1088  * @param int $id The category to get. If no category supplied uses 0
  1113  * @return string
  1089  * @return string
  1114  */
  1090  */
  1115 function get_linkcatname($id = 0) {
  1091 function get_linkcatname($id = 0) {
  1116 	_deprecated_function( __FUNCTION__, '2.1', 'get_category()' );
  1092 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_category()' );
  1117 
  1093 
  1118 	$id = (int) $id;
  1094 	$id = (int) $id;
  1119 
  1095 
  1120 	if ( empty($id) )
  1096 	if ( empty($id) )
  1121 		return '';
  1097 		return '';
  1133 
  1109 
  1134 /**
  1110 /**
  1135  * Print RSS comment feed link.
  1111  * Print RSS comment feed link.
  1136  *
  1112  *
  1137  * @since 1.0.1
  1113  * @since 1.0.1
  1138  * @deprecated 2.5.0
  1114  * @deprecated 2.5.0 Use post_comments_feed_link()
  1139  * @deprecated Use post_comments_feed_link()
       
  1140  * @see post_comments_feed_link()
  1115  * @see post_comments_feed_link()
  1141  *
  1116  *
  1142  * @param string $link_text
  1117  * @param string $link_text
  1143  */
  1118  */
  1144 function comments_rss_link($link_text = 'Comments RSS') {
  1119 function comments_rss_link($link_text = 'Comments RSS') {
  1145 	_deprecated_function( __FUNCTION__, '2.5', 'post_comments_feed_link()' );
  1120 	_deprecated_function( __FUNCTION__, '2.5.0', 'post_comments_feed_link()' );
  1146 	post_comments_feed_link($link_text);
  1121 	post_comments_feed_link($link_text);
  1147 }
  1122 }
  1148 
  1123 
  1149 /**
  1124 /**
  1150  * Print/Return link to category RSS2 feed.
  1125  * Print/Return link to category RSS2 feed.
  1151  *
  1126  *
  1152  * @since 1.2.0
  1127  * @since 1.2.0
  1153  * @deprecated 2.5.0
  1128  * @deprecated 2.5.0 Use get_category_feed_link()
  1154  * @deprecated Use get_category_feed_link()
       
  1155  * @see get_category_feed_link()
  1129  * @see get_category_feed_link()
  1156  *
  1130  *
  1157  * @param bool $echo
  1131  * @param bool $echo
  1158  * @param int $cat_ID
  1132  * @param int $cat_ID
  1159  * @return string
  1133  * @return string
  1160  */
  1134  */
  1161 function get_category_rss_link($echo = false, $cat_ID = 1) {
  1135 function get_category_rss_link($echo = false, $cat_ID = 1) {
  1162 	_deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' );
  1136 	_deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );
  1163 
  1137 
  1164 	$link = get_category_feed_link($cat_ID, 'rss2');
  1138 	$link = get_category_feed_link($cat_ID, 'rss2');
  1165 
  1139 
  1166 	if ( $echo )
  1140 	if ( $echo )
  1167 		echo $link;
  1141 		echo $link;
  1170 
  1144 
  1171 /**
  1145 /**
  1172  * Print/Return link to author RSS feed.
  1146  * Print/Return link to author RSS feed.
  1173  *
  1147  *
  1174  * @since 1.2.0
  1148  * @since 1.2.0
  1175  * @deprecated 2.5.0
  1149  * @deprecated 2.5.0 Use get_author_feed_link()
  1176  * @deprecated Use get_author_feed_link()
       
  1177  * @see get_author_feed_link()
  1150  * @see get_author_feed_link()
  1178  *
  1151  *
  1179  * @param bool $echo
  1152  * @param bool $echo
  1180  * @param int $author_id
  1153  * @param int $author_id
  1181  * @return string
  1154  * @return string
  1182  */
  1155  */
  1183 function get_author_rss_link($echo = false, $author_id = 1) {
  1156 function get_author_rss_link($echo = false, $author_id = 1) {
  1184 	_deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' );
  1157 	_deprecated_function( __FUNCTION__, '2.5.0', 'get_author_feed_link()' );
  1185 
  1158 
  1186 	$link = get_author_feed_link($author_id);
  1159 	$link = get_author_feed_link($author_id);
  1187 	if ( $echo )
  1160 	if ( $echo )
  1188 		echo $link;
  1161 		echo $link;
  1189 	return $link;
  1162 	return $link;
  1191 
  1164 
  1192 /**
  1165 /**
  1193  * Return link to the post RSS feed.
  1166  * Return link to the post RSS feed.
  1194  *
  1167  *
  1195  * @since 1.5.0
  1168  * @since 1.5.0
  1196  * @deprecated 2.2.0
  1169  * @deprecated 2.2.0 Use get_post_comments_feed_link()
  1197  * @deprecated Use get_post_comments_feed_link()
       
  1198  * @see get_post_comments_feed_link()
  1170  * @see get_post_comments_feed_link()
  1199  *
  1171  *
  1200  * @return string
  1172  * @return string
  1201  */
  1173  */
  1202 function comments_rss() {
  1174 function comments_rss() {
  1203 	_deprecated_function( __FUNCTION__, '2.2', 'get_post_comments_feed_link()' );
  1175 	_deprecated_function( __FUNCTION__, '2.2.0', 'get_post_comments_feed_link()' );
  1204 	return esc_url( get_post_comments_feed_link() );
  1176 	return esc_url( get_post_comments_feed_link() );
  1205 }
  1177 }
  1206 
  1178 
  1207 /**
  1179 /**
  1208  * An alias of wp_create_user().
  1180  * An alias of wp_create_user().
  1209  *
  1181  *
  1210  * @since 2.0.0
  1182  * @since 2.0.0
  1211  * @deprecated 2.0.0
  1183  * @deprecated 2.0.0 Use wp_create_user()
  1212  * @deprecated Use wp_create_user()
       
  1213  * @see wp_create_user()
  1184  * @see wp_create_user()
  1214  *
  1185  *
  1215  * @param string $username The user's username.
  1186  * @param string $username The user's username.
  1216  * @param string $password The user's password.
  1187  * @param string $password The user's password.
  1217  * @param string $email    The user's email.
  1188  * @param string $email    The user's email.
  1218  * @return int The new user's ID.
  1189  * @return int The new user's ID.
  1219  */
  1190  */
  1220 function create_user($username, $password, $email) {
  1191 function create_user($username, $password, $email) {
  1221 	_deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' );
  1192 	_deprecated_function( __FUNCTION__, '2.0.0', 'wp_create_user()' );
  1222 	return wp_create_user($username, $password, $email);
  1193 	return wp_create_user($username, $password, $email);
  1223 }
  1194 }
  1224 
  1195 
  1225 /**
  1196 /**
  1226  * Unused function.
  1197  * Unused function.
  1227  *
  1198  *
  1228  * @deprecated 2.5.0
  1199  * @deprecated 2.5.0
  1229 */
  1200  */
  1230 function gzip_compression() {
  1201 function gzip_compression() {
  1231 	_deprecated_function( __FUNCTION__, '2.5' );
  1202 	_deprecated_function( __FUNCTION__, '2.5.0' );
  1232 	return false;
  1203 	return false;
  1233 }
  1204 }
  1234 
  1205 
  1235 /**
  1206 /**
  1236  * Retrieve an array of comment data about comment $comment_ID.
  1207  * Retrieve an array of comment data about comment $comment_ID.
  1237  *
  1208  *
  1238  * @since 0.71
  1209  * @since 0.71
  1239  * @deprecated 2.7.0
  1210  * @deprecated 2.7.0 Use get_comment()
  1240  * @deprecated Use get_comment()
       
  1241  * @see get_comment()
  1211  * @see get_comment()
  1242  *
  1212  *
  1243  * @param int $comment_ID The ID of the comment
  1213  * @param int $comment_ID The ID of the comment
  1244  * @param int $no_cache Whether to use the cache (cast to bool)
  1214  * @param int $no_cache Whether to use the cache (cast to bool)
  1245  * @param bool $include_unapproved Whether to include unapproved comments
  1215  * @param bool $include_unapproved Whether to include unapproved comments
  1246  * @return array The comment data
  1216  * @return array The comment data
  1247  */
  1217  */
  1248 function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
  1218 function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
  1249 	_deprecated_function( __FUNCTION__, '2.7', 'get_comment()' );
  1219 	_deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
  1250 	return get_comment($comment_ID, ARRAY_A);
  1220 	return get_comment($comment_ID, ARRAY_A);
  1251 }
  1221 }
  1252 
  1222 
  1253 /**
  1223 /**
  1254  * Retrieve the category name by the category ID.
  1224  * Retrieve the category name by the category ID.
  1255  *
  1225  *
  1256  * @since 0.71
  1226  * @since 0.71
  1257  * @deprecated 2.8.0
  1227  * @deprecated 2.8.0 Use get_cat_name()
  1258  * @deprecated Use get_cat_name()
       
  1259  * @see get_cat_name()
  1228  * @see get_cat_name()
  1260  *
  1229  *
  1261  * @param int $cat_ID Category ID
  1230  * @param int $cat_ID Category ID
  1262  * @return string category name
  1231  * @return string category name
  1263  */
  1232  */
  1264 function get_catname( $cat_ID ) {
  1233 function get_catname( $cat_ID ) {
  1265 	_deprecated_function( __FUNCTION__, '2.8', 'get_cat_name()' );
  1234 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_cat_name()' );
  1266 	return get_cat_name( $cat_ID );
  1235 	return get_cat_name( $cat_ID );
  1267 }
  1236 }
  1268 
  1237 
  1269 /**
  1238 /**
  1270  * Retrieve category children list separated before and after the term IDs.
  1239  * Retrieve category children list separated before and after the term IDs.
  1271  *
  1240  *
  1272  * @since 1.2.0
  1241  * @since 1.2.0
  1273  * @deprecated 2.8.0
  1242  * @deprecated 2.8.0 Use get_term_children()
  1274  * @deprecated Use get_term_children()
       
  1275  * @see get_term_children()
  1243  * @see get_term_children()
  1276  *
  1244  *
  1277  * @param int $id Category ID to retrieve children.
  1245  * @param int $id Category ID to retrieve children.
  1278  * @param string $before Optional. Prepend before category term ID.
  1246  * @param string $before Optional. Prepend before category term ID.
  1279  * @param string $after Optional, default is empty string. Append after category term ID.
  1247  * @param string $after Optional, default is empty string. Append after category term ID.
  1280  * @param array $visited Optional. Category Term IDs that have already been added.
  1248  * @param array $visited Optional. Category Term IDs that have already been added.
  1281  * @return string
  1249  * @return string
  1282  */
  1250  */
  1283 function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
  1251 function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
  1284 	_deprecated_function( __FUNCTION__, '2.8', 'get_term_children()' );
  1252 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_term_children()' );
  1285 	if ( 0 == $id )
  1253 	if ( 0 == $id )
  1286 		return '';
  1254 		return '';
  1287 
  1255 
  1288 	$chain = '';
  1256 	$chain = '';
  1289 	/** TODO: consult hierarchy */
  1257 	/** TODO: consult hierarchy */
  1306 
  1274 
  1307 /**
  1275 /**
  1308  * Retrieves all category IDs.
  1276  * Retrieves all category IDs.
  1309  *
  1277  *
  1310  * @since 2.0.0
  1278  * @since 2.0.0
  1311  * @deprecated 4.0.0 Use get_terms() instead.
  1279  * @deprecated 4.0.0 Use get_terms()
  1312  * @see get_terms()
  1280  * @see get_terms()
       
  1281  *
  1313  * @link https://codex.wordpress.org/Function_Reference/get_all_category_ids
  1282  * @link https://codex.wordpress.org/Function_Reference/get_all_category_ids
  1314  *
  1283  *
  1315  * @return object List of all of the category IDs.
  1284  * @return object List of all of the category IDs.
  1316  */
  1285  */
  1317 function get_all_category_ids() {
  1286 function get_all_category_ids() {
  1318 	_deprecated_function( __FUNCTION__, '4.0', 'get_terms()' );
  1287 	_deprecated_function( __FUNCTION__, '4.0.0', 'get_terms()' );
  1319 
  1288 
  1320 	if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
  1289 	if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) {
  1321 		$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
  1290 		$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );
  1322 		wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
  1291 		wp_cache_add( 'all_category_ids', $cat_ids, 'category' );
  1323 	}
  1292 	}
  1327 
  1296 
  1328 /**
  1297 /**
  1329  * Retrieve the description of the author of the current post.
  1298  * Retrieve the description of the author of the current post.
  1330  *
  1299  *
  1331  * @since 1.5.0
  1300  * @since 1.5.0
  1332  * @deprecated 2.8.0
  1301  * @deprecated 2.8.0 Use get_the_author_meta()
  1333  * @deprecated Use get_the_author_meta('description')
       
  1334  * @see get_the_author_meta()
  1302  * @see get_the_author_meta()
  1335  *
  1303  *
  1336  * @return string The author's description.
  1304  * @return string The author's description.
  1337  */
  1305  */
  1338 function get_the_author_description() {
  1306 function get_the_author_description() {
  1339 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'description\')' );
  1307 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'description\')' );
  1340 	return get_the_author_meta('description');
  1308 	return get_the_author_meta('description');
  1341 }
  1309 }
  1342 
  1310 
  1343 /**
  1311 /**
  1344  * Display the description of the author of the current post.
  1312  * Display the description of the author of the current post.
  1345  *
  1313  *
  1346  * @since 1.0.0
  1314  * @since 1.0.0
  1347  * @deprecated 2.8.0
  1315  * @deprecated 2.8.0 Use the_author_meta()
  1348  * @deprecated Use the_author_meta('description')
       
  1349  * @see the_author_meta()
  1316  * @see the_author_meta()
  1350  */
  1317  */
  1351 function the_author_description() {
  1318 function the_author_description() {
  1352 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'description\')' );
  1319 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'description\')' );
  1353 	the_author_meta('description');
  1320 	the_author_meta('description');
  1354 }
  1321 }
  1355 
  1322 
  1356 /**
  1323 /**
  1357  * Retrieve the login name of the author of the current post.
  1324  * Retrieve the login name of the author of the current post.
  1358  *
  1325  *
  1359  * @since 1.5.0
  1326  * @since 1.5.0
  1360  * @deprecated 2.8.0
  1327  * @deprecated 2.8.0 Use get_the_author_meta()
  1361  * @deprecated Use get_the_author_meta('login')
       
  1362  * @see get_the_author_meta()
  1328  * @see get_the_author_meta()
  1363  *
  1329  *
  1364  * @return string The author's login name (username).
  1330  * @return string The author's login name (username).
  1365  */
  1331  */
  1366 function get_the_author_login() {
  1332 function get_the_author_login() {
  1367 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'login\')' );
  1333 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'login\')' );
  1368 	return get_the_author_meta('login');
  1334 	return get_the_author_meta('login');
  1369 }
  1335 }
  1370 
  1336 
  1371 /**
  1337 /**
  1372  * Display the login name of the author of the current post.
  1338  * Display the login name of the author of the current post.
  1373  *
  1339  *
  1374  * @since 0.71
  1340  * @since 0.71
  1375  * @deprecated 2.8.0
  1341  * @deprecated 2.8.0 Use the_author_meta()
  1376  * @deprecated Use the_author_meta('login')
       
  1377  * @see the_author_meta()
  1342  * @see the_author_meta()
  1378  */
  1343  */
  1379 function the_author_login() {
  1344 function the_author_login() {
  1380 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'login\')' );
  1345 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'login\')' );
  1381 	the_author_meta('login');
  1346 	the_author_meta('login');
  1382 }
  1347 }
  1383 
  1348 
  1384 /**
  1349 /**
  1385  * Retrieve the first name of the author of the current post.
  1350  * Retrieve the first name of the author of the current post.
  1386  *
  1351  *
  1387  * @since 1.5.0
  1352  * @since 1.5.0
  1388  * @deprecated 2.8.0
  1353  * @deprecated 2.8.0 Use get_the_author_meta()
  1389  * @deprecated Use get_the_author_meta('first_name')
       
  1390  * @see get_the_author_meta()
  1354  * @see get_the_author_meta()
  1391  *
  1355  *
  1392  * @return string The author's first name.
  1356  * @return string The author's first name.
  1393  */
  1357  */
  1394 function get_the_author_firstname() {
  1358 function get_the_author_firstname() {
  1395 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'first_name\')' );
  1359 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'first_name\')' );
  1396 	return get_the_author_meta('first_name');
  1360 	return get_the_author_meta('first_name');
  1397 }
  1361 }
  1398 
  1362 
  1399 /**
  1363 /**
  1400  * Display the first name of the author of the current post.
  1364  * Display the first name of the author of the current post.
  1401  *
  1365  *
  1402  * @since 0.71
  1366  * @since 0.71
  1403  * @deprecated 2.8.0
  1367  * @deprecated 2.8.0 Use the_author_meta()
  1404  * @deprecated Use the_author_meta('first_name')
       
  1405  * @see the_author_meta()
  1368  * @see the_author_meta()
  1406  */
  1369  */
  1407 function the_author_firstname() {
  1370 function the_author_firstname() {
  1408 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' );
  1371 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'first_name\')' );
  1409 	the_author_meta('first_name');
  1372 	the_author_meta('first_name');
  1410 }
  1373 }
  1411 
  1374 
  1412 /**
  1375 /**
  1413  * Retrieve the last name of the author of the current post.
  1376  * Retrieve the last name of the author of the current post.
  1414  *
  1377  *
  1415  * @since 1.5.0
  1378  * @since 1.5.0
  1416  * @deprecated 2.8.0
  1379  * @deprecated 2.8.0 Use get_the_author_meta()
  1417  * @deprecated Use get_the_author_meta('last_name')
       
  1418  * @see get_the_author_meta()
  1380  * @see get_the_author_meta()
  1419  *
  1381  *
  1420  * @return string The author's last name.
  1382  * @return string The author's last name.
  1421  */
  1383  */
  1422 function get_the_author_lastname() {
  1384 function get_the_author_lastname() {
  1423 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'last_name\')' );
  1385 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'last_name\')' );
  1424 	return get_the_author_meta('last_name');
  1386 	return get_the_author_meta('last_name');
  1425 }
  1387 }
  1426 
  1388 
  1427 /**
  1389 /**
  1428  * Display the last name of the author of the current post.
  1390  * Display the last name of the author of the current post.
  1429  *
  1391  *
  1430  * @since 0.71
  1392  * @since 0.71
  1431  * @deprecated 2.8.0
  1393  * @deprecated 2.8.0 Use the_author_meta()
  1432  * @deprecated Use the_author_meta('last_name')
       
  1433  * @see the_author_meta()
  1394  * @see the_author_meta()
  1434  */
  1395  */
  1435 function the_author_lastname() {
  1396 function the_author_lastname() {
  1436 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' );
  1397 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'last_name\')' );
  1437 	the_author_meta('last_name');
  1398 	the_author_meta('last_name');
  1438 }
  1399 }
  1439 
  1400 
  1440 /**
  1401 /**
  1441  * Retrieve the nickname of the author of the current post.
  1402  * Retrieve the nickname of the author of the current post.
  1442  *
  1403  *
  1443  * @since 1.5.0
  1404  * @since 1.5.0
  1444  * @deprecated 2.8.0
  1405  * @deprecated 2.8.0 Use get_the_author_meta()
  1445  * @deprecated Use get_the_author_meta('nickname')
       
  1446  * @see get_the_author_meta()
  1406  * @see get_the_author_meta()
  1447  *
  1407  *
  1448  * @return string The author's nickname.
  1408  * @return string The author's nickname.
  1449  */
  1409  */
  1450 function get_the_author_nickname() {
  1410 function get_the_author_nickname() {
  1451 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'nickname\')' );
  1411 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'nickname\')' );
  1452 	return get_the_author_meta('nickname');
  1412 	return get_the_author_meta('nickname');
  1453 }
  1413 }
  1454 
  1414 
  1455 /**
  1415 /**
  1456  * Display the nickname of the author of the current post.
  1416  * Display the nickname of the author of the current post.
  1457  *
  1417  *
  1458  * @since 0.71
  1418  * @since 0.71
  1459  * @deprecated 2.8.0
  1419  * @deprecated 2.8.0 Use the_author_meta()
  1460  * @deprecated Use the_author_meta('nickname')
       
  1461  * @see the_author_meta()
  1420  * @see the_author_meta()
  1462  */
  1421  */
  1463 function the_author_nickname() {
  1422 function the_author_nickname() {
  1464 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' );
  1423 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'nickname\')' );
  1465 	the_author_meta('nickname');
  1424 	the_author_meta('nickname');
  1466 }
  1425 }
  1467 
  1426 
  1468 /**
  1427 /**
  1469  * Retrieve the email of the author of the current post.
  1428  * Retrieve the email of the author of the current post.
  1470  *
  1429  *
  1471  * @since 1.5.0
  1430  * @since 1.5.0
  1472  * @deprecated 2.8.0
  1431  * @deprecated 2.8.0 Use get_the_author_meta()
  1473  * @deprecated Use get_the_author_meta('email')
       
  1474  * @see get_the_author_meta()
  1432  * @see get_the_author_meta()
  1475  *
  1433  *
  1476  * @return string The author's username.
  1434  * @return string The author's username.
  1477  */
  1435  */
  1478 function get_the_author_email() {
  1436 function get_the_author_email() {
  1479 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'email\')' );
  1437 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'email\')' );
  1480 	return get_the_author_meta('email');
  1438 	return get_the_author_meta('email');
  1481 }
  1439 }
  1482 
  1440 
  1483 /**
  1441 /**
  1484  * Display the email of the author of the current post.
  1442  * Display the email of the author of the current post.
  1485  *
  1443  *
  1486  * @since 0.71
  1444  * @since 0.71
  1487  * @deprecated 2.8.0
  1445  * @deprecated 2.8.0 Use the_author_meta()
  1488  * @deprecated Use the_author_meta('email')
       
  1489  * @see the_author_meta()
  1446  * @see the_author_meta()
  1490  */
  1447  */
  1491 function the_author_email() {
  1448 function the_author_email() {
  1492 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'email\')' );
  1449 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'email\')' );
  1493 	the_author_meta('email');
  1450 	the_author_meta('email');
  1494 }
  1451 }
  1495 
  1452 
  1496 /**
  1453 /**
  1497  * Retrieve the ICQ number of the author of the current post.
  1454  * Retrieve the ICQ number of the author of the current post.
  1498  *
  1455  *
  1499  * @since 1.5.0
  1456  * @since 1.5.0
  1500  * @deprecated 2.8.0
  1457  * @deprecated 2.8.0 Use get_the_author_meta()
  1501  * @deprecated Use get_the_author_meta('icq')
       
  1502  * @see get_the_author_meta()
  1458  * @see get_the_author_meta()
  1503  *
  1459  *
  1504  * @return string The author's ICQ number.
  1460  * @return string The author's ICQ number.
  1505  */
  1461  */
  1506 function get_the_author_icq() {
  1462 function get_the_author_icq() {
  1507 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'icq\')' );
  1463 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'icq\')' );
  1508 	return get_the_author_meta('icq');
  1464 	return get_the_author_meta('icq');
  1509 }
  1465 }
  1510 
  1466 
  1511 /**
  1467 /**
  1512  * Display the ICQ number of the author of the current post.
  1468  * Display the ICQ number of the author of the current post.
  1513  *
  1469  *
  1514  * @since 0.71
  1470  * @since 0.71
  1515  * @deprecated 2.8.0
  1471  * @deprecated 2.8.0 Use the_author_meta()
  1516  * @deprecated Use the_author_meta('icq')
       
  1517  * @see the_author_meta()
  1472  * @see the_author_meta()
  1518  */
  1473  */
  1519 function the_author_icq() {
  1474 function the_author_icq() {
  1520 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'icq\')' );
  1475 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'icq\')' );
  1521 	the_author_meta('icq');
  1476 	the_author_meta('icq');
  1522 }
  1477 }
  1523 
  1478 
  1524 /**
  1479 /**
  1525  * Retrieve the Yahoo! IM name of the author of the current post.
  1480  * Retrieve the Yahoo! IM name of the author of the current post.
  1526  *
  1481  *
  1527  * @since 1.5.0
  1482  * @since 1.5.0
  1528  * @deprecated 2.8.0
  1483  * @deprecated 2.8.0 Use get_the_author_meta()
  1529  * @deprecated Use get_the_author_meta('yim')
       
  1530  * @see get_the_author_meta()
  1484  * @see get_the_author_meta()
  1531  *
  1485  *
  1532  * @return string The author's Yahoo! IM name.
  1486  * @return string The author's Yahoo! IM name.
  1533  */
  1487  */
  1534 function get_the_author_yim() {
  1488 function get_the_author_yim() {
  1535 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'yim\')' );
  1489 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'yim\')' );
  1536 	return get_the_author_meta('yim');
  1490 	return get_the_author_meta('yim');
  1537 }
  1491 }
  1538 
  1492 
  1539 /**
  1493 /**
  1540  * Display the Yahoo! IM name of the author of the current post.
  1494  * Display the Yahoo! IM name of the author of the current post.
  1541  *
  1495  *
  1542  * @since 0.71
  1496  * @since 0.71
  1543  * @deprecated 2.8.0
  1497  * @deprecated 2.8.0 Use the_author_meta()
  1544  * @deprecated Use the_author_meta('yim')
       
  1545  * @see the_author_meta()
  1498  * @see the_author_meta()
  1546  */
  1499  */
  1547 function the_author_yim() {
  1500 function the_author_yim() {
  1548 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'yim\')' );
  1501 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'yim\')' );
  1549 	the_author_meta('yim');
  1502 	the_author_meta('yim');
  1550 }
  1503 }
  1551 
  1504 
  1552 /**
  1505 /**
  1553  * Retrieve the MSN address of the author of the current post.
  1506  * Retrieve the MSN address of the author of the current post.
  1554  *
  1507  *
  1555  * @since 1.5.0
  1508  * @since 1.5.0
  1556  * @deprecated 2.8.0
  1509  * @deprecated 2.8.0 Use get_the_author_meta()
  1557  * @deprecated Use get_the_author_meta('msn')
       
  1558  * @see get_the_author_meta()
  1510  * @see get_the_author_meta()
  1559  *
  1511  *
  1560  * @return string The author's MSN address.
  1512  * @return string The author's MSN address.
  1561  */
  1513  */
  1562 function get_the_author_msn() {
  1514 function get_the_author_msn() {
  1563 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'msn\')' );
  1515 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'msn\')' );
  1564 	return get_the_author_meta('msn');
  1516 	return get_the_author_meta('msn');
  1565 }
  1517 }
  1566 
  1518 
  1567 /**
  1519 /**
  1568  * Display the MSN address of the author of the current post.
  1520  * Display the MSN address of the author of the current post.
  1569  *
  1521  *
  1570  * @since 0.71
  1522  * @since 0.71
  1571  * @deprecated 2.8.0
  1523  * @deprecated 2.8.0 Use the_author_meta()
  1572  * @deprecated Use the_author_meta('msn')
       
  1573  * @see the_author_meta()
  1524  * @see the_author_meta()
  1574  */
  1525  */
  1575 function the_author_msn() {
  1526 function the_author_msn() {
  1576 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'msn\')' );
  1527 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'msn\')' );
  1577 	the_author_meta('msn');
  1528 	the_author_meta('msn');
  1578 }
  1529 }
  1579 
  1530 
  1580 /**
  1531 /**
  1581  * Retrieve the AIM address of the author of the current post.
  1532  * Retrieve the AIM address of the author of the current post.
  1582  *
  1533  *
  1583  * @since 1.5.0
  1534  * @since 1.5.0
  1584  * @deprecated 2.8.0
  1535  * @deprecated 2.8.0 Use get_the_author_meta()
  1585  * @deprecated Use get_the_author_meta('aim')
       
  1586  * @see get_the_author_meta()
  1536  * @see get_the_author_meta()
  1587  *
  1537  *
  1588  * @return string The author's AIM address.
  1538  * @return string The author's AIM address.
  1589  */
  1539  */
  1590 function get_the_author_aim() {
  1540 function get_the_author_aim() {
  1591 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'aim\')' );
  1541 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'aim\')' );
  1592 	return get_the_author_meta('aim');
  1542 	return get_the_author_meta('aim');
  1593 }
  1543 }
  1594 
  1544 
  1595 /**
  1545 /**
  1596  * Display the AIM address of the author of the current post.
  1546  * Display the AIM address of the author of the current post.
  1597  *
  1547  *
  1598  * @since 0.71
  1548  * @since 0.71
       
  1549  * @deprecated 2.8.0 Use the_author_meta('aim')
  1599  * @see the_author_meta()
  1550  * @see the_author_meta()
  1600  * @deprecated 2.8.0
       
  1601  * @deprecated Use the_author_meta('aim')
       
  1602  */
  1551  */
  1603 function the_author_aim() {
  1552 function the_author_aim() {
  1604 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'aim\')' );
  1553 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'aim\')' );
  1605 	the_author_meta('aim');
  1554 	the_author_meta('aim');
  1606 }
  1555 }
  1607 
  1556 
  1608 /**
  1557 /**
  1609  * Retrieve the specified author's preferred display name.
  1558  * Retrieve the specified author's preferred display name.
  1610  *
  1559  *
  1611  * @since 1.0.0
  1560  * @since 1.0.0
  1612  * @deprecated 2.8.0
  1561  * @deprecated 2.8.0 Use get_the_author_meta()
  1613  * @deprecated Use get_the_author_meta('display_name')
       
  1614  * @see get_the_author_meta()
  1562  * @see get_the_author_meta()
  1615  *
  1563  *
  1616  * @param int $auth_id The ID of the author.
  1564  * @param int $auth_id The ID of the author.
  1617  * @return string The author's display name.
  1565  * @return string The author's display name.
  1618  */
  1566  */
  1619 function get_author_name( $auth_id = false ) {
  1567 function get_author_name( $auth_id = false ) {
  1620 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'display_name\')' );
  1568 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'display_name\')' );
  1621 	return get_the_author_meta('display_name', $auth_id);
  1569 	return get_the_author_meta('display_name', $auth_id);
  1622 }
  1570 }
  1623 
  1571 
  1624 /**
  1572 /**
  1625  * Retrieve the URL to the home page of the author of the current post.
  1573  * Retrieve the URL to the home page of the author of the current post.
  1626  *
  1574  *
  1627  * @since 1.5.0
  1575  * @since 1.5.0
  1628  * @deprecated 2.8.0
  1576  * @deprecated 2.8.0 Use get_the_author_meta()
  1629  * @deprecated Use get_the_author_meta('url')
       
  1630  * @see get_the_author_meta()
  1577  * @see get_the_author_meta()
  1631  *
  1578  *
  1632  * @return string The URL to the author's page.
  1579  * @return string The URL to the author's page.
  1633  */
  1580  */
  1634 function get_the_author_url() {
  1581 function get_the_author_url() {
  1635 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'url\')' );
  1582 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'url\')' );
  1636 	return get_the_author_meta('url');
  1583 	return get_the_author_meta('url');
  1637 }
  1584 }
  1638 
  1585 
  1639 /**
  1586 /**
  1640  * Display the URL to the home page of the author of the current post.
  1587  * Display the URL to the home page of the author of the current post.
  1641  *
  1588  *
  1642  * @since 0.71
  1589  * @since 0.71
  1643  * @deprecated 2.8.0
  1590  * @deprecated 2.8.0 Use the_author_meta()
  1644  * @deprecated Use the_author_meta('url')
       
  1645  * @see the_author_meta()
  1591  * @see the_author_meta()
  1646  */
  1592  */
  1647 function the_author_url() {
  1593 function the_author_url() {
  1648 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'url\')' );
  1594 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'url\')' );
  1649 	the_author_meta('url');
  1595 	the_author_meta('url');
  1650 }
  1596 }
  1651 
  1597 
  1652 /**
  1598 /**
  1653  * Retrieve the ID of the author of the current post.
  1599  * Retrieve the ID of the author of the current post.
  1654  *
  1600  *
  1655  * @since 1.5.0
  1601  * @since 1.5.0
  1656  * @deprecated 2.8.0
  1602  * @deprecated 2.8.0 Use get_the_author_meta()
  1657  * @deprecated Use get_the_author_meta('ID')
       
  1658  * @see get_the_author_meta()
  1603  * @see get_the_author_meta()
  1659  *
  1604  *
  1660  * @return string|int The author's ID.
  1605  * @return string|int The author's ID.
  1661  */
  1606  */
  1662 function get_the_author_ID() {
  1607 function get_the_author_ID() {
  1663 	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' );
  1608 	_deprecated_function( __FUNCTION__, '2.8.0', 'get_the_author_meta(\'ID\')' );
  1664 	return get_the_author_meta('ID');
  1609 	return get_the_author_meta('ID');
  1665 }
  1610 }
  1666 
  1611 
  1667 /**
  1612 /**
  1668  * Display the ID of the author of the current post.
  1613  * Display the ID of the author of the current post.
  1669  *
  1614  *
  1670  * @since 0.71
  1615  * @since 0.71
  1671  * @deprecated 2.8.0
  1616  * @deprecated 2.8.0 Use the_author_meta()
  1672  * @deprecated Use the_author_meta('ID')
       
  1673  * @see the_author_meta()
  1617  * @see the_author_meta()
  1674 */
  1618  */
  1675 function the_author_ID() {
  1619 function the_author_ID() {
  1676 	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'ID\')' );
  1620 	_deprecated_function( __FUNCTION__, '2.8.0', 'the_author_meta(\'ID\')' );
  1677 	the_author_meta('ID');
  1621 	the_author_meta('ID');
  1678 }
  1622 }
  1679 
  1623 
  1680 /**
  1624 /**
  1681  * Display the post content for the feed.
  1625  * Display the post content for the feed.
  1694  * dots added to the end. If there is content left over, then dots will be added
  1638  * dots added to the end. If there is content left over, then dots will be added
  1695  * and the rest of the content will be removed.
  1639  * and the rest of the content will be removed.
  1696  *
  1640  *
  1697  * @since 0.71
  1641  * @since 0.71
  1698  *
  1642  *
  1699  * @deprecated 2.9.0
  1643  * @deprecated 2.9.0 Use the_content_feed()
  1700  * @deprecated Use the_content_feed()
       
  1701  * @see the_content_feed()
  1644  * @see the_content_feed()
  1702  *
  1645  *
  1703  * @param string $more_link_text Optional. Text to display when more content is available but not displayed.
  1646  * @param string $more_link_text Optional. Text to display when more content is available but not displayed.
  1704  * @param int $stripteaser Optional. Default is 0.
  1647  * @param int $stripteaser Optional. Default is 0.
  1705  * @param string $more_file Optional.
  1648  * @param string $more_file Optional.
  1706  * @param int $cut Optional. Amount of words to keep for the content.
  1649  * @param int $cut Optional. Amount of words to keep for the content.
  1707  * @param int $encode_html Optional. How to encode the content.
  1650  * @param int $encode_html Optional. How to encode the content.
  1708  */
  1651  */
  1709 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
  1652 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
  1710 	_deprecated_function( __FUNCTION__, '2.9', 'the_content_feed' );
  1653 	_deprecated_function( __FUNCTION__, '2.9.0', 'the_content_feed()' );
  1711 	$content = get_the_content($more_link_text, $stripteaser);
  1654 	$content = get_the_content($more_link_text, $stripteaser);
       
  1655 
       
  1656 	/**
       
  1657 	 * Filters the post content in the context of an RSS feed.
       
  1658 	 *
       
  1659 	 * @since 0.71
       
  1660 	 *
       
  1661 	 * @param string $content Content of the current post.
       
  1662 	 */
  1712 	$content = apply_filters('the_content_rss', $content);
  1663 	$content = apply_filters('the_content_rss', $content);
  1713 	if ( $cut && !$encode_html )
  1664 	if ( $cut && !$encode_html )
  1714 		$encode_html = 2;
  1665 		$encode_html = 2;
  1715 	if ( 1== $encode_html ) {
  1666 	if ( 1== $encode_html ) {
  1716 		$content = esc_html($content);
  1667 		$content = esc_html($content);
  1751  *
  1702  *
  1752  * @param string $content Content to get links
  1703  * @param string $content Content to get links
  1753  * @return string HTML stripped out of content with links at the bottom.
  1704  * @return string HTML stripped out of content with links at the bottom.
  1754  */
  1705  */
  1755 function make_url_footnote( $content ) {
  1706 function make_url_footnote( $content ) {
  1756 	_deprecated_function( __FUNCTION__, '2.9', '' );
  1707 	_deprecated_function( __FUNCTION__, '2.9.0', '' );
  1757 	preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
  1708 	preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
  1758 	$links_summary = "\n";
  1709 	$links_summary = "\n";
  1759 	for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
  1710 	for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) {
  1760 		$link_match = $matches[0][$i];
  1711 		$link_match = $matches[0][$i];
  1761 		$link_number = '['.($i+1).']';
  1712 		$link_number = '['.($i+1).']';
  1782  * When the translated string is returned, it is everything before the pipe, not
  1733  * When the translated string is returned, it is everything before the pipe, not
  1783  * including the pipe character. If there is no pipe in the translated text then
  1734  * including the pipe character. If there is no pipe in the translated text then
  1784  * everything is returned.
  1735  * everything is returned.
  1785  *
  1736  *
  1786  * @since 2.2.0
  1737  * @since 2.2.0
  1787  * @deprecated 2.9.0
  1738  * @deprecated 2.9.0 Use _x()
  1788  * @deprecated Use _x()
       
  1789  * @see _x()
  1739  * @see _x()
  1790  *
  1740  *
  1791  * @param string $text Text to translate
  1741  * @param string $text Text to translate
  1792  * @param string $domain Optional. Domain to retrieve the translated text
  1742  * @param string $domain Optional. Domain to retrieve the translated text
  1793  * @return string Translated context string without pipe
  1743  * @return string Translated context string without pipe
  1794  */
  1744  */
  1795 function _c( $text, $domain = 'default' ) {
  1745 function _c( $text, $domain = 'default' ) {
  1796 	_deprecated_function( __FUNCTION__, '2.9', '_x()' );
  1746 	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
  1797 	return before_last_bar( translate( $text, $domain ) );
  1747 	return before_last_bar( translate( $text, $domain ) );
  1798 }
  1748 }
  1799 
  1749 
  1800 /**
  1750 /**
  1801  * Translates $text like translate(), but assumes that the text
  1751  * Translates $text like translate(), but assumes that the text
  1802  * contains a context after its last vertical bar.
  1752  * contains a context after its last vertical bar.
  1803  *
  1753  *
  1804  * @since 2.5.0
  1754  * @since 2.5.0
  1805  * @deprecated 3.0.0
  1755  * @deprecated 3.0.0 Use _x()
  1806  * @deprecated Use _x()
       
  1807  * @see _x()
  1756  * @see _x()
  1808  *
  1757  *
  1809  * @param string $text Text to translate
  1758  * @param string $text Text to translate
  1810  * @param string $domain Domain to retrieve the translated text
  1759  * @param string $domain Domain to retrieve the translated text
  1811  * @return string Translated text
  1760  * @return string Translated text
  1812  */
  1761  */
  1813 function translate_with_context( $text, $domain = 'default' ) {
  1762 function translate_with_context( $text, $domain = 'default' ) {
  1814 	_deprecated_function( __FUNCTION__, '2.9', '_x()' );
  1763 	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
  1815 	return before_last_bar( translate( $text, $domain ) );
  1764 	return before_last_bar( translate( $text, $domain ) );
  1816 }
  1765 }
  1817 
  1766 
  1818 /**
  1767 /**
  1819  * A version of _n(), which supports contexts.
  1768  * Legacy version of _n(), which supports contexts.
       
  1769  *
  1820  * Strips everything from the translation after the last bar.
  1770  * Strips everything from the translation after the last bar.
  1821  *
  1771  *
  1822  * @since 2.7.0
  1772  * @since 2.7.0
  1823  * @deprecated 3.0.0
  1773  * @deprecated 3.0.0 Use _nx()
  1824  * @deprecated Use _nx()
       
  1825  * @see _nx()
  1774  * @see _nx()
  1826  * @see _n() For parameters.
  1775  *
  1827  * @see _c() For parameters. _c() is deprecated.
  1776  * @param string $single The text to be used if the number is singular.
  1828  *
  1777  * @param string $plural The text to be used if the number is plural.
       
  1778  * @param int    $number The number to compare against to use either the singular or plural form.
       
  1779  * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
       
  1780  *                       Default 'default'.
       
  1781  * @return string The translated singular or plural form.
  1829  */
  1782  */
  1830 function _nc( $single, $plural, $number, $domain = 'default' ) {
  1783 function _nc( $single, $plural, $number, $domain = 'default' ) {
  1831 	_deprecated_function( __FUNCTION__, '2.9', '_nx()' );
  1784 	_deprecated_function( __FUNCTION__, '2.9.0', '_nx()' );
  1832 	return before_last_bar( _n( $single, $plural, $number, $domain ) );
  1785 	return before_last_bar( _n( $single, $plural, $number, $domain ) );
  1833 }
  1786 }
  1834 
  1787 
  1835 /**
  1788 /**
  1836  * Retrieve the plural or single form based on the amount.
  1789  * Retrieve the plural or single form based on the amount.
  1837  *
  1790  *
  1838  * @since 1.2.0
  1791  * @since 1.2.0
  1839  * @deprecated 2.8.0
  1792  * @deprecated 2.8.0 Use _n()
  1840  * @deprecated Use _n()
       
  1841  * @see _n()
  1793  * @see _n()
  1842  */
  1794  */
  1843 function __ngettext() {
  1795 function __ngettext() {
  1844 	_deprecated_function( __FUNCTION__, '2.8', '_n()' );
  1796 	_deprecated_function( __FUNCTION__, '2.8.0', '_n()' );
  1845 	$args = func_get_args();
  1797 	$args = func_get_args();
  1846 	return call_user_func_array('_n', $args);
  1798 	return call_user_func_array('_n', $args);
  1847 }
  1799 }
  1848 
  1800 
  1849 /**
  1801 /**
  1850  * Register plural strings in POT file, but don't translate them.
  1802  * Register plural strings in POT file, but don't translate them.
  1851  *
  1803  *
  1852  * @since 2.5.0
  1804  * @since 2.5.0
  1853  * @deprecated 2.8.0
  1805  * @deprecated 2.8.0 Use _n_noop()
  1854  * @deprecated Use _n_noop()
       
  1855  * @see _n_noop()
  1806  * @see _n_noop()
  1856  */
  1807  */
  1857 function __ngettext_noop() {
  1808 function __ngettext_noop() {
  1858 	_deprecated_function( __FUNCTION__, '2.8', '_n_noop()' );
  1809 	_deprecated_function( __FUNCTION__, '2.8.0', '_n_noop()' );
  1859 	$args = func_get_args();
  1810 	$args = func_get_args();
  1860 	return call_user_func_array('_n_noop', $args);
  1811 	return call_user_func_array('_n_noop', $args);
  1861 
  1812 
  1862 }
  1813 }
  1863 
  1814 
  1864 /**
  1815 /**
  1865  * Retrieve all autoload options, or all options if no autoloaded ones exist.
  1816  * Retrieve all autoload options, or all options if no autoloaded ones exist.
  1866  *
  1817  *
  1867  * @since 1.0.0
  1818  * @since 1.0.0
  1868  * @deprecated 3.0.0
  1819  * @deprecated 3.0.0 Use wp_load_alloptions())
  1869  * @deprecated Use wp_load_alloptions())
       
  1870  * @see wp_load_alloptions()
  1820  * @see wp_load_alloptions()
  1871  *
  1821  *
  1872  * @return array List of all options.
  1822  * @return array List of all options.
  1873  */
  1823  */
  1874 function get_alloptions() {
  1824 function get_alloptions() {
  1875 	_deprecated_function( __FUNCTION__, '3.0', 'wp_load_alloptions()' );
  1825 	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_load_alloptions()' );
  1876 	return wp_load_alloptions();
  1826 	return wp_load_alloptions();
  1877 }
  1827 }
  1878 
  1828 
  1879 /**
  1829 /**
  1880  * Retrieve HTML content of attachment image with link.
  1830  * Retrieve HTML content of attachment image with link.
  1881  *
  1831  *
  1882  * @since 2.0.0
  1832  * @since 2.0.0
  1883  * @deprecated 2.5.0
  1833  * @deprecated 2.5.0 Use wp_get_attachment_link()
  1884  * @deprecated Use wp_get_attachment_link()
       
  1885  * @see wp_get_attachment_link()
  1834  * @see wp_get_attachment_link()
  1886  *
  1835  *
  1887  * @param int $id Optional. Post ID.
  1836  * @param int $id Optional. Post ID.
  1888  * @param bool $fullsize Optional, default is false. Whether to use full size image.
  1837  * @param bool $fullsize Optional, default is false. Whether to use full size image.
  1889  * @param array $max_dims Optional. Max image dimensions.
  1838  * @param array $max_dims Optional. Max image dimensions.
  1890  * @param bool $permalink Optional, default is false. Whether to include permalink to image.
  1839  * @param bool $permalink Optional, default is false. Whether to include permalink to image.
  1891  * @return string
  1840  * @return string
  1892  */
  1841  */
  1893 function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
  1842 function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
  1894 	_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_link()' );
  1843 	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_link()' );
  1895 	$id = (int) $id;
  1844 	$id = (int) $id;
  1896 	$_post = get_post($id);
  1845 	$_post = get_post($id);
  1897 
  1846 
  1898 	if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
  1847 	if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
  1899 		return __('Missing Attachment');
  1848 		return __('Missing Attachment');
  1909 
  1858 
  1910 /**
  1859 /**
  1911  * Retrieve icon URL and Path.
  1860  * Retrieve icon URL and Path.
  1912  *
  1861  *
  1913  * @since 2.1.0
  1862  * @since 2.1.0
  1914  * @deprecated 2.5.0
  1863  * @deprecated 2.5.0 Use wp_get_attachment_image_src()
  1915  * @deprecated Use wp_get_attachment_image_src()
       
  1916  * @see wp_get_attachment_image_src()
  1864  * @see wp_get_attachment_image_src()
  1917  *
  1865  *
  1918  * @param int $id Optional. Post ID.
  1866  * @param int $id Optional. Post ID.
  1919  * @param bool $fullsize Optional, default to false. Whether to have full image.
  1867  * @param bool $fullsize Optional, default to false. Whether to have full image.
  1920  * @return array Icon URL and full path to file, respectively.
  1868  * @return array Icon URL and full path to file, respectively.
  1921  */
  1869  */
  1922 function get_attachment_icon_src( $id = 0, $fullsize = false ) {
  1870 function get_attachment_icon_src( $id = 0, $fullsize = false ) {
  1923 	_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image_src()' );
  1871 	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image_src()' );
  1924 	$id = (int) $id;
  1872 	$id = (int) $id;
  1925 	if ( !$post = get_post($id) )
  1873 	if ( !$post = get_post($id) )
  1926 		return false;
  1874 		return false;
  1927 
  1875 
  1928 	$file = get_attached_file( $post->ID );
  1876 	$file = get_attached_file( $post->ID );
  1951 
  1899 
  1952 /**
  1900 /**
  1953  * Retrieve HTML content of icon attachment image element.
  1901  * Retrieve HTML content of icon attachment image element.
  1954  *
  1902  *
  1955  * @since 2.0.0
  1903  * @since 2.0.0
  1956  * @deprecated 2.5.0
  1904  * @deprecated 2.5.0 Use wp_get_attachment_image()
  1957  * @deprecated Use wp_get_attachment_image()
       
  1958  * @see wp_get_attachment_image()
  1905  * @see wp_get_attachment_image()
  1959  *
  1906  *
  1960  * @param int $id Optional. Post ID.
  1907  * @param int $id Optional. Post ID.
  1961  * @param bool $fullsize Optional, default to false. Whether to have full size image.
  1908  * @param bool $fullsize Optional, default to false. Whether to have full size image.
  1962  * @param array $max_dims Optional. Dimensions of image.
  1909  * @param array $max_dims Optional. Dimensions of image.
  1963  * @return false|string HTML content.
  1910  * @return false|string HTML content.
  1964  */
  1911  */
  1965 function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
  1912 function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
  1966 	_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
  1913 	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' );
  1967 	$id = (int) $id;
  1914 	$id = (int) $id;
  1968 	if ( !$post = get_post($id) )
  1915 	if ( !$post = get_post($id) )
  1969 		return false;
  1916 		return false;
  1970 
  1917 
  1971 	if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) )
  1918 	if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) )
  2008 
  1955 
  2009 /**
  1956 /**
  2010  * Retrieve HTML content of image element.
  1957  * Retrieve HTML content of image element.
  2011  *
  1958  *
  2012  * @since 2.0.0
  1959  * @since 2.0.0
  2013  * @deprecated 2.5.0
  1960  * @deprecated 2.5.0 Use wp_get_attachment_image()
  2014  * @deprecated Use wp_get_attachment_image()
       
  2015  * @see wp_get_attachment_image()
  1961  * @see wp_get_attachment_image()
  2016  *
  1962  *
  2017  * @param int $id Optional. Post ID.
  1963  * @param int $id Optional. Post ID.
  2018  * @param bool $fullsize Optional, default to false. Whether to have full size image.
  1964  * @param bool $fullsize Optional, default to false. Whether to have full size image.
  2019  * @param array $max_dims Optional. Dimensions of image.
  1965  * @param array $max_dims Optional. Dimensions of image.
  2020  * @return false|string
  1966  * @return false|string
  2021  */
  1967  */
  2022 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
  1968 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
  2023 	_deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
  1969 	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_get_attachment_image()' );
  2024 	$id = (int) $id;
  1970 	$id = (int) $id;
  2025 	if ( !$post = get_post($id) )
  1971 	if ( !$post = get_post($id) )
  2026 		return false;
  1972 		return false;
  2027 
  1973 
  2028 	if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims))
  1974 	if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims))
  2032 
  1978 
  2033 	return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
  1979 	return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
  2034 }
  1980 }
  2035 
  1981 
  2036 /**
  1982 /**
  2037  * Retrieve bookmark data based on ID.
  1983  * Retrieves bookmark data based on ID.
  2038  *
  1984  *
  2039  * @since 2.0.0
  1985  * @since 2.0.0
  2040  * @deprecated 2.1.0
  1986  * @deprecated 2.1.0 Use get_bookmark()
  2041  * @deprecated Use get_bookmark()
       
  2042  * @see get_bookmark()
  1987  * @see get_bookmark()
  2043  *
  1988  *
  2044  * @param int $bookmark_id ID of link
  1989  * @param int    $bookmark_id ID of link
  2045  * @param string $output OBJECT, ARRAY_N, or ARRAY_A
  1990  * @param string $output      Optional. Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A.
  2046  * @return object|array
  1991  *                            Default OBJECT.
  2047  */
  1992  * @param string $filter      Optional. How to filter the link for output. Accepts 'raw', 'edit',
  2048 function get_link($bookmark_id, $output = OBJECT, $filter = 'raw') {
  1993  *                            'attribute', 'js', 'db', or 'display'. Default 'raw'.
  2049 	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmark()' );
  1994  * @return object|array Bookmark object or array, depending on the type specified by `$output`.
       
  1995  */
       
  1996 function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
       
  1997 	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
  2050 	return get_bookmark($bookmark_id, $output, $filter);
  1998 	return get_bookmark($bookmark_id, $output, $filter);
  2051 }
  1999 }
  2052 
  2000 
  2053 /**
  2001 /**
  2054  * Performs esc_url() for database or redirect usage.
  2002  * Performs esc_url() for database or redirect usage.
  2055  *
  2003  *
  2056  * @since 2.3.1
  2004  * @since 2.3.1
  2057  * @deprecated 2.8.0
  2005  * @deprecated 2.8.0 Use esc_url_raw()
  2058  * @deprecated Use esc_url_raw()
       
  2059  * @see esc_url_raw()
  2006  * @see esc_url_raw()
  2060  *
  2007  *
  2061  * @param string $url The URL to be cleaned.
  2008  * @param string $url The URL to be cleaned.
  2062  * @param array $protocols An array of acceptable protocols.
  2009  * @param array $protocols An array of acceptable protocols.
  2063  * @return string The cleaned URL.
  2010  * @return string The cleaned URL.
  2064  */
  2011  */
  2065 function sanitize_url( $url, $protocols = null ) {
  2012 function sanitize_url( $url, $protocols = null ) {
  2066 	_deprecated_function( __FUNCTION__, '2.8', 'esc_url_raw()' );
  2013 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_url_raw()' );
  2067 	return esc_url_raw( $url, $protocols );
  2014 	return esc_url_raw( $url, $protocols );
  2068 }
  2015 }
  2069 
  2016 
  2070 /**
  2017 /**
  2071  * Checks and cleans a URL.
  2018  * Checks and cleans a URL.
  2073  * A number of characters are removed from the URL. If the URL is for displaying
  2020  * A number of characters are removed from the URL. If the URL is for displaying
  2074  * (the default behaviour) ampersands are also replaced. The 'clean_url' filter
  2021  * (the default behaviour) ampersands are also replaced. The 'clean_url' filter
  2075  * is applied to the returned cleaned URL.
  2022  * is applied to the returned cleaned URL.
  2076  *
  2023  *
  2077  * @since 1.2.0
  2024  * @since 1.2.0
  2078  * @deprecated 3.0.0
  2025  * @deprecated 3.0.0 Use esc_url()
  2079  * @deprecated Use esc_url()
  2026  * @see esc_url()
  2080  * @see Alias for esc_url()
       
  2081  *
  2027  *
  2082  * @param string $url The URL to be cleaned.
  2028  * @param string $url The URL to be cleaned.
  2083  * @param array $protocols Optional. An array of acceptable protocols.
  2029  * @param array $protocols Optional. An array of acceptable protocols.
  2084  * @param string $context Optional. How the URL will be used. Default is 'display'.
  2030  * @param string $context Optional. How the URL will be used. Default is 'display'.
  2085  * @return string The cleaned $url after the 'clean_url' filter is applied.
  2031  * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
  2086  */
  2032  */
  2087 function clean_url( $url, $protocols = null, $context = 'display' ) {
  2033 function clean_url( $url, $protocols = null, $context = 'display' ) {
  2088 	if ( $context == 'db' )
  2034 	if ( $context == 'db' )
  2089 		_deprecated_function( 'clean_url( $context = \'db\' )', '3.0', 'esc_url_raw()' );
  2035 		_deprecated_function( 'clean_url( $context = \'db\' )', '3.0.0', 'esc_url_raw()' );
  2090 	else
  2036 	else
  2091 		_deprecated_function( __FUNCTION__, '3.0', 'esc_url()' );
  2037 		_deprecated_function( __FUNCTION__, '3.0.0', 'esc_url()' );
  2092 	return esc_url( $url, $protocols, $context );
  2038 	return esc_url( $url, $protocols, $context );
  2093 }
  2039 }
  2094 
  2040 
  2095 /**
  2041 /**
  2096  * Escape single quotes, specialchar double quotes, and fix line endings.
  2042  * Escape single quotes, specialchar double quotes, and fix line endings.
  2097  *
  2043  *
  2098  * The filter 'js_escape' is also applied by esc_js()
  2044  * The filter {@see 'js_escape'} is also applied by esc_js().
  2099  *
  2045  *
  2100  * @since 2.0.4
  2046  * @since 2.0.4
  2101  * @deprecated 2.8.0
  2047  * @deprecated 2.8.0 Use esc_js()
  2102  * @deprecated Use esc_js()
       
  2103  * @see esc_js()
  2048  * @see esc_js()
  2104  *
  2049  *
  2105  * @param string $text The text to be escaped.
  2050  * @param string $text The text to be escaped.
  2106  * @return string Escaped text.
  2051  * @return string Escaped text.
  2107  */
  2052  */
  2108 function js_escape( $text ) {
  2053 function js_escape( $text ) {
  2109 	_deprecated_function( __FUNCTION__, '2.8', 'esc_js()' );
  2054 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
  2110 	return esc_js( $text );
  2055 	return esc_js( $text );
  2111 }
  2056 }
  2112 
  2057 
  2113 /**
  2058 /**
  2114  * Escaping for HTML blocks.
  2059  * Legacy escaping for HTML blocks.
  2115  *
  2060  *
  2116  * @deprecated 2.8.0
  2061  * @deprecated 2.8.0 Use esc_html()
  2117  * @deprecated Use esc_html()
       
  2118  * @see esc_html()
  2062  * @see esc_html()
       
  2063  *
       
  2064  * @param string       $string        String to escape.
       
  2065  * @param string       $quote_style   Unused.
       
  2066  * @param false|string $charset       Unused.
       
  2067  * @param false        $double_encode Whether to double encode. Unused.
       
  2068  * @return string Escaped `$string`.
  2119  */
  2069  */
  2120 function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
  2070 function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
  2121 	_deprecated_function( __FUNCTION__, '2.8', 'esc_html()' );
  2071 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
  2122 	if ( func_num_args() > 1 ) { // Maintain backwards compat for people passing additional args
  2072 	if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
  2123 		$args = func_get_args();
  2073 		$args = func_get_args();
  2124 		return call_user_func_array( '_wp_specialchars', $args );
  2074 		return call_user_func_array( '_wp_specialchars', $args );
  2125 	} else {
  2075 	} else {
  2126 		return esc_html( $string );
  2076 		return esc_html( $string );
  2127 	}
  2077 	}
  2129 
  2079 
  2130 /**
  2080 /**
  2131  * Escaping for HTML attributes.
  2081  * Escaping for HTML attributes.
  2132  *
  2082  *
  2133  * @since 2.0.6
  2083  * @since 2.0.6
  2134  * @deprecated 2.8.0
  2084  * @deprecated 2.8.0 Use esc_attr()
  2135  * @deprecated Use esc_attr()
       
  2136  * @see esc_attr()
  2085  * @see esc_attr()
  2137  *
  2086  *
  2138  * @param string $text
  2087  * @param string $text
  2139  * @return string
  2088  * @return string
  2140  */
  2089  */
  2141 function attribute_escape( $text ) {
  2090 function attribute_escape( $text ) {
  2142 	_deprecated_function( __FUNCTION__, '2.8', 'esc_attr()' );
  2091 	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_attr()' );
  2143 	return esc_attr( $text );
  2092 	return esc_attr( $text );
  2144 }
  2093 }
  2145 
  2094 
  2146 /**
  2095 /**
  2147  * Register widget for sidebar with backwards compatibility.
  2096  * Register widget for sidebar with backward compatibility.
  2148  *
  2097  *
  2149  * Allows $name to be an array that accepts either three elements to grab the
  2098  * Allows $name to be an array that accepts either three elements to grab the
  2150  * first element and the third for the name or just uses the first element of
  2099  * first element and the third for the name or just uses the first element of
  2151  * the array for the name.
  2100  * the array for the name.
  2152  *
  2101  *
  2153  * Passes to {@link wp_register_sidebar_widget()} after argument list and
  2102  * Passes to wp_register_sidebar_widget() after argument list and backward
  2154  * backwards compatibility is complete.
  2103  * compatibility is complete.
  2155  *
  2104  *
  2156  * @since 2.2.0
  2105  * @since 2.2.0
  2157  * @deprecated 2.8.0
  2106  * @deprecated 2.8.0 Use wp_register_sidebar_widget()
  2158  * @deprecated Use wp_register_sidebar_widget()
       
  2159  * @see wp_register_sidebar_widget()
  2107  * @see wp_register_sidebar_widget()
  2160  *
  2108  *
  2161  * @param string|int $name Widget ID.
  2109  * @param string|int $name            Widget ID.
  2162  * @param callback $output_callback Run when widget is called.
  2110  * @param callable   $output_callback Run when widget is called.
  2163  * @param string $classname Classname widget option.
  2111  * @param string     $classname       Optional. Classname widget option. Default empty.
  2164  * @param mixed $params ,... Widget parameters.
  2112  * @param mixed      $params ,...     Widget parameters.
  2165  */
  2113  */
  2166 function register_sidebar_widget($name, $output_callback, $classname = '') {
  2114 function register_sidebar_widget($name, $output_callback, $classname = '') {
  2167 	_deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' );
  2115 	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' );
  2168 	// Compat
  2116 	// Compat
  2169 	if ( is_array($name) ) {
  2117 	if ( is_array($name) ) {
  2170 		if ( count($name) == 3 )
  2118 		if ( count($name) == 3 )
  2171 			$name = sprintf($name[0], $name[2]);
  2119 			$name = sprintf($name[0], $name[2]);
  2172 		else
  2120 		else
  2184 
  2132 
  2185 	call_user_func_array('wp_register_sidebar_widget', $args);
  2133 	call_user_func_array('wp_register_sidebar_widget', $args);
  2186 }
  2134 }
  2187 
  2135 
  2188 /**
  2136 /**
  2189  * Alias of {@link wp_unregister_sidebar_widget()}.
  2137  * Serves as an alias of wp_unregister_sidebar_widget().
  2190  *
  2138  *
  2191  * @since 2.2.0
  2139  * @since 2.2.0
  2192  * @deprecated 2.8.0
  2140  * @deprecated 2.8.0 Use wp_unregister_sidebar_widget()
  2193  * @deprecated Use wp_unregister_sidebar_widget()
       
  2194  * @see wp_unregister_sidebar_widget()
  2141  * @see wp_unregister_sidebar_widget()
  2195  *
  2142  *
  2196  * @param int|string $id Widget ID.
  2143  * @param int|string $id Widget ID.
  2197  */
  2144  */
  2198 function unregister_sidebar_widget($id) {
  2145 function unregister_sidebar_widget($id) {
  2199 	_deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_sidebar_widget()' );
  2146 	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_sidebar_widget()' );
  2200 	return wp_unregister_sidebar_widget($id);
  2147 	return wp_unregister_sidebar_widget($id);
  2201 }
  2148 }
  2202 
  2149 
  2203 /**
  2150 /**
  2204  * Registers widget control callback for customizing options.
  2151  * Registers widget control callback for customizing options.
  2205  *
  2152  *
  2206  * Allows $name to be an array that accepts either three elements to grab the
  2153  * Allows $name to be an array that accepts either three elements to grab the
  2207  * first element and the third for the name or just uses the first element of
  2154  * first element and the third for the name or just uses the first element of
  2208  * the array for the name.
  2155  * the array for the name.
  2209  *
  2156  *
  2210  * Passes to {@link wp_register_widget_control()} after the argument list has
  2157  * Passes to wp_register_widget_control() after the argument list has
  2211  * been compiled.
  2158  * been compiled.
  2212  *
  2159  *
  2213  * @since 2.2.0
  2160  * @since 2.2.0
  2214  * @deprecated 2.8.0
  2161  * @deprecated 2.8.0 Use wp_register_widget_control()
  2215  * @deprecated Use wp_register_widget_control()
       
  2216  * @see wp_register_widget_control()
  2162  * @see wp_register_widget_control()
  2217  *
  2163  *
  2218  * @param int|string $name Sidebar ID.
  2164  * @param int|string $name Sidebar ID.
  2219  * @param callback $control_callback Widget control callback to display and process form.
  2165  * @param callable $control_callback Widget control callback to display and process form.
  2220  * @param int $width Widget width.
  2166  * @param int $width Widget width.
  2221  * @param int $height Widget height.
  2167  * @param int $height Widget height.
  2222  */
  2168  */
  2223 function register_widget_control($name, $control_callback, $width = '', $height = '') {
  2169 function register_widget_control($name, $control_callback, $width = '', $height = '') {
  2224 	_deprecated_function( __FUNCTION__, '2.8', 'wp_register_widget_control()' );
  2170 	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_widget_control()' );
  2225 	// Compat
  2171 	// Compat
  2226 	if ( is_array($name) ) {
  2172 	if ( is_array($name) ) {
  2227 		if ( count($name) == 3 )
  2173 		if ( count($name) == 3 )
  2228 			$name = sprintf($name[0], $name[2]);
  2174 			$name = sprintf($name[0], $name[2]);
  2229 		else
  2175 		else
  2243 
  2189 
  2244 	call_user_func_array('wp_register_widget_control', $args);
  2190 	call_user_func_array('wp_register_widget_control', $args);
  2245 }
  2191 }
  2246 
  2192 
  2247 /**
  2193 /**
  2248  * Alias of {@link wp_unregister_widget_control()}.
  2194  * Alias of wp_unregister_widget_control().
  2249  *
  2195  *
  2250  * @since 2.2.0
  2196  * @since 2.2.0
  2251  * @deprecated 2.8.0
  2197  * @deprecated 2.8.0 Use wp_unregister_widget_control()
  2252  * @deprecated Use wp_unregister_widget_control()
       
  2253  * @see wp_unregister_widget_control()
  2198  * @see wp_unregister_widget_control()
  2254  *
  2199  *
  2255  * @param int|string $id Widget ID.
  2200  * @param int|string $id Widget ID.
  2256  */
  2201  */
  2257 function unregister_widget_control($id) {
  2202 function unregister_widget_control($id) {
  2258 	_deprecated_function( __FUNCTION__, '2.8', 'wp_unregister_widget_control()' );
  2203 	_deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_widget_control()' );
  2259 	return wp_unregister_widget_control($id);
  2204 	return wp_unregister_widget_control($id);
  2260 }
  2205 }
  2261 
  2206 
  2262 /**
  2207 /**
  2263  * Remove user meta data.
  2208  * Remove user meta data.
  2264  *
  2209  *
  2265  * @since 2.0.0
  2210  * @since 2.0.0
  2266  * @deprecated 3.0.0
  2211  * @deprecated 3.0.0 Use delete_user_meta()
  2267  * @deprecated Use delete_user_meta()
       
  2268  * @see delete_user_meta()
  2212  * @see delete_user_meta()
  2269  *
  2213  *
  2270  * @param int $user_id User ID.
  2214  * @param int $user_id User ID.
  2271  * @param string $meta_key Metadata key.
  2215  * @param string $meta_key Metadata key.
  2272  * @param mixed $meta_value Metadata value.
  2216  * @param mixed $meta_value Metadata value.
  2273  * @return bool True deletion completed and false if user_id is not a number.
  2217  * @return bool True deletion completed and false if user_id is not a number.
  2274  */
  2218  */
  2275 function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
  2219 function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
  2276 	_deprecated_function( __FUNCTION__, '3.0', 'delete_user_meta()' );
  2220 	_deprecated_function( __FUNCTION__, '3.0.0', 'delete_user_meta()' );
  2277 	global $wpdb;
  2221 	global $wpdb;
  2278 	if ( !is_numeric( $user_id ) )
  2222 	if ( !is_numeric( $user_id ) )
  2279 		return false;
  2223 		return false;
  2280 	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
  2224 	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
  2281 
  2225 
  2309  * boolean return value. Other returned values depend on whether there is only
  2253  * boolean return value. Other returned values depend on whether there is only
  2310  * one item to be returned, which be that single item type. If there is more
  2254  * one item to be returned, which be that single item type. If there is more
  2311  * than one metadata value, then it will be list of metadata values.
  2255  * than one metadata value, then it will be list of metadata values.
  2312  *
  2256  *
  2313  * @since 2.0.0
  2257  * @since 2.0.0
  2314  * @deprecated 3.0.0
  2258  * @deprecated 3.0.0 Use get_user_meta()
  2315  * @deprecated Use get_user_meta()
       
  2316  * @see get_user_meta()
  2259  * @see get_user_meta()
  2317  *
  2260  *
  2318  * @param int $user_id User ID
  2261  * @param int $user_id User ID
  2319  * @param string $meta_key Optional. Metadata key.
  2262  * @param string $meta_key Optional. Metadata key.
  2320  * @return mixed
  2263  * @return mixed
  2321  */
  2264  */
  2322 function get_usermeta( $user_id, $meta_key = '' ) {
  2265 function get_usermeta( $user_id, $meta_key = '' ) {
  2323 	_deprecated_function( __FUNCTION__, '3.0', 'get_user_meta()' );
  2266 	_deprecated_function( __FUNCTION__, '3.0.0', 'get_user_meta()' );
  2324 	global $wpdb;
  2267 	global $wpdb;
  2325 	$user_id = (int) $user_id;
  2268 	$user_id = (int) $user_id;
  2326 
  2269 
  2327 	if ( !$user_id )
  2270 	if ( !$user_id )
  2328 		return false;
  2271 		return false;
  2362  * be removed.
  2305  * be removed.
  2363  *
  2306  *
  2364  * Will remove the metadata, if the meta value is empty.
  2307  * Will remove the metadata, if the meta value is empty.
  2365  *
  2308  *
  2366  * @since 2.0.0
  2309  * @since 2.0.0
  2367  * @deprecated 3.0.0
  2310  * @deprecated 3.0.0 Use update_user_meta()
  2368  * @deprecated Use update_user_meta()
       
  2369  * @see update_user_meta()
  2311  * @see update_user_meta()
  2370  *
  2312  *
  2371  * @param int $user_id User ID
  2313  * @param int $user_id User ID
  2372  * @param string $meta_key Metadata key.
  2314  * @param string $meta_key Metadata key.
  2373  * @param mixed $meta_value Metadata value.
  2315  * @param mixed $meta_value Metadata value.
  2374  * @return bool True on successful update, false on failure.
  2316  * @return bool True on successful update, false on failure.
  2375  */
  2317  */
  2376 function update_usermeta( $user_id, $meta_key, $meta_value ) {
  2318 function update_usermeta( $user_id, $meta_key, $meta_value ) {
  2377 	_deprecated_function( __FUNCTION__, '3.0', 'update_user_meta()' );
  2319 	_deprecated_function( __FUNCTION__, '3.0.0', 'update_user_meta()' );
  2378 	global $wpdb;
  2320 	global $wpdb;
  2379 	if ( !is_numeric( $user_id ) )
  2321 	if ( !is_numeric( $user_id ) )
  2380 		return false;
  2322 		return false;
  2381 	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
  2323 	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
  2382 
  2324 
  2411 
  2353 
  2412 	return true;
  2354 	return true;
  2413 }
  2355 }
  2414 
  2356 
  2415 /**
  2357 /**
  2416  * Get users for the blog.
  2358  * Get users for the site.
  2417  *
  2359  *
  2418  * For setups that use the multi-blog feature. Can be used outside of the
  2360  * For setups that use the multisite feature. Can be used outside of the
  2419  * multi-blog feature.
  2361  * multisite feature.
  2420  *
  2362  *
  2421  * @since 2.2.0
  2363  * @since 2.2.0
  2422  * @deprecated 3.1.0
  2364  * @deprecated 3.1.0 Use get_users()
  2423  *
  2365  * @see get_users()
  2424  * @global wpdb $wpdb WordPress database abstraction object.
  2366  *
  2425  * @uses $blog_id The Blog id of the blog for those that use more than one blog
  2367  * @global wpdb $wpdb    WordPress database abstraction object.
  2426  *
  2368  *
  2427  * @param int $id Blog ID.
  2369  * @param int $id Site ID.
  2428  * @return array List of users that are part of that Blog ID
  2370  * @return array List of users that are part of that site ID
  2429  */
  2371  */
  2430 function get_users_of_blog( $id = '' ) {
  2372 function get_users_of_blog( $id = '' ) {
  2431 	_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
  2373 	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
  2432 
  2374 
  2433 	global $wpdb, $blog_id;
  2375 	global $wpdb;
  2434 	if ( empty($id) )
  2376 	if ( empty( $id ) ) {
  2435 		$id = (int) $blog_id;
  2377 		$id = get_current_blog_id();
       
  2378 	}
  2436 	$blog_prefix = $wpdb->get_blog_prefix($id);
  2379 	$blog_prefix = $wpdb->get_blog_prefix($id);
  2437 	$users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
  2380 	$users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
  2438 	return $users;
  2381 	return $users;
  2439 }
  2382 }
  2440 
  2383 
  2441 /**
  2384 /**
  2442  * Enable/disable automatic general feed link outputting.
  2385  * Enable/disable automatic general feed link outputting.
  2443  *
  2386  *
  2444  * @since 2.8.0
  2387  * @since 2.8.0
  2445  * @deprecated 3.0.0
  2388  * @deprecated 3.0.0 Use add_theme_support()
  2446  * @deprecated Use add_theme_support( 'automatic-feed-links' )
  2389  * @see add_theme_support()
  2447  *
  2390  *
  2448  * @param boolean $add Optional, default is true. Add or remove links. Defaults to true.
  2391  * @param bool $add Optional, default is true. Add or remove links. Defaults to true.
  2449  */
  2392  */
  2450 function automatic_feed_links( $add = true ) {
  2393 function automatic_feed_links( $add = true ) {
  2451 	_deprecated_function( __FUNCTION__, '3.0', "add_theme_support( 'automatic-feed-links' )" );
  2394 	_deprecated_function( __FUNCTION__, '3.0.0', "add_theme_support( 'automatic-feed-links' )" );
  2452 
  2395 
  2453 	if ( $add )
  2396 	if ( $add )
  2454 		add_theme_support( 'automatic-feed-links' );
  2397 		add_theme_support( 'automatic-feed-links' );
  2455 	else
  2398 	else
  2456 		remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+
  2399 		remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+
  2458 
  2401 
  2459 /**
  2402 /**
  2460  * Retrieve user data based on field.
  2403  * Retrieve user data based on field.
  2461  *
  2404  *
  2462  * @since 1.5.0
  2405  * @since 1.5.0
  2463  * @deprecated 3.0.0
  2406  * @deprecated 3.0.0 Use get_the_author_meta()
  2464  * @deprecated Use get_the_author_meta()
       
  2465  * @see get_the_author_meta()
  2407  * @see get_the_author_meta()
       
  2408  *
       
  2409  * @param string    $field User meta field.
       
  2410  * @param false|int $user Optional. User ID to retrieve the field for. Default false (current user).
       
  2411  * @return string The author's field from the current author's DB object.
  2466  */
  2412  */
  2467 function get_profile( $field, $user = false ) {
  2413 function get_profile( $field, $user = false ) {
  2468 	_deprecated_function( __FUNCTION__, '3.0', 'get_the_author_meta()' );
  2414 	_deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
  2469 	if ( $user ) {
  2415 	if ( $user ) {
  2470 		$user = get_user_by( 'login', $user );
  2416 		$user = get_user_by( 'login', $user );
  2471 		$user = $user->ID;
  2417 		$user = $user->ID;
  2472 	}
  2418 	}
  2473 	return get_the_author_meta( $field, $user );
  2419 	return get_the_author_meta( $field, $user );
  2474 }
  2420 }
  2475 
  2421 
  2476 /**
  2422 /**
  2477  * Number of posts user has written.
  2423  * Retrieves the number of posts a user has written.
  2478  *
  2424  *
  2479  * @since 0.71
  2425  * @since 0.71
  2480  * @deprecated 3.0.0
  2426  * @deprecated 3.0.0 Use count_user_posts()
  2481  * @deprecated Use count_user_posts()
       
  2482  * @see count_user_posts()
  2427  * @see count_user_posts()
       
  2428  *
       
  2429  * @param int $userid User to count posts for.
       
  2430  * @return int Number of posts the given user has written.
  2483  */
  2431  */
  2484 function get_usernumposts( $userid ) {
  2432 function get_usernumposts( $userid ) {
  2485 	_deprecated_function( __FUNCTION__, '3.0', 'count_user_posts()' );
  2433 	_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
  2486 	return count_user_posts( $userid );
  2434 	return count_user_posts( $userid );
  2487 }
  2435 }
  2488 
  2436 
  2489 /**
  2437 /**
  2490  * Callback used to change %uXXXX to &#YYY; syntax
  2438  * Callback used to change %uXXXX to &#YYY; syntax
  2504  * Fixes JavaScript bugs in browsers.
  2452  * Fixes JavaScript bugs in browsers.
  2505  *
  2453  *
  2506  * Converts unicode characters to HTML numbered entities.
  2454  * Converts unicode characters to HTML numbered entities.
  2507  *
  2455  *
  2508  * @since 1.5.0
  2456  * @since 1.5.0
  2509  * @uses $is_macIE
       
  2510  * @uses $is_winIE
       
  2511  * @deprecated 3.0.0
  2457  * @deprecated 3.0.0
       
  2458  *
       
  2459  * @global $is_macIE
       
  2460  * @global $is_winIE
  2512  *
  2461  *
  2513  * @param string $text Text to be made safe.
  2462  * @param string $text Text to be made safe.
  2514  * @return string Fixed text.
  2463  * @return string Fixed text.
  2515  */
  2464  */
  2516 function funky_javascript_fix($text) {
  2465 function funky_javascript_fix($text) {
  2517 	_deprecated_function( __FUNCTION__, '3.0' );
  2466 	_deprecated_function( __FUNCTION__, '3.0.0' );
  2518 	// Fixes for browsers' JavaScript bugs.
  2467 	// Fixes for browsers' JavaScript bugs.
  2519 	global $is_macIE, $is_winIE;
  2468 	global $is_macIE, $is_winIE;
  2520 
  2469 
  2521 	if ( $is_winIE || $is_macIE )
  2470 	if ( $is_winIE || $is_macIE )
  2522 		$text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
  2471 		$text =  preg_replace_callback("/\%u([0-9A-F]{4,4})/",
  2528 
  2477 
  2529 /**
  2478 /**
  2530  * Checks that the taxonomy name exists.
  2479  * Checks that the taxonomy name exists.
  2531  *
  2480  *
  2532  * @since 2.3.0
  2481  * @since 2.3.0
  2533  * @deprecated 3.0.0
  2482  * @deprecated 3.0.0 Use taxonomy_exists()
  2534  * @deprecated Use taxonomy_exists()
       
  2535  * @see taxonomy_exists()
  2483  * @see taxonomy_exists()
  2536  *
  2484  *
  2537  * @param string $taxonomy Name of taxonomy object
  2485  * @param string $taxonomy Name of taxonomy object
  2538  * @return bool Whether the taxonomy exists.
  2486  * @return bool Whether the taxonomy exists.
  2539  */
  2487  */
  2540 function is_taxonomy( $taxonomy ) {
  2488 function is_taxonomy( $taxonomy ) {
  2541 	_deprecated_function( __FUNCTION__, '3.0', 'taxonomy_exists()' );
  2489 	_deprecated_function( __FUNCTION__, '3.0.0', 'taxonomy_exists()' );
  2542 	return taxonomy_exists( $taxonomy );
  2490 	return taxonomy_exists( $taxonomy );
  2543 }
  2491 }
  2544 
  2492 
  2545 /**
  2493 /**
  2546  * Check if Term exists.
  2494  * Check if Term exists.
  2547  *
  2495  *
  2548  * @since 2.3.0
  2496  * @since 2.3.0
  2549  * @deprecated 3.0.0
  2497  * @deprecated 3.0.0 Use term_exists()
  2550  * @deprecated Use term_exists()
       
  2551  * @see term_exists()
  2498  * @see term_exists()
  2552  *
  2499  *
  2553  * @param int|string $term The term to check
  2500  * @param int|string $term The term to check
  2554  * @param string $taxonomy The taxonomy name to use
  2501  * @param string $taxonomy The taxonomy name to use
  2555  * @param int $parent ID of parent term under which to confine the exists search.
  2502  * @param int $parent ID of parent term under which to confine the exists search.
  2556  * @return mixed Get the term id or Term Object, if exists.
  2503  * @return mixed Get the term id or Term Object, if exists.
  2557  */
  2504  */
  2558 function is_term( $term, $taxonomy = '', $parent = 0 ) {
  2505 function is_term( $term, $taxonomy = '', $parent = 0 ) {
  2559 	_deprecated_function( __FUNCTION__, '3.0', 'term_exists()' );
  2506 	_deprecated_function( __FUNCTION__, '3.0.0', 'term_exists()' );
  2560 	return term_exists( $term, $taxonomy, $parent );
  2507 	return term_exists( $term, $taxonomy, $parent );
  2561 }
  2508 }
  2562 
  2509 
  2563 /**
  2510 /**
  2564  * Is the current admin page generated by a plugin?
  2511  * Is the current admin page generated by a plugin?
       
  2512  *
       
  2513  * Use global $plugin_page and/or get_plugin_page_hookname() hooks.
  2565  *
  2514  *
  2566  * @since 1.5.0
  2515  * @since 1.5.0
  2567  * @deprecated 3.1.0
  2516  * @deprecated 3.1.0
  2568  * @deprecated Use global $plugin_page and/or get_plugin_page_hookname() hooks.
       
  2569  *
  2517  *
  2570  * @global $plugin_page
  2518  * @global $plugin_page
  2571  *
  2519  *
  2572  * @return bool
  2520  * @return bool
  2573  */
  2521  */
  2574 function is_plugin_page() {
  2522 function is_plugin_page() {
  2575 	_deprecated_function( __FUNCTION__, '3.1'  );
  2523 	_deprecated_function( __FUNCTION__, '3.1.0'  );
  2576 
  2524 
  2577 	global $plugin_page;
  2525 	global $plugin_page;
  2578 
  2526 
  2579 	if ( isset($plugin_page) )
  2527 	if ( isset($plugin_page) )
  2580 		return true;
  2528 		return true;
  2593  * @deprecated 3.1.0
  2541  * @deprecated 3.1.0
  2594  *
  2542  *
  2595  * @return bool Always return True
  2543  * @return bool Always return True
  2596  */
  2544  */
  2597 function update_category_cache() {
  2545 function update_category_cache() {
  2598 	_deprecated_function( __FUNCTION__, '3.1'  );
  2546 	_deprecated_function( __FUNCTION__, '3.1.0'  );
  2599 
  2547 
  2600 	return true;
  2548 	return true;
  2601 }
  2549 }
  2602 
  2550 
  2603 /**
  2551 /**
  2607  * @deprecated 3.2.0
  2555  * @deprecated 3.2.0
  2608  *
  2556  *
  2609  * @return bool
  2557  * @return bool
  2610  */
  2558  */
  2611 function wp_timezone_supported() {
  2559 function wp_timezone_supported() {
  2612 	_deprecated_function( __FUNCTION__, '3.2' );
  2560 	_deprecated_function( __FUNCTION__, '3.2.0' );
  2613 
  2561 
  2614 	return true;
  2562 	return true;
  2615 }
  2563 }
  2616 
  2564 
  2617 /**
  2565 /**
  2618  * Display editor: TinyMCE, HTML, or both.
  2566  * Displays an editor: TinyMCE, HTML, or both.
  2619  *
  2567  *
  2620  * @since 2.1.0
  2568  * @since 2.1.0
  2621  * @deprecated 3.3.0
  2569  * @deprecated 3.3.0 Use wp_editor()
  2622  * @deprecated Use wp_editor()
       
  2623  * @see wp_editor()
  2570  * @see wp_editor()
  2624  *
  2571  *
  2625  * @param string $content Textarea content.
  2572  * @param string $content       Textarea content.
  2626  * @param string $id Optional, default is 'content'. HTML ID attribute value.
  2573  * @param string $id            Optional. HTML ID attribute value. Default 'content'.
  2627  * @param string $prev_id Optional, not used
  2574  * @param string $prev_id       Optional. Unused.
  2628  * @param bool $media_buttons Optional, default is true. Whether to display media buttons.
  2575  * @param bool   $media_buttons Optional. Whether to display media buttons. Default true.
  2629  * @param int $tab_index Optional, not used
  2576  * @param int    $tab_index     Optional. Unused.
       
  2577  * @param bool   $extended      Optional. Unused.
  2630  */
  2578  */
  2631 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
  2579 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
  2632 	_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
  2580 	_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
  2633 
  2581 
  2634 	wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
  2582 	wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) );
  2635 }
  2583 }
  2636 
  2584 
  2637 /**
  2585 /**
  2642  *
  2590  *
  2643  * @param array $ids User ID numbers list.
  2591  * @param array $ids User ID numbers list.
  2644  * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays.
  2592  * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays.
  2645  */
  2593  */
  2646 function get_user_metavalues($ids) {
  2594 function get_user_metavalues($ids) {
  2647 	_deprecated_function( __FUNCTION__, '3.3' );
  2595 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2648 
  2596 
  2649 	$objects = array();
  2597 	$objects = array();
  2650 
  2598 
  2651 	$ids = array_map('intval', $ids);
  2599 	$ids = array_map('intval', $ids);
  2652 	foreach ( $ids as $id )
  2600 	foreach ( $ids as $id )
  2676  * @param object|array $user The User Object or Array
  2624  * @param object|array $user The User Object or Array
  2677  * @param string $context Optional, default is 'display'. How to sanitize user fields.
  2625  * @param string $context Optional, default is 'display'. How to sanitize user fields.
  2678  * @return object|array The now sanitized User Object or Array (will be the same type as $user)
  2626  * @return object|array The now sanitized User Object or Array (will be the same type as $user)
  2679  */
  2627  */
  2680 function sanitize_user_object($user, $context = 'display') {
  2628 function sanitize_user_object($user, $context = 'display') {
  2681 	_deprecated_function( __FUNCTION__, '3.3' );
  2629 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2682 
  2630 
  2683 	if ( is_object($user) ) {
  2631 	if ( is_object($user) ) {
  2684 		if ( !isset($user->ID) )
  2632 		if ( !isset($user->ID) )
  2685 			$user->ID = 0;
  2633 			$user->ID = 0;
  2686 		if ( ! ( $user instanceof WP_User ) ) {
  2634 		if ( ! ( $user instanceof WP_User ) ) {
  2715  * @param string $excluded_categories Optional. Excluded categories IDs.
  2663  * @param string $excluded_categories Optional. Excluded categories IDs.
  2716  * @param bool $start Optional, default is true. Whether to display link to first or last post.
  2664  * @param bool $start Optional, default is true. Whether to display link to first or last post.
  2717  * @return string
  2665  * @return string
  2718  */
  2666  */
  2719 function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
  2667 function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
  2720 	_deprecated_function( __FUNCTION__, '3.3' );
  2668 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2721 
  2669 
  2722 	$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
  2670 	$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
  2723 	// If there is no post stop.
  2671 	// If there is no post stop.
  2724 	if ( empty($posts) )
  2672 	if ( empty($posts) )
  2725 		return;
  2673 		return;
  2753  * @param string $title Optional. Link title format.
  2701  * @param string $title Optional. Link title format.
  2754  * @param bool $in_same_cat Optional. Whether link should be in a same category.
  2702  * @param bool $in_same_cat Optional. Whether link should be in a same category.
  2755  * @param string $excluded_categories Optional. Excluded categories IDs.
  2703  * @param string $excluded_categories Optional. Excluded categories IDs.
  2756  */
  2704  */
  2757 function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
  2705 function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
  2758 	_deprecated_function( __FUNCTION__, '3.3' );
  2706 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2759 
  2707 
  2760 	echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true);
  2708 	echo get_boundary_post_rel_link($title, $in_same_cat, $excluded_categories, true);
  2761 }
  2709 }
  2762 
  2710 
  2763 /**
  2711 /**
  2767  * @deprecated 3.3.0
  2715  * @deprecated 3.3.0
  2768  *
  2716  *
  2769  * @return string
  2717  * @return string
  2770  */
  2718  */
  2771 function get_index_rel_link() {
  2719 function get_index_rel_link() {
  2772 	_deprecated_function( __FUNCTION__, '3.3' );
  2720 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2773 
  2721 
  2774 	$link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
  2722 	$link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
  2775 	return apply_filters( "index_rel_link", $link );
  2723 	return apply_filters( "index_rel_link", $link );
  2776 }
  2724 }
  2777 
  2725 
  2780  *
  2728  *
  2781  * @since 2.8.0
  2729  * @since 2.8.0
  2782  * @deprecated 3.3.0
  2730  * @deprecated 3.3.0
  2783  */
  2731  */
  2784 function index_rel_link() {
  2732 function index_rel_link() {
  2785 	_deprecated_function( __FUNCTION__, '3.3' );
  2733 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2786 
  2734 
  2787 	echo get_index_rel_link();
  2735 	echo get_index_rel_link();
  2788 }
  2736 }
  2789 
  2737 
  2790 /**
  2738 /**
  2791  * Get parent post relational link.
  2739  * Get parent post relational link.
  2792  *
  2740  *
  2793  * @since 2.8.0
  2741  * @since 2.8.0
  2794  * @deprecated 3.3.0
  2742  * @deprecated 3.3.0
  2795  *
  2743  *
  2796  * @param string $title Optional. Link title format.
  2744  * @param string $title Optional. Link title format. Default '%title'.
  2797  * @return string
  2745  * @return string
  2798  */
  2746  */
  2799 function get_parent_post_rel_link($title = '%title') {
  2747 function get_parent_post_rel_link( $title = '%title' ) {
  2800 	_deprecated_function( __FUNCTION__, '3.3' );
  2748 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2801 
  2749 
  2802 	if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
  2750 	if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
  2803 		$post = get_post($GLOBALS['post']->post_parent);
  2751 		$post = get_post($GLOBALS['post']->post_parent);
  2804 
  2752 
  2805 	if ( empty($post) )
  2753 	if ( empty($post) )
  2821 /**
  2769 /**
  2822  * Display relational link for parent item
  2770  * Display relational link for parent item
  2823  *
  2771  *
  2824  * @since 2.8.0
  2772  * @since 2.8.0
  2825  * @deprecated 3.3.0
  2773  * @deprecated 3.3.0
  2826  */
  2774  *
  2827 function parent_post_rel_link($title = '%title') {
  2775  * @param string $title Optional. Link title format. Default '%title'.
  2828 	_deprecated_function( __FUNCTION__, '3.3' );
  2776  */
       
  2777 function parent_post_rel_link( $title = '%title' ) {
       
  2778 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2829 
  2779 
  2830 	echo get_parent_post_rel_link($title);
  2780 	echo get_parent_post_rel_link($title);
  2831 }
  2781 }
  2832 
  2782 
  2833 /**
  2783 /**
  2834  * Add the "Dashboard"/"Visit Site" menu.
  2784  * Add the "Dashboard"/"Visit Site" menu.
  2835  *
  2785  *
  2836  * @since 3.2.0
  2786  * @since 3.2.0
  2837  * @deprecated 3.3.0
  2787  * @deprecated 3.3.0
       
  2788  *
       
  2789  * @param WP_Admin_Bar $wp_admin_bar WP_Admin_Bar instance.
  2838  */
  2790  */
  2839 function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
  2791 function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) {
  2840 	_deprecated_function( __FUNCTION__, '3.3' );
  2792 	_deprecated_function( __FUNCTION__, '3.3.0' );
  2841 
  2793 
  2842 	$user_id = get_current_user_id();
  2794 	$user_id = get_current_user_id();
  2843 
  2795 
  2844 	if ( 0 != $user_id ) {
  2796 	if ( 0 != $user_id ) {
  2845 		if ( is_admin() )
  2797 		if ( is_admin() )
  2850 			$wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) );
  2802 			$wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) );
  2851 	}
  2803 	}
  2852 }
  2804 }
  2853 
  2805 
  2854 /**
  2806 /**
  2855  * Checks if the current user belong to a given blog.
  2807  * Checks if the current user belong to a given site.
  2856  *
  2808  *
  2857  * @since MU
  2809  * @since MU (3.0.0)
  2858  * @deprecated 3.3.0
  2810  * @deprecated 3.3.0 Use is_user_member_of_blog()
  2859  * @deprecated Use is_user_member_of_blog()
       
  2860  * @see is_user_member_of_blog()
  2811  * @see is_user_member_of_blog()
  2861  *
  2812  *
  2862  * @param int $blog_id Blog ID
  2813  * @param int $blog_id Site ID
  2863  * @return bool True if the current users belong to $blog_id, false if not.
  2814  * @return bool True if the current users belong to $blog_id, false if not.
  2864  */
  2815  */
  2865 function is_blog_user( $blog_id = 0 ) {
  2816 function is_blog_user( $blog_id = 0 ) {
  2866 	_deprecated_function( __FUNCTION__, '3.3', 'is_user_member_of_blog()' );
  2817 	_deprecated_function( __FUNCTION__, '3.3.0', 'is_user_member_of_blog()' );
  2867 
  2818 
  2868 	return is_user_member_of_blog( get_current_user_id(), $blog_id );
  2819 	return is_user_member_of_blog( get_current_user_id(), $blog_id );
  2869 }
  2820 }
  2870 
  2821 
  2871 /**
  2822 /**
  2872  * Open the file handle for debugging.
  2823  * Open the file handle for debugging.
  2873  *
  2824  *
  2874  * @since 0.71
  2825  * @since 0.71
  2875  * @deprecated Use error_log()
  2826  * @deprecated 3.4.0 Use error_log()
  2876  * @link http://www.php.net/manual/en/function.error-log.php
  2827  * @see error_log()
  2877  * @deprecated 3.4.0
  2828  *
       
  2829  * @link https://secure.php.net/manual/en/function.error-log.php
       
  2830  *
       
  2831  * @param string $filename File name.
       
  2832  * @param string $mode     Type of access you required to the stream.
       
  2833  * @return false Always false.
  2878  */
  2834  */
  2879 function debug_fopen( $filename, $mode ) {
  2835 function debug_fopen( $filename, $mode ) {
  2880 	_deprecated_function( __FUNCTION__, 'error_log()' );
  2836 	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
  2881 	return false;
  2837 	return false;
  2882 }
  2838 }
  2883 
  2839 
  2884 /**
  2840 /**
  2885  * Write contents to the file used for debugging.
  2841  * Write contents to the file used for debugging.
  2886  *
  2842  *
  2887  * @since 0.71
  2843  * @since 0.71
  2888  * @deprecated Use error_log() instead.
  2844  * @deprecated 3.4.0 Use error_log()
  2889  * @link http://www.php.net/manual/en/function.error-log.php
  2845  * @see error_log()
  2890  * @deprecated 3.4.0
  2846  *
       
  2847  * @link https://secure.php.net/manual/en/function.error-log.php
       
  2848  *
       
  2849  * @param mixed  $fp     Unused.
       
  2850  * @param string $string Message to log.
  2891  */
  2851  */
  2892 function debug_fwrite( $fp, $string ) {
  2852 function debug_fwrite( $fp, $string ) {
  2893 	_deprecated_function( __FUNCTION__, 'error_log()' );
  2853 	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
  2894 	if ( ! empty( $GLOBALS['debug'] ) )
  2854 	if ( ! empty( $GLOBALS['debug'] ) )
  2895 		error_log( $string );
  2855 		error_log( $string );
  2896 }
  2856 }
  2897 
  2857 
  2898 /**
  2858 /**
  2899  * Close the debugging file handle.
  2859  * Close the debugging file handle.
  2900  *
  2860  *
  2901  * @since 0.71
  2861  * @since 0.71
  2902  * @deprecated Use error_log()
  2862  * @deprecated 3.4.0 Use error_log()
  2903  * @link http://www.php.net/manual/en/function.error-log.php
  2863  * @see error_log()
  2904  * @deprecated 3.4.0
  2864  *
       
  2865  * @link https://secure.php.net/manual/en/function.error-log.php
       
  2866  *
       
  2867  * @param mixed $fp Unused.
  2905  */
  2868  */
  2906 function debug_fclose( $fp ) {
  2869 function debug_fclose( $fp ) {
  2907 	_deprecated_function( __FUNCTION__, 'error_log()' );
  2870 	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
  2908 }
  2871 }
  2909 
  2872 
  2910 /**
  2873 /**
  2911  * Retrieve list of themes with theme data in theme directory.
  2874  * Retrieve list of themes with theme data in theme directory.
  2912  *
  2875  *
  2913  * The theme is broken, if it doesn't have a parent theme and is missing either
  2876  * The theme is broken, if it doesn't have a parent theme and is missing either
  2914  * style.css and, or index.php. If the theme has a parent theme then it is
  2877  * style.css and, or index.php. If the theme has a parent theme then it is
  2915  * broken, if it is missing style.css; index.php is optional.
  2878  * broken, if it is missing style.css; index.php is optional.
  2916  *
  2879  *
  2917  * @since 1.5.0
  2880  * @since 1.5.0
  2918  * @deprecated 3.4.0
  2881  * @deprecated 3.4.0 Use wp_get_themes()
  2919  * @deprecated Use wp_get_themes()
       
  2920  * @see wp_get_themes()
  2882  * @see wp_get_themes()
  2921  *
  2883  *
  2922  * @return array Theme list with theme data.
  2884  * @return array Theme list with theme data.
  2923  */
  2885  */
  2924 function get_themes() {
  2886 function get_themes() {
  2925 	_deprecated_function( __FUNCTION__, '3.4', 'wp_get_themes()' );
  2887 	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_themes()' );
  2926 
  2888 
  2927 	global $wp_themes;
  2889 	global $wp_themes;
  2928 	if ( isset( $wp_themes ) )
  2890 	if ( isset( $wp_themes ) )
  2929 		return $wp_themes;
  2891 		return $wp_themes;
  2930 
  2892 
  2944 
  2906 
  2945 /**
  2907 /**
  2946  * Retrieve theme data.
  2908  * Retrieve theme data.
  2947  *
  2909  *
  2948  * @since 1.5.0
  2910  * @since 1.5.0
  2949  * @deprecated 3.4.0
  2911  * @deprecated 3.4.0 Use wp_get_theme()
  2950  * @deprecated Use wp_get_theme()
       
  2951  * @see wp_get_theme()
  2912  * @see wp_get_theme()
  2952  *
  2913  *
  2953  * @param string $theme Theme name.
  2914  * @param string $theme Theme name.
  2954  * @return array|null Null, if theme name does not exist. Theme data, if exists.
  2915  * @return array|null Null, if theme name does not exist. Theme data, if exists.
  2955  */
  2916  */
  2956 function get_theme( $theme ) {
  2917 function get_theme( $theme ) {
  2957 	_deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme( $stylesheet )' );
  2918 	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme( $stylesheet )' );
  2958 
  2919 
  2959 	$themes = get_themes();
  2920 	$themes = get_themes();
  2960 	if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
  2921 	if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
  2961 		return $themes[ $theme ];
  2922 		return $themes[ $theme ];
  2962 	return null;
  2923 	return null;
  2964 
  2925 
  2965 /**
  2926 /**
  2966  * Retrieve current theme name.
  2927  * Retrieve current theme name.
  2967  *
  2928  *
  2968  * @since 1.5.0
  2929  * @since 1.5.0
  2969  * @deprecated 3.4.0
  2930  * @deprecated 3.4.0 Use wp_get_theme()
  2970  * @deprecated Use (string) wp_get_theme()
       
  2971  * @see wp_get_theme()
  2931  * @see wp_get_theme()
  2972  *
  2932  *
  2973  * @return string
  2933  * @return string
  2974  */
  2934  */
  2975 function get_current_theme() {
  2935 function get_current_theme() {
  2976 	_deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
  2936 	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
  2977 
  2937 
  2978 	if ( $theme = get_option( 'current_theme' ) )
  2938 	if ( $theme = get_option( 'current_theme' ) )
  2979 		return $theme;
  2939 		return $theme;
  2980 
  2940 
  2981 	return wp_get_theme()->get('Name');
  2941 	return wp_get_theme()->get('Name');
  2992  *
  2952  *
  2993  * @param array|string $matches The array or string
  2953  * @param array|string $matches The array or string
  2994  * @return string The pre block without paragraph/line-break conversion.
  2954  * @return string The pre block without paragraph/line-break conversion.
  2995  */
  2955  */
  2996 function clean_pre($matches) {
  2956 function clean_pre($matches) {
  2997 	_deprecated_function( __FUNCTION__, '3.4' );
  2957 	_deprecated_function( __FUNCTION__, '3.4.0' );
  2998 
  2958 
  2999 	if ( is_array($matches) )
  2959 	if ( is_array($matches) )
  3000 		$text = $matches[1] . $matches[2] . "</pre>";
  2960 		$text = $matches[1] . $matches[2] . "</pre>";
  3001 	else
  2961 	else
  3002 		$text = $matches;
  2962 		$text = $matches;
  3011 
  2971 
  3012 /**
  2972 /**
  3013  * Add callbacks for image header display.
  2973  * Add callbacks for image header display.
  3014  *
  2974  *
  3015  * @since 2.1.0
  2975  * @since 2.1.0
  3016  * @deprecated 3.4.0
  2976  * @deprecated 3.4.0 Use add_theme_support()
  3017  * @deprecated Use add_theme_support('custom-header', $args)
       
  3018  * @see add_theme_support()
  2977  * @see add_theme_support()
  3019  *
  2978  *
  3020  * @param callback $wp_head_callback Call on 'wp_head' action.
  2979  * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
  3021  * @param callback $admin_head_callback Call on custom header administration screen.
  2980  * @param callable $admin_head_callback Call on custom header administration screen.
  3022  * @param callback $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
  2981  * @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
  3023  */
  2982  */
  3024 function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
  2983 function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
  3025 	_deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-header\', $args )' );
  2984 	_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' );
  3026 	$args = array(
  2985 	$args = array(
  3027 		'wp-head-callback'    => $wp_head_callback,
  2986 		'wp-head-callback'    => $wp_head_callback,
  3028 		'admin-head-callback' => $admin_head_callback,
  2987 		'admin-head-callback' => $admin_head_callback,
  3029 	);
  2988 	);
  3030 	if ( $admin_preview_callback )
  2989 	if ( $admin_preview_callback )
  3034 
  2993 
  3035 /**
  2994 /**
  3036  * Remove image header support.
  2995  * Remove image header support.
  3037  *
  2996  *
  3038  * @since 3.1.0
  2997  * @since 3.1.0
  3039  * @deprecated 3.4.0
  2998  * @deprecated 3.4.0 Use remove_theme_support()
  3040  * @deprecated Use remove_theme_support('custom-header')
       
  3041  * @see remove_theme_support()
  2999  * @see remove_theme_support()
  3042  *
  3000  *
  3043  * @return null|bool Whether support was removed.
  3001  * @return null|bool Whether support was removed.
  3044  */
  3002  */
  3045 function remove_custom_image_header() {
  3003 function remove_custom_image_header() {
  3046 	_deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' );
  3004 	_deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-header\' )' );
  3047 	return remove_theme_support( 'custom-header' );
  3005 	return remove_theme_support( 'custom-header' );
  3048 }
  3006 }
  3049 
  3007 
  3050 /**
  3008 /**
  3051  * Add callbacks for background image display.
  3009  * Add callbacks for background image display.
  3052  *
  3010  *
  3053  * @since 3.0.0
  3011  * @since 3.0.0
  3054  * @deprecated 3.4.0
  3012  * @deprecated 3.4.0 Use add_theme_support()
  3055  * @deprecated Use add_theme_support('custom-background, $args)
       
  3056  * @see add_theme_support()
  3013  * @see add_theme_support()
  3057  *
  3014  *
  3058  * @param callback $wp_head_callback Call on 'wp_head' action.
  3015  * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
  3059  * @param callback $admin_head_callback Call on custom background administration screen.
  3016  * @param callable $admin_head_callback Call on custom background administration screen.
  3060  * @param callback $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
  3017  * @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
  3061  */
  3018  */
  3062 function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
  3019 function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) {
  3063 	_deprecated_function( __FUNCTION__, '3.4', 'add_theme_support( \'custom-background\', $args )' );
  3020 	_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-background\', $args )' );
  3064 	$args = array();
  3021 	$args = array();
  3065 	if ( $wp_head_callback )
  3022 	if ( $wp_head_callback )
  3066 		$args['wp-head-callback'] = $wp_head_callback;
  3023 		$args['wp-head-callback'] = $wp_head_callback;
  3067 	if ( $admin_head_callback )
  3024 	if ( $admin_head_callback )
  3068 		$args['admin-head-callback'] = $admin_head_callback;
  3025 		$args['admin-head-callback'] = $admin_head_callback;
  3073 
  3030 
  3074 /**
  3031 /**
  3075  * Remove custom background support.
  3032  * Remove custom background support.
  3076  *
  3033  *
  3077  * @since 3.1.0
  3034  * @since 3.1.0
       
  3035  * @deprecated 3.4.0 Use add_custom_background()
  3078  * @see add_custom_background()
  3036  * @see add_custom_background()
  3079  *
  3037  *
  3080  * @return null|bool Whether support was removed.
  3038  * @return null|bool Whether support was removed.
  3081  */
  3039  */
  3082 function remove_custom_background() {
  3040 function remove_custom_background() {
  3083 	_deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' );
  3041 	_deprecated_function( __FUNCTION__, '3.4.0', 'remove_theme_support( \'custom-background\' )' );
  3084 	return remove_theme_support( 'custom-background' );
  3042 	return remove_theme_support( 'custom-background' );
  3085 }
  3043 }
  3086 
  3044 
  3087 /**
  3045 /**
  3088  * Retrieve theme data from parsed theme file.
  3046  * Retrieve theme data from parsed theme file.
  3089  *
  3047  *
  3090  * @since 1.5.0
  3048  * @since 1.5.0
  3091  * @deprecated 3.4.0
  3049  * @deprecated 3.4.0 Use wp_get_theme()
  3092  * @deprecated Use wp_get_theme()
       
  3093  * @see wp_get_theme()
  3050  * @see wp_get_theme()
  3094  *
  3051  *
  3095  * @param string $theme_file Theme file path.
  3052  * @param string $theme_file Theme file path.
  3096  * @return array Theme data.
  3053  * @return array Theme data.
  3097  */
  3054  */
  3098 function get_theme_data( $theme_file ) {
  3055 function get_theme_data( $theme_file ) {
  3099 	_deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
  3056 	_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
  3100 	$theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
  3057 	$theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
  3101 
  3058 
  3102 	$theme_data = array(
  3059 	$theme_data = array(
  3103 		'Name' => $theme->get('Name'),
  3060 		'Name' => $theme->get('Name'),
  3104 		'URI' => $theme->display('ThemeURI', true, false),
  3061 		'URI' => $theme->display('ThemeURI', true, false),
  3125  * Alias of update_post_cache().
  3082  * Alias of update_post_cache().
  3126  *
  3083  *
  3127  * @see update_post_cache() Posts and pages are the same, alias is intentional
  3084  * @see update_post_cache() Posts and pages are the same, alias is intentional
  3128  *
  3085  *
  3129  * @since 1.5.1
  3086  * @since 1.5.1
  3130  * @deprecated 3.4.0
  3087  * @deprecated 3.4.0 Use update_post_cache()
       
  3088  * @see update_post_cache()
  3131  *
  3089  *
  3132  * @param array $pages list of page objects
  3090  * @param array $pages list of page objects
  3133  */
  3091  */
  3134 function update_page_cache( &$pages ) {
  3092 function update_page_cache( &$pages ) {
  3135 	_deprecated_function( __FUNCTION__, '3.4', 'update_post_cache()' );
  3093 	_deprecated_function( __FUNCTION__, '3.4.0', 'update_post_cache()' );
  3136 
  3094 
  3137 	update_post_cache( $pages );
  3095 	update_post_cache( $pages );
  3138 }
  3096 }
  3139 
  3097 
  3140 /**
  3098 /**
  3142  *
  3100  *
  3143  * Clean (read: delete) page from cache that matches $id. Will also clean cache
  3101  * Clean (read: delete) page from cache that matches $id. Will also clean cache
  3144  * associated with 'all_page_ids' and 'get_pages'.
  3102  * associated with 'all_page_ids' and 'get_pages'.
  3145  *
  3103  *
  3146  * @since 2.0.0
  3104  * @since 2.0.0
  3147  * @deprecated 3.4.0
  3105  * @deprecated 3.4.0 Use clean_post_cache
       
  3106  * @see clean_post_cache()
  3148  *
  3107  *
  3149  * @param int $id Page ID to clean
  3108  * @param int $id Page ID to clean
  3150  */
  3109  */
  3151 function clean_page_cache( $id ) {
  3110 function clean_page_cache( $id ) {
  3152 	_deprecated_function( __FUNCTION__, '3.4', 'clean_post_cache()' );
  3111 	_deprecated_function( __FUNCTION__, '3.4.0', 'clean_post_cache()' );
  3153 
  3112 
  3154 	clean_post_cache( $id );
  3113 	clean_post_cache( $id );
  3155 }
  3114 }
  3156 
  3115 
  3157 /**
  3116 /**
  3158  * Retrieve nonce action "Are you sure" message.
  3117  * Retrieve nonce action "Are you sure" message.
  3159  *
  3118  *
  3160  * Deprecated in 3.4.1 and 3.5.0. Backported to 3.3.3.
  3119  * Deprecated in 3.4.1 and 3.5.0. Backported to 3.3.3.
  3161  *
  3120  *
  3162  * @since 2.0.4
  3121  * @since 2.0.4
  3163  * @deprecated 3.4.1
  3122  * @deprecated 3.4.1 Use wp_nonce_ays()
  3164  * @deprecated Use wp_nonce_ays()
       
  3165  * @see wp_nonce_ays()
  3123  * @see wp_nonce_ays()
  3166  *
  3124  *
  3167  * @param string $action Nonce action.
  3125  * @param string $action Nonce action.
  3168  * @return string Are you sure message.
  3126  * @return string Are you sure message.
  3169  */
  3127  */
  3174 
  3132 
  3175 /**
  3133 /**
  3176  * Display "sticky" CSS class, if a post is sticky.
  3134  * Display "sticky" CSS class, if a post is sticky.
  3177  *
  3135  *
  3178  * @since 2.7.0
  3136  * @since 2.7.0
  3179  * @deprecated 3.5.0
  3137  * @deprecated 3.5.0 Use post_class()
  3180  * @deprecated Use post_class()
       
  3181  * @see post_class()
  3138  * @see post_class()
  3182  *
  3139  *
  3183  * @param int $post_id An optional post ID.
  3140  * @param int $post_id An optional post ID.
  3184  */
  3141  */
  3185 function sticky_class( $post_id = null ) {
  3142 function sticky_class( $post_id = null ) {
  3186 	_deprecated_function( __FUNCTION__, '3.5', 'post_class()' );
  3143 	_deprecated_function( __FUNCTION__, '3.5.0', 'post_class()' );
  3187 	if ( is_sticky( $post_id ) )
  3144 	if ( is_sticky( $post_id ) )
  3188 		echo ' sticky';
  3145 		echo ' sticky';
  3189 }
  3146 }
  3190 
  3147 
  3191 /**
  3148 /**
  3193  *
  3150  *
  3194  * This is no longer needed as WP_Post lazy-loads the ancestors
  3151  * This is no longer needed as WP_Post lazy-loads the ancestors
  3195  * property with get_post_ancestors().
  3152  * property with get_post_ancestors().
  3196  *
  3153  *
  3197  * @since 2.3.4
  3154  * @since 2.3.4
  3198  * @deprecated 3.5.0
  3155  * @deprecated 3.5.0 Use get_post_ancestors()
  3199  * @see get_post_ancestors()
  3156  * @see get_post_ancestors()
       
  3157  *
       
  3158  * @param WP_Post $post Post object, passed by reference (unused).
  3200  */
  3159  */
  3201 function _get_post_ancestors( &$post ) {
  3160 function _get_post_ancestors( &$post ) {
  3202 	_deprecated_function( __FUNCTION__, '3.5' );
  3161 	_deprecated_function( __FUNCTION__, '3.5.0' );
  3203 }
  3162 }
  3204 
  3163 
  3205 /**
  3164 /**
  3206  * Load an image from a string, if PHP supports it.
  3165  * Load an image from a string, if PHP supports it.
  3207  *
  3166  *
  3208  * @since 2.1.0
  3167  * @since 2.1.0
  3209  * @deprecated 3.5.0
  3168  * @deprecated 3.5.0 Use wp_get_image_editor()
  3210  * @see wp_get_image_editor()
  3169  * @see wp_get_image_editor()
  3211  *
  3170  *
  3212  * @param string $file Filename of the image to load.
  3171  * @param string $file Filename of the image to load.
  3213  * @return resource The resulting image resource on success, Error string on failure.
  3172  * @return resource The resulting image resource on success, Error string on failure.
  3214  */
  3173  */
  3215 function wp_load_image( $file ) {
  3174 function wp_load_image( $file ) {
  3216 	_deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' );
  3175 	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
  3217 
  3176 
  3218 	if ( is_numeric( $file ) )
  3177 	if ( is_numeric( $file ) )
  3219 		$file = get_attached_file( $file );
  3178 		$file = get_attached_file( $file );
  3220 
  3179 
  3221 	if ( ! is_file( $file ) )
  3180 	if ( ! is_file( $file ) ) {
  3222 		return sprintf(__('File &#8220;%s&#8221; doesn&#8217;t exist?'), $file);
  3181 		/* translators: %s: file name */
       
  3182 		return sprintf( __( 'File &#8220;%s&#8221; doesn&#8217;t exist?' ), $file );
       
  3183 	}
  3223 
  3184 
  3224 	if ( ! function_exists('imagecreatefromstring') )
  3185 	if ( ! function_exists('imagecreatefromstring') )
  3225 		return __('The GD image library is not installed.');
  3186 		return __('The GD image library is not installed.');
  3226 
  3187 
  3227 	// Set artificially high because GD uses uncompressed images in memory
  3188 	// Set artificially high because GD uses uncompressed images in memory.
  3228 	@ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
  3189 	wp_raise_memory_limit( 'image' );
       
  3190 
  3229 	$image = imagecreatefromstring( file_get_contents( $file ) );
  3191 	$image = imagecreatefromstring( file_get_contents( $file ) );
  3230 
  3192 
  3231 	if ( !is_resource( $image ) )
  3193 	if ( ! is_resource( $image ) ) {
  3232 		return sprintf(__('File &#8220;%s&#8221; is not an image.'), $file);
  3194 		/* translators: %s: file name */
       
  3195 		return sprintf( __( 'File &#8220;%s&#8221; is not an image.' ), $file );
       
  3196 	}
  3233 
  3197 
  3234 	return $image;
  3198 	return $image;
  3235 }
  3199 }
  3236 
  3200 
  3237 /**
  3201 /**
  3244  * Some functionality requires API to exist, so some PHP version may lose out
  3208  * Some functionality requires API to exist, so some PHP version may lose out
  3245  * support. This is not the fault of WordPress (where functionality is
  3209  * support. This is not the fault of WordPress (where functionality is
  3246  * downgraded, not actual defects), but of your PHP version.
  3210  * downgraded, not actual defects), but of your PHP version.
  3247  *
  3211  *
  3248  * @since 2.5.0
  3212  * @since 2.5.0
  3249  * @deprecated 3.5.0
  3213  * @deprecated 3.5.0 Use wp_get_image_editor()
  3250  * @see wp_get_image_editor()
  3214  * @see wp_get_image_editor()
  3251  *
  3215  *
  3252  * @param string $file Image file path.
  3216  * @param string $file Image file path.
  3253  * @param int $max_w Maximum width to resize to.
  3217  * @param int $max_w Maximum width to resize to.
  3254  * @param int $max_h Maximum height to resize to.
  3218  * @param int $max_h Maximum height to resize to.
  3257  * @param string $dest_path Optional. New image file path.
  3221  * @param string $dest_path Optional. New image file path.
  3258  * @param int $jpeg_quality Optional, default is 90. Image quality percentage.
  3222  * @param int $jpeg_quality Optional, default is 90. Image quality percentage.
  3259  * @return mixed WP_Error on failure. String with new destination path.
  3223  * @return mixed WP_Error on failure. String with new destination path.
  3260  */
  3224  */
  3261 function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
  3225 function image_resize( $file, $max_w, $max_h, $crop = false, $suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
  3262 	_deprecated_function( __FUNCTION__, '3.5', 'wp_get_image_editor()' );
  3226 	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_get_image_editor()' );
  3263 
  3227 
  3264 	$editor = wp_get_image_editor( $file );
  3228 	$editor = wp_get_image_editor( $file );
  3265 	if ( is_wp_error( $editor ) )
  3229 	if ( is_wp_error( $editor ) )
  3266 		return $editor;
  3230 		return $editor;
  3267 	$editor->set_quality( $jpeg_quality );
  3231 	$editor->set_quality( $jpeg_quality );
  3284  *
  3248  *
  3285  * Has categories in 'post_category' property or key. Has tags in 'tags_input'
  3249  * Has categories in 'post_category' property or key. Has tags in 'tags_input'
  3286  * property or key.
  3250  * property or key.
  3287  *
  3251  *
  3288  * @since 1.0.0
  3252  * @since 1.0.0
  3289  * @deprecated 3.5.0
  3253  * @deprecated 3.5.0 Use get_post()
  3290  * @see get_post()
  3254  * @see get_post()
  3291  *
  3255  *
  3292  * @param int $postid Post ID.
  3256  * @param int $postid Post ID.
  3293  * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
  3257  * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
  3294  * @return WP_Post|null Post object or array holding post contents and information
  3258  * @return WP_Post|null Post object or array holding post contents and information
  3295  */
  3259  */
  3296 function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
  3260 function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
  3297 	_deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
  3261 	_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
  3298 	return get_post( $postid, $mode );
  3262 	return get_post( $postid, $mode );
  3299 }
  3263 }
  3300 
  3264 
  3301 /**
  3265 /**
  3302  * Check that the user login name and password is correct.
  3266  * Check that the user login name and password is correct.
  3303  *
  3267  *
  3304  * @since 0.71
  3268  * @since 0.71
  3305  * @deprecated 3.5.0
  3269  * @deprecated 3.5.0 Use wp_authenticate()
  3306  * @deprecated Use wp_authenticate()
       
  3307  * @see wp_authenticate()
  3270  * @see wp_authenticate()
  3308  *
  3271  *
  3309  * @param string $user_login User name.
  3272  * @param string $user_login User name.
  3310  * @param string $user_pass User password.
  3273  * @param string $user_pass User password.
  3311  * @return bool False if does not authenticate, true if username and password authenticates.
  3274  * @return bool False if does not authenticate, true if username and password authenticates.
  3312  */
  3275  */
  3313 function user_pass_ok($user_login, $user_pass) {
  3276 function user_pass_ok($user_login, $user_pass) {
  3314 	_deprecated_function( __FUNCTION__, '3.5', 'wp_authenticate()' );
  3277 	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_authenticate()' );
  3315 	$user = wp_authenticate( $user_login, $user_pass );
  3278 	$user = wp_authenticate( $user_login, $user_pass );
  3316 	if ( is_wp_error( $user ) )
  3279 	if ( is_wp_error( $user ) )
  3317 		return false;
  3280 		return false;
  3318 
  3281 
  3319 	return true;
  3282 	return true;
  3329 
  3292 
  3330 /**
  3293 /**
  3331  * Check if the installed version of GD supports particular image type
  3294  * Check if the installed version of GD supports particular image type
  3332  *
  3295  *
  3333  * @since 2.9.0
  3296  * @since 2.9.0
  3334  * @deprecated 3.5.0
  3297  * @deprecated 3.5.0 Use wp_image_editor_supports()
  3335  * @see wp_image_editor_supports()
  3298  * @see wp_image_editor_supports()
  3336  *
  3299  *
  3337  * @param string $mime_type
  3300  * @param string $mime_type
  3338  * @return bool
  3301  * @return bool
  3339  */
  3302  */
  3340 function gd_edit_image_support($mime_type) {
  3303 function gd_edit_image_support($mime_type) {
  3341 	_deprecated_function( __FUNCTION__, '3.5', 'wp_image_editor_supports()' );
  3304 	_deprecated_function( __FUNCTION__, '3.5.0', 'wp_image_editor_supports()' );
  3342 
  3305 
  3343 	if ( function_exists('imagetypes') ) {
  3306 	if ( function_exists('imagetypes') ) {
  3344 		switch( $mime_type ) {
  3307 		switch( $mime_type ) {
  3345 			case 'image/jpeg':
  3308 			case 'image/jpeg':
  3346 				return (imagetypes() & IMG_JPG) != 0;
  3309 				return (imagetypes() & IMG_JPG) != 0;
  3364 
  3327 
  3365 /**
  3328 /**
  3366  * Converts an integer byte value to a shorthand byte value.
  3329  * Converts an integer byte value to a shorthand byte value.
  3367  *
  3330  *
  3368  * @since 2.3.0
  3331  * @since 2.3.0
  3369  * @deprecated 3.6.0
  3332  * @deprecated 3.6.0 Use size_format()
  3370  * @deprecated Use size_format()
  3333  * @see size_format()
  3371  *
  3334  *
  3372  * @param int $bytes An integer byte value.
  3335  * @param int $bytes An integer byte value.
  3373  * @return string A shorthand byte value.
  3336  * @return string A shorthand byte value.
  3374  */
  3337  */
  3375 function wp_convert_bytes_to_hr( $bytes ) {
  3338 function wp_convert_bytes_to_hr( $bytes ) {
  3376 	_deprecated_function( __FUNCTION__, '3.6', 'size_format()' );
  3339 	_deprecated_function( __FUNCTION__, '3.6.0', 'size_format()' );
  3377 
  3340 
  3378 	$units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
  3341 	$units = array( 0 => 'B', 1 => 'KB', 2 => 'MB', 3 => 'GB', 4 => 'TB' );
  3379 	$log   = log( $bytes, 1024 );
  3342 	$log   = log( $bytes, KB_IN_BYTES );
  3380 	$power = (int) $log;
  3343 	$power = (int) $log;
  3381 	$size  = pow( 1024, $log - $power );
  3344 	$size  = pow( KB_IN_BYTES, $log - $power );
  3382 
  3345 
  3383 	if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) {
  3346 	if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) {
  3384 		$unit = $units[ $power ];
  3347 		$unit = $units[ $power ];
  3385 	} else {
  3348 	} else {
  3386 		$size = $bytes;
  3349 		$size = $bytes;
  3391 }
  3354 }
  3392 
  3355 
  3393 /**
  3356 /**
  3394  * Formerly used internally to tidy up the search terms.
  3357  * Formerly used internally to tidy up the search terms.
  3395  *
  3358  *
       
  3359  * @since 2.9.0
  3396  * @access private
  3360  * @access private
  3397  * @since 2.9.0
       
  3398  * @deprecated 3.7.0
  3361  * @deprecated 3.7.0
       
  3362  *
       
  3363  * @param string $t Search terms to "tidy", e.g. trim.
       
  3364  * @return string Trimmed search terms.
  3399  */
  3365  */
  3400 function _search_terms_tidy( $t ) {
  3366 function _search_terms_tidy( $t ) {
  3401 	_deprecated_function( __FUNCTION__, '3.7' );
  3367 	_deprecated_function( __FUNCTION__, '3.7.0' );
  3402 	return trim( $t, "\"'\n\r " );
  3368 	return trim( $t, "\"'\n\r " );
  3403 }
  3369 }
  3404 
  3370 
  3405 /**
  3371 /**
  3406  * Determine if TinyMCE is available.
  3372  * Determine if TinyMCE is available.
  3407  *
  3373  *
  3408  * Checks to see if the user has deleted the tinymce files to slim down
  3374  * Checks to see if the user has deleted the tinymce files to slim down
  3409  * their WordPress install.
  3375  * their WordPress installation.
  3410  *
  3376  *
  3411  * @since 2.1.0
  3377  * @since 2.1.0
  3412  * @deprecated 3.9.0
  3378  * @deprecated 3.9.0
  3413  *
  3379  *
  3414  * @return bool Whether TinyMCE exists.
  3380  * @return bool Whether TinyMCE exists.
  3415  */
  3381  */
  3416 function rich_edit_exists() {
  3382 function rich_edit_exists() {
  3417 	global $wp_rich_edit_exists;
  3383 	global $wp_rich_edit_exists;
  3418 	_deprecated_function( __FUNCTION__, '3.9' );
  3384 	_deprecated_function( __FUNCTION__, '3.9.0' );
  3419 
  3385 
  3420 	if ( ! isset( $wp_rich_edit_exists ) )
  3386 	if ( ! isset( $wp_rich_edit_exists ) )
  3421 		$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
  3387 		$wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' );
  3422 
  3388 
  3423 	return $wp_rich_edit_exists;
  3389 	return $wp_rich_edit_exists;
  3425 
  3391 
  3426 /**
  3392 /**
  3427  * Old callback for tag link tooltips.
  3393  * Old callback for tag link tooltips.
  3428  *
  3394  *
  3429  * @since 2.7.0
  3395  * @since 2.7.0
       
  3396  * @access private
  3430  * @deprecated 3.9.0
  3397  * @deprecated 3.9.0
  3431  * @access private
  3398  *
       
  3399  * @param int $count Number of topics.
       
  3400  * @return int Number of topics.
  3432  */
  3401  */
  3433 function default_topic_count_text( $count ) {
  3402 function default_topic_count_text( $count ) {
  3434 	return $count;
  3403 	return $count;
  3435 }
  3404 }
  3436 
  3405 
  3444  *
  3413  *
  3445  * @param string $content The text to format.
  3414  * @param string $content The text to format.
  3446  * @return string The very same text.
  3415  * @return string The very same text.
  3447  */
  3416  */
  3448 function format_to_post( $content ) {
  3417 function format_to_post( $content ) {
  3449 	_deprecated_function( __FUNCTION__, '3.9' );
  3418 	_deprecated_function( __FUNCTION__, '3.9.0' );
  3450 	return $content;
  3419 	return $content;
  3451 }
  3420 }
  3452 
  3421 
  3453 /**
  3422 /**
  3454  * Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
  3423  * Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described.
       
  3424  *
       
  3425  * @since 2.5.0
       
  3426  * @deprecated 4.0.0 Use wpdb::esc_like()
       
  3427  * @see wpdb::esc_like()
       
  3428  *
       
  3429  * @param string $text The text to be escaped.
       
  3430  * @return string text, safe for inclusion in LIKE query.
       
  3431  */
       
  3432 function like_escape($text) {
       
  3433 	_deprecated_function( __FUNCTION__, '4.0.0', 'wpdb::esc_like()' );
       
  3434 	return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
       
  3435 }
       
  3436 
       
  3437 /**
       
  3438  * Determines if the URL can be accessed over SSL.
       
  3439  *
       
  3440  * Determines if the URL can be accessed over SSL by using the WordPress HTTP API to access
       
  3441  * the URL using https as the scheme.
  3455  *
  3442  *
  3456  * @since 2.5.0
  3443  * @since 2.5.0
  3457  * @deprecated 4.0.0
  3444  * @deprecated 4.0.0
  3458  * @deprecated Use wpdb::esc_like()
       
  3459  *
       
  3460  * @param string $text The text to be escaped.
       
  3461  * @return string text, safe for inclusion in LIKE query.
       
  3462  */
       
  3463 function like_escape($text) {
       
  3464 	_deprecated_function( __FUNCTION__, '4.0', 'wpdb::esc_like()' );
       
  3465 	return str_replace( array( "%", "_" ), array( "\\%", "\\_" ), $text );
       
  3466 }
       
  3467 
       
  3468 /**
       
  3469  * Determines if the URL can be accessed over SSL.
       
  3470  *
       
  3471  * Determines if the URL can be accessed over SSL by using the WordPress HTTP API to access
       
  3472  * the URL using https as the scheme.
       
  3473  *
       
  3474  * @since 2.5.0
       
  3475  * @deprecated 4.0.0
       
  3476  *
  3445  *
  3477  * @param string $url The URL to test.
  3446  * @param string $url The URL to test.
  3478  * @return bool Whether SSL access is available.
  3447  * @return bool Whether SSL access is available.
  3479  */
  3448  */
  3480 function url_is_accessable_via_ssl( $url ) {
  3449 function url_is_accessable_via_ssl( $url ) {
  3481 	_deprecated_function( __FUNCTION__, '4.0' );
  3450 	_deprecated_function( __FUNCTION__, '4.0.0' );
  3482 
  3451 
  3483 	$response = wp_remote_get( set_url_scheme( $url, 'https' ) );
  3452 	$response = wp_remote_get( set_url_scheme( $url, 'https' ) );
  3484 
  3453 
  3485 	if ( !is_wp_error( $response ) ) {
  3454 	if ( !is_wp_error( $response ) ) {
  3486 		$status = wp_remote_retrieve_response_code( $response );
  3455 		$status = wp_remote_retrieve_response_code( $response );
  3489 		}
  3458 		}
  3490 	}
  3459 	}
  3491 
  3460 
  3492 	return false;
  3461 	return false;
  3493 }
  3462 }
       
  3463 
       
  3464 /**
       
  3465  * Start preview theme output buffer.
       
  3466  *
       
  3467  * Will only perform task if the user has permissions and template and preview
       
  3468  * query variables exist.
       
  3469  *
       
  3470  * @since 2.6.0
       
  3471  * @deprecated 4.3.0
       
  3472  */
       
  3473 function preview_theme() {
       
  3474 	_deprecated_function( __FUNCTION__, '4.3.0' );
       
  3475 }
       
  3476 
       
  3477 /**
       
  3478  * Private function to modify the current template when previewing a theme
       
  3479  *
       
  3480  * @since 2.9.0
       
  3481  * @deprecated 4.3.0
       
  3482  * @access private
       
  3483  *
       
  3484  * @return string
       
  3485  */
       
  3486 function _preview_theme_template_filter() {
       
  3487 	_deprecated_function( __FUNCTION__, '4.3.0' );
       
  3488 	return '';
       
  3489 }
       
  3490 
       
  3491 /**
       
  3492  * Private function to modify the current stylesheet when previewing a theme
       
  3493  *
       
  3494  * @since 2.9.0
       
  3495  * @deprecated 4.3.0
       
  3496  * @access private
       
  3497  *
       
  3498  * @return string
       
  3499  */
       
  3500 function _preview_theme_stylesheet_filter() {
       
  3501 	_deprecated_function( __FUNCTION__, '4.3.0' );
       
  3502 	return '';
       
  3503 }
       
  3504 
       
  3505 /**
       
  3506  * Callback function for ob_start() to capture all links in the theme.
       
  3507  *
       
  3508  * @since 2.6.0
       
  3509  * @deprecated 4.3.0
       
  3510  * @access private
       
  3511  *
       
  3512  * @param string $content
       
  3513  * @return string
       
  3514  */
       
  3515 function preview_theme_ob_filter( $content ) {
       
  3516 	_deprecated_function( __FUNCTION__, '4.3.0' );
       
  3517 	return $content;
       
  3518 }
       
  3519 
       
  3520 /**
       
  3521  * Manipulates preview theme links in order to control and maintain location.
       
  3522  *
       
  3523  * Callback function for preg_replace_callback() to accept and filter matches.
       
  3524  *
       
  3525  * @since 2.6.0
       
  3526  * @deprecated 4.3.0
       
  3527  * @access private
       
  3528  *
       
  3529  * @param array $matches
       
  3530  * @return string
       
  3531  */
       
  3532 function preview_theme_ob_filter_callback( $matches ) {
       
  3533 	_deprecated_function( __FUNCTION__, '4.3.0' );
       
  3534 	return '';
       
  3535 }
       
  3536 
       
  3537 /**
       
  3538  * Formats text for the rich text editor.
       
  3539  *
       
  3540  * The {@see 'richedit_pre'} filter is applied here. If $text is empty the filter will
       
  3541  * be applied to an empty string.
       
  3542  *
       
  3543  * @since 2.0.0
       
  3544  * @deprecated 4.3.0 Use format_for_editor()
       
  3545  * @see format_for_editor()
       
  3546  *
       
  3547  * @param string $text The text to be formatted.
       
  3548  * @return string The formatted text after filter is applied.
       
  3549  */
       
  3550 function wp_richedit_pre($text) {
       
  3551 	_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
       
  3552 
       
  3553 	if ( empty( $text ) ) {
       
  3554 		/**
       
  3555 		 * Filters text returned for the rich text editor.
       
  3556 		 *
       
  3557 		 * This filter is first evaluated, and the value returned, if an empty string
       
  3558 		 * is passed to wp_richedit_pre(). If an empty string is passed, it results
       
  3559 		 * in a break tag and line feed.
       
  3560 		 *
       
  3561 		 * If a non-empty string is passed, the filter is evaluated on the wp_richedit_pre()
       
  3562 		 * return after being formatted.
       
  3563 		 *
       
  3564 		 * @since 2.0.0
       
  3565 		 * @deprecated 4.3.0
       
  3566 		 *
       
  3567 		 * @param string $output Text for the rich text editor.
       
  3568 		 */
       
  3569 		return apply_filters( 'richedit_pre', '' );
       
  3570 	}
       
  3571 
       
  3572 	$output = convert_chars($text);
       
  3573 	$output = wpautop($output);
       
  3574 	$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) );
       
  3575 
       
  3576 	/** This filter is documented in wp-includes/deprecated.php */
       
  3577 	return apply_filters( 'richedit_pre', $output );
       
  3578 }
       
  3579 
       
  3580 /**
       
  3581  * Formats text for the HTML editor.
       
  3582  *
       
  3583  * Unless $output is empty it will pass through htmlspecialchars before the
       
  3584  * {@see 'htmledit_pre'} filter is applied.
       
  3585  *
       
  3586  * @since 2.5.0
       
  3587  * @deprecated 4.3.0 Use format_for_editor()
       
  3588  * @see format_for_editor()
       
  3589  *
       
  3590  * @param string $output The text to be formatted.
       
  3591  * @return string Formatted text after filter applied.
       
  3592  */
       
  3593 function wp_htmledit_pre($output) {
       
  3594 	_deprecated_function( __FUNCTION__, '4.3.0', 'format_for_editor()' );
       
  3595 
       
  3596 	if ( !empty($output) )
       
  3597 		$output = htmlspecialchars($output, ENT_NOQUOTES, get_option( 'blog_charset' ) ); // convert only < > &
       
  3598 
       
  3599 	/**
       
  3600 	 * Filters the text before it is formatted for the HTML editor.
       
  3601 	 *
       
  3602 	 * @since 2.5.0
       
  3603 	 * @deprecated 4.3.0
       
  3604 	 *
       
  3605 	 * @param string $output The HTML-formatted text.
       
  3606 	 */
       
  3607 	return apply_filters( 'htmledit_pre', $output );
       
  3608 }
       
  3609 
       
  3610 /**
       
  3611  * Retrieve permalink from post ID.
       
  3612  *
       
  3613  * @since 1.0.0
       
  3614  * @deprecated 4.4.0 Use get_permalink()
       
  3615  * @see get_permalink()
       
  3616  *
       
  3617  * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.
       
  3618  * @return string|false
       
  3619  */
       
  3620 function post_permalink( $post_id = 0 ) {
       
  3621 	_deprecated_function( __FUNCTION__, '4.4.0', 'get_permalink()' );
       
  3622 
       
  3623 	return get_permalink( $post_id );
       
  3624 }
       
  3625 
       
  3626 /**
       
  3627  * Perform a HTTP HEAD or GET request.
       
  3628  *
       
  3629  * If $file_path is a writable filename, this will do a GET request and write
       
  3630  * the file to that path.
       
  3631  *
       
  3632  * @since 2.5.0
       
  3633  * @deprecated 4.4.0 Use WP_Http
       
  3634  * @see WP_Http
       
  3635  *
       
  3636  * @param string      $url       URL to fetch.
       
  3637  * @param string|bool $file_path Optional. File path to write request to. Default false.
       
  3638  * @param int         $red       Optional. The number of Redirects followed, Upon 5 being hit,
       
  3639  *                               returns false. Default 1.
       
  3640  * @return bool|string False on failure and string of headers if HEAD request.
       
  3641  */
       
  3642 function wp_get_http( $url, $file_path = false, $red = 1 ) {
       
  3643 	_deprecated_function( __FUNCTION__, '4.4.0', 'WP_Http' );
       
  3644 
       
  3645 	@set_time_limit( 60 );
       
  3646 
       
  3647 	if ( $red > 5 )
       
  3648 		return false;
       
  3649 
       
  3650 	$options = array();
       
  3651 	$options['redirection'] = 5;
       
  3652 
       
  3653 	if ( false == $file_path )
       
  3654 		$options['method'] = 'HEAD';
       
  3655 	else
       
  3656 		$options['method'] = 'GET';
       
  3657 
       
  3658 	$response = wp_safe_remote_request( $url, $options );
       
  3659 
       
  3660 	if ( is_wp_error( $response ) )
       
  3661 		return false;
       
  3662 
       
  3663 	$headers = wp_remote_retrieve_headers( $response );
       
  3664 	$headers['response'] = wp_remote_retrieve_response_code( $response );
       
  3665 
       
  3666 	// WP_HTTP no longer follows redirects for HEAD requests.
       
  3667 	if ( 'HEAD' == $options['method'] && in_array($headers['response'], array(301, 302)) && isset( $headers['location'] ) ) {
       
  3668 		return wp_get_http( $headers['location'], $file_path, ++$red );
       
  3669 	}
       
  3670 
       
  3671 	if ( false == $file_path )
       
  3672 		return $headers;
       
  3673 
       
  3674 	// GET request - write it to the supplied filename
       
  3675 	$out_fp = fopen($file_path, 'w');
       
  3676 	if ( !$out_fp )
       
  3677 		return $headers;
       
  3678 
       
  3679 	fwrite( $out_fp,  wp_remote_retrieve_body( $response ) );
       
  3680 	fclose($out_fp);
       
  3681 	clearstatcache();
       
  3682 
       
  3683 	return $headers;
       
  3684 }
       
  3685 
       
  3686 /**
       
  3687  * Whether SSL login should be forced.
       
  3688  *
       
  3689  * @since 2.6.0
       
  3690  * @deprecated 4.4.0 Use force_ssl_admin()
       
  3691  * @see force_ssl_admin()
       
  3692  *
       
  3693  * @param string|bool $force Optional Whether to force SSL login. Default null.
       
  3694  * @return bool True if forced, false if not forced.
       
  3695  */
       
  3696 function force_ssl_login( $force = null ) {
       
  3697 	_deprecated_function( __FUNCTION__, '4.4.0', 'force_ssl_admin()' );
       
  3698 	return force_ssl_admin( $force );
       
  3699 }
       
  3700 
       
  3701 /**
       
  3702  * Retrieve path of comment popup template in current or parent template.
       
  3703  *
       
  3704  * @since 1.5.0
       
  3705  * @deprecated 4.5.0
       
  3706  *
       
  3707  * @return string Full path to comments popup template file.
       
  3708  */
       
  3709 function get_comments_popup_template() {
       
  3710 	_deprecated_function( __FUNCTION__, '4.5.0' );
       
  3711 
       
  3712 	return '';
       
  3713 }
       
  3714 
       
  3715 /**
       
  3716  * Whether the current URL is within the comments popup window.
       
  3717  *
       
  3718  * @since 1.5.0
       
  3719  * @deprecated 4.5.0
       
  3720  *
       
  3721  * @return bool
       
  3722  */
       
  3723 function is_comments_popup() {
       
  3724 	_deprecated_function( __FUNCTION__, '4.5.0' );
       
  3725 
       
  3726 	return false;
       
  3727 }
       
  3728 
       
  3729 /**
       
  3730  * Display the JS popup script to show a comment.
       
  3731  *
       
  3732  * @since 0.71
       
  3733  * @deprecated 4.5.0
       
  3734  */
       
  3735 function comments_popup_script() {
       
  3736 	_deprecated_function( __FUNCTION__, '4.5.0' );
       
  3737 }
       
  3738 
       
  3739 /**
       
  3740  * Adds element attributes to open links in new windows.
       
  3741  *
       
  3742  * @since 0.71
       
  3743  * @deprecated 4.5.0
       
  3744  *
       
  3745  * @param string $text Content to replace links to open in a new window.
       
  3746  * @return string Content that has filtered links.
       
  3747  */
       
  3748 function popuplinks( $text ) {
       
  3749 	_deprecated_function( __FUNCTION__, '4.5.0' );
       
  3750 	$text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
       
  3751 	return $text;
       
  3752 }
       
  3753 
       
  3754 /**
       
  3755  * The Google Video embed handler callback.
       
  3756  *
       
  3757  * Deprecated function that previously assisted in turning Google Video URLs
       
  3758  * into embeds but that service has since been shut down.
       
  3759  *
       
  3760  * @since 2.9.0
       
  3761  * @deprecated 4.6.0
       
  3762  *
       
  3763  * @return string An empty string.
       
  3764  */
       
  3765 function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
       
  3766 	_deprecated_function( __FUNCTION__, '4.6.0' );
       
  3767 
       
  3768 	return '';
       
  3769 }
       
  3770 
       
  3771 /**
       
  3772  * Retrieve path of paged template in current or parent template.
       
  3773  *
       
  3774  * @since 1.5.0
       
  3775  * @deprecated 4.7.0 The paged.php template is no longer part of the theme template hierarchy.
       
  3776  *
       
  3777  * @return string Full path to paged template file.
       
  3778  */
       
  3779 function get_paged_template() {
       
  3780 	_deprecated_function( __FUNCTION__, '4.7.0' );
       
  3781 
       
  3782 	return get_query_template( 'paged' );
       
  3783 }
       
  3784 
       
  3785 /**
       
  3786  * Removes the HTML JavaScript entities found in early versions of Netscape 4.
       
  3787  *
       
  3788  * Previously, this function was pulled in from the original
       
  3789  * import of kses and removed a specific vulnerability only
       
  3790  * existent in early version of Netscape 4. However, this
       
  3791  * vulnerability never affected any other browsers and can
       
  3792  * be considered safe for the modern web.
       
  3793  *
       
  3794  * The regular expression which sanitized this vulnerability
       
  3795  * has been removed in consideration of the performance and
       
  3796  * energy demands it placed, now merely passing through its
       
  3797  * input to the return.
       
  3798  *
       
  3799  * @since 1.0.0
       
  3800  * @deprecated 4.7.0 Officially dropped security support for Netscape 4.
       
  3801  *
       
  3802  * @param string $string
       
  3803  * @return string
       
  3804  */
       
  3805 function wp_kses_js_entities( $string ) {
       
  3806 	_deprecated_function( __FUNCTION__, '4.7.0' );
       
  3807 
       
  3808 	return preg_replace( '%&\s*\{[^}]*(\}\s*;?|$)%', '', $string );
       
  3809 }
       
  3810 
       
  3811 /**
       
  3812  * Sort categories by ID.
       
  3813  *
       
  3814  * Used by usort() as a callback, should not be used directly. Can actually be
       
  3815  * used to sort any term object.
       
  3816  *
       
  3817  * @since 2.3.0
       
  3818  * @deprecated 4.7.0 Use wp_list_sort()
       
  3819  * @access private
       
  3820  *
       
  3821  * @param object $a
       
  3822  * @param object $b
       
  3823  * @return int
       
  3824  */
       
  3825 function _usort_terms_by_ID( $a, $b ) {
       
  3826 	_deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );
       
  3827 
       
  3828 	if ( $a->term_id > $b->term_id )
       
  3829 		return 1;
       
  3830 	elseif ( $a->term_id < $b->term_id )
       
  3831 		return -1;
       
  3832 	else
       
  3833 		return 0;
       
  3834 }
       
  3835 
       
  3836 /**
       
  3837  * Sort categories by name.
       
  3838  *
       
  3839  * Used by usort() as a callback, should not be used directly. Can actually be
       
  3840  * used to sort any term object.
       
  3841  *
       
  3842  * @since 2.3.0
       
  3843  * @deprecated 4.7.0 Use wp_list_sort()
       
  3844  * @access private
       
  3845  *
       
  3846  * @param object $a
       
  3847  * @param object $b
       
  3848  * @return int
       
  3849  */
       
  3850 function _usort_terms_by_name( $a, $b ) {
       
  3851 	_deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );
       
  3852 
       
  3853 	return strcmp( $a->name, $b->name );
       
  3854 }
       
  3855 
       
  3856 /**
       
  3857  * Sort menu items by the desired key.
       
  3858  *
       
  3859  * @since 3.0.0
       
  3860  * @deprecated 4.7.0 Use wp_list_sort()
       
  3861  * @access private
       
  3862  *
       
  3863  * @global string $_menu_item_sort_prop
       
  3864  *
       
  3865  * @param object $a The first object to compare
       
  3866  * @param object $b The second object to compare
       
  3867  * @return int -1, 0, or 1 if $a is considered to be respectively less than, equal to, or greater than $b.
       
  3868  */
       
  3869 function _sort_nav_menu_items( $a, $b ) {
       
  3870 	global $_menu_item_sort_prop;
       
  3871 
       
  3872 	_deprecated_function( __FUNCTION__, '4.7.0', 'wp_list_sort()' );
       
  3873 
       
  3874 	if ( empty( $_menu_item_sort_prop ) )
       
  3875 		return 0;
       
  3876 
       
  3877 	if ( ! isset( $a->$_menu_item_sort_prop ) || ! isset( $b->$_menu_item_sort_prop ) )
       
  3878 		return 0;
       
  3879 
       
  3880 	$_a = (int) $a->$_menu_item_sort_prop;
       
  3881 	$_b = (int) $b->$_menu_item_sort_prop;
       
  3882 
       
  3883 	if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop )
       
  3884 		return 0;
       
  3885 	elseif ( $_a == $a->$_menu_item_sort_prop && $_b == $b->$_menu_item_sort_prop )
       
  3886 		return $_a < $_b ? -1 : 1;
       
  3887 	else
       
  3888 		return strcmp( $a->$_menu_item_sort_prop, $b->$_menu_item_sort_prop );
       
  3889 }
       
  3890 
       
  3891 /**
       
  3892  * Retrieves the Press This bookmarklet link.
       
  3893  *
       
  3894  * @since 2.6.0
       
  3895  * @deprecated 4.9.0
       
  3896  *
       
  3897  */
       
  3898 function get_shortcut_link() {
       
  3899 	_deprecated_function( __FUNCTION__, '4.9.0' );
       
  3900 
       
  3901 	$link = '';
       
  3902 
       
  3903 	/**
       
  3904 	 * Filters the Press This bookmarklet link.
       
  3905 	 *
       
  3906 	 * @since 2.6.0
       
  3907 	 * @deprecated 4.9.0
       
  3908 	 *
       
  3909 	 * @param string $link The Press This bookmarklet link.
       
  3910 	 */
       
  3911 	return apply_filters( 'shortcut_link', $link );
       
  3912 }
       
  3913 
       
  3914 /**
       
  3915 * Ajax handler for saving a post from Press This.
       
  3916 *
       
  3917 * @since 4.2.0
       
  3918 * @deprecated 4.9.0
       
  3919 */
       
  3920 function wp_ajax_press_this_save_post() {
       
  3921 	_deprecated_function( __FUNCTION__, '4.9.0' );
       
  3922 	if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) {
       
  3923 		include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' );
       
  3924 		$wp_press_this = new WP_Press_This_Plugin();
       
  3925 		$wp_press_this->save_post();
       
  3926 	} else {
       
  3927 		wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
       
  3928 	}
       
  3929 }
       
  3930 
       
  3931 /**
       
  3932 * Ajax handler for creating new category from Press This.
       
  3933 *
       
  3934 * @since 4.2.0
       
  3935 * @deprecated 4.9.0
       
  3936 */
       
  3937 function wp_ajax_press_this_add_category() {
       
  3938 	_deprecated_function( __FUNCTION__, '4.9.0' );
       
  3939 	if ( is_plugin_active( 'press-this/press-this-plugin.php' ) ) {
       
  3940 		include( WP_PLUGIN_DIR . '/press-this/class-wp-press-this-plugin.php' );
       
  3941 		$wp_press_this = new WP_Press_This_Plugin();
       
  3942 		$wp_press_this->add_category();
       
  3943 	} else {
       
  3944 		wp_send_json_error( array( 'errorMessage' => __( 'The Press This plugin is required.' ) ) );
       
  3945 	}
       
  3946 }