PageRenderTime 64ms CodeModel.GetById 16ms app.highlight 23ms RepoModel.GetById 12ms app.codeStats 1ms

/wp-includes/deprecated.php

https://github.com/locdinh/mywebsite
PHP | 3440 lines | 1406 code | 335 blank | 1699 comment | 210 complexity | 28e5a17adeb09ddb62261c6b922db037 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1<?php
   2/**
   3 * Deprecated functions from past WordPress versions. You shouldn't use these
   4 * functions and look for the alternatives instead. The functions will be
   5 * removed in a later version.
   6 *
   7 * @package WordPress
   8 * @subpackage Deprecated
   9 */
  10
  11/*
  12 * Deprecated functions come here to die.
  13 */
  14
  15/**
  16 * Entire Post data.
  17 *
  18 * @since 0.71
  19 * @deprecated 1.5.1
  20 * @deprecated Use get_post()
  21 * @see get_post()
  22 *
  23 * @param int $postid
  24 * @return array
  25 */
  26function get_postdata($postid) {
  27	_deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );
  28
  29	$post = get_post($postid);
  30
  31	$postdata = array (
  32		'ID' => $post->ID,
  33		'Author_ID' => $post->post_author,
  34		'Date' => $post->post_date,
  35		'Content' => $post->post_content,
  36		'Excerpt' => $post->post_excerpt,
  37		'Title' => $post->post_title,
  38		'Category' => $post->post_category,
  39		'post_status' => $post->post_status,
  40		'comment_status' => $post->comment_status,
  41		'ping_status' => $post->ping_status,
  42		'post_password' => $post->post_password,
  43		'to_ping' => $post->to_ping,
  44		'pinged' => $post->pinged,
  45		'post_type' => $post->post_type,
  46		'post_name' => $post->post_name
  47	);
  48
  49	return $postdata;
  50}
  51
  52/**
  53 * Sets up the WordPress Loop.
  54 *
  55 * @since 1.0.1
  56 * @deprecated 1.5.0
  57 * @deprecated Use The Loop - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop}
  58 */
  59function start_wp() {
  60	global $wp_query;
  61
  62	_deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') );
  63
  64	// Since the old style loop is being used, advance the query iterator here.
  65	$wp_query->next_post();
  66
  67	setup_postdata( get_post() );
  68}
  69
  70/**
  71 * Return or Print Category ID.
  72 *
  73 * @since 0.71
  74 * @deprecated 0.71
  75 * @deprecated use get_the_category()
  76 * @see get_the_category()
  77 *
  78 * @param bool $echo
  79 * @return null|int
  80 */
  81function the_category_ID($echo = true) {
  82	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
  83
  84	// Grab the first cat in the list.
  85	$categories = get_the_category();
  86	$cat = $categories[0]->term_id;
  87
  88	if ( $echo )
  89		echo $cat;
  90
  91	return $cat;
  92}
  93
  94/**
  95 * Print category with optional text before and after.
  96 *
  97 * @since 0.71
  98 * @deprecated 0.71
  99 * @deprecated use get_the_category_by_ID()
 100 * @see get_the_category_by_ID()
 101 *
 102 * @param string $before
 103 * @param string $after
 104 */
 105function the_category_head($before='', $after='') {
 106	global $currentcat, $previouscat;
 107
 108	_deprecated_function( __FUNCTION__, '0.71', 'get_the_category_by_ID()' );
 109
 110	// Grab the first cat in the list.
 111	$categories = get_the_category();
 112	$currentcat = $categories[0]->category_id;
 113	if ( $currentcat != $previouscat ) {
 114		echo $before;
 115		echo get_the_category_by_ID($currentcat);
 116		echo $after;
 117		$previouscat = $currentcat;
 118	}
 119}
 120
 121/**
 122 * Prints link to the previous post.
 123 *
 124 * @since 1.5.0
 125 * @deprecated 2.0.0
 126 * @deprecated Use previous_post_link()
 127 * @see previous_post_link()
 128 *
 129 * @param string $format
 130 * @param string $previous
 131 * @param string $title
 132 * @param string $in_same_cat
 133 * @param int $limitprev
 134 * @param string $excluded_categories
 135 */
 136function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
 137
 138	_deprecated_function( __FUNCTION__, '2.0', 'previous_post_link()' );
 139
 140	if ( empty($in_same_cat) || 'no' == $in_same_cat )
 141		$in_same_cat = false;
 142	else
 143		$in_same_cat = true;
 144
 145	$post = get_previous_post($in_same_cat, $excluded_categories);
 146
 147	if ( !$post )
 148		return;
 149
 150	$string = '<a href="'.get_permalink($post->ID).'">'.$previous;
 151	if ( 'yes' == $title )
 152		$string .= apply_filters('the_title', $post->post_title, $post->ID);
 153	$string .= '</a>';
 154	$format = str_replace('%', $string, $format);
 155	echo $format;
 156}
 157
 158/**
 159 * Prints link to the next post.
 160 *
 161 * @since 0.71
 162 * @deprecated 2.0.0
 163 * @deprecated Use next_post_link()
 164 * @see next_post_link()
 165 *
 166 * @param string $format
 167 * @param string $next
 168 * @param string $title
 169 * @param string $in_same_cat
 170 * @param int $limitnext
 171 * @param string $excluded_categories
 172 */
 173function 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()' );
 175
 176	if ( empty($in_same_cat) || 'no' == $in_same_cat )
 177		$in_same_cat = false;
 178	else
 179		$in_same_cat = true;
 180
 181	$post = get_next_post($in_same_cat, $excluded_categories);
 182
 183	if ( !$post	)
 184		return;
 185
 186	$string = '<a href="'.get_permalink($post->ID).'">'.$next;
 187	if ( 'yes' == $title )
 188		$string .= apply_filters('the_title', $post->post_title, $post->ID);
 189	$string .= '</a>';
 190	$format = str_replace('%', $string, $format);
 191	echo $format;
 192}
 193
 194/**
 195 * Whether user can create a post.
 196 *
 197 * @since 1.5.0
 198 * @deprecated 2.0.0
 199 * @deprecated Use current_user_can()
 200 * @see current_user_can()
 201 *
 202 * @param int $user_id
 203 * @param int $blog_id Not Used
 204 * @param int $category_id Not Used
 205 * @return bool
 206 */
 207function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
 208	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 209
 210	$author_data = get_userdata($user_id);
 211	return ($author_data->user_level > 1);
 212}
 213
 214/**
 215 * Whether user can create a post.
 216 *
 217 * @since 1.5.0
 218 * @deprecated 2.0.0
 219 * @deprecated Use current_user_can()
 220 * @see current_user_can()
 221 *
 222 * @param int $user_id
 223 * @param int $blog_id Not Used
 224 * @param int $category_id Not Used
 225 * @return bool
 226 */
 227function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
 228	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 229
 230	$author_data = get_userdata($user_id);
 231	return ($author_data->user_level >= 1);
 232}
 233
 234/**
 235 * Whether user can edit a post.
 236 *
 237 * @since 1.5.0
 238 * @deprecated 2.0.0
 239 * @deprecated Use current_user_can()
 240 * @see current_user_can()
 241 *
 242 * @param int $user_id
 243 * @param int $post_id
 244 * @param int $blog_id Not Used
 245 * @return bool
 246 */
 247function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
 248	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 249
 250	$author_data = get_userdata($user_id);
 251	$post = get_post($post_id);
 252	$post_author_data = get_userdata($post->post_author);
 253
 254	if ( (($user_id == $post_author_data->ID) && !($post->post_status == 'publish' && $author_data->user_level < 2))
 255			 || ($author_data->user_level > $post_author_data->user_level)
 256			 || ($author_data->user_level >= 10) ) {
 257		return true;
 258	} else {
 259		return false;
 260	}
 261}
 262
 263/**
 264 * Whether user can delete a post.
 265 *
 266 * @since 1.5.0
 267 * @deprecated 2.0.0
 268 * @deprecated Use current_user_can()
 269 * @see current_user_can()
 270 *
 271 * @param int $user_id
 272 * @param int $post_id
 273 * @param int $blog_id Not Used
 274 * @return bool
 275 */
 276function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
 277	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 278
 279	// right now if one can edit, one can delete
 280	return user_can_edit_post($user_id, $post_id, $blog_id);
 281}
 282
 283/**
 284 * Whether user can set new posts' dates.
 285 *
 286 * @since 1.5.0
 287 * @deprecated 2.0.0
 288 * @deprecated Use current_user_can()
 289 * @see current_user_can()
 290 *
 291 * @param int $user_id
 292 * @param int $blog_id Not Used
 293 * @param int $category_id Not Used
 294 * @return bool
 295 */
 296function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
 297	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 298
 299	$author_data = get_userdata($user_id);
 300	return (($author_data->user_level > 4) && user_can_create_post($user_id, $blog_id, $category_id));
 301}
 302
 303/**
 304 * Whether user can delete a post.
 305 *
 306 * @since 1.5.0
 307 * @deprecated 2.0.0
 308 * @deprecated Use current_user_can()
 309 * @see current_user_can()
 310 *
 311 * @param int $user_id
 312 * @param int $post_id
 313 * @param int $blog_id Not Used
 314 * @return bool returns true if $user_id can edit $post_id's date
 315 */
 316function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
 317	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 318
 319	$author_data = get_userdata($user_id);
 320	return (($author_data->user_level > 4) && user_can_edit_post($user_id, $post_id, $blog_id));
 321}
 322
 323/**
 324 * Whether user can delete a post.
 325 *
 326 * @since 1.5.0
 327 * @deprecated 2.0.0
 328 * @deprecated Use current_user_can()
 329 * @see current_user_can()
 330 *
 331 * @param int $user_id
 332 * @param int $post_id
 333 * @param int $blog_id Not Used
 334 * @return bool returns true if $user_id can edit $post_id's comments
 335 */
 336function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
 337	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 338
 339	// 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);
 341}
 342
 343/**
 344 * Whether user can delete a post.
 345 *
 346 * @since 1.5.0
 347 * @deprecated 2.0.0
 348 * @deprecated Use current_user_can()
 349 * @see current_user_can()
 350 *
 351 * @param int $user_id
 352 * @param int $post_id
 353 * @param int $blog_id Not Used
 354 * @return bool returns true if $user_id can delete $post_id's comments
 355 */
 356function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
 357	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 358
 359	// right now if one can edit comments, one can delete comments
 360	return user_can_edit_post_comments($user_id, $post_id, $blog_id);
 361}
 362
 363/**
 364 * Can user can edit other user.
 365 *
 366 * @since 1.5.0
 367 * @deprecated 2.0.0
 368 * @deprecated Use current_user_can()
 369 * @see current_user_can()
 370 *
 371 * @param int $user_id
 372 * @param int $other_user
 373 * @return bool
 374 */
 375function user_can_edit_user($user_id, $other_user) {
 376	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );
 377
 378	$user  = get_userdata($user_id);
 379	$other = get_userdata($other_user);
 380	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )
 381		return true;
 382	else
 383		return false;
 384}
 385
 386/**
 387 * Gets the links associated with category $cat_name.
 388 *
 389 * @since 0.71
 390 * @deprecated 2.1.0
 391 * @deprecated Use get_bookmarks()
 392 * @see get_bookmarks()
 393 *
 394 * @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.
 396 * @param string $after Optional. The html to output after the link.
 397 * @param string $between Optional. The html to output between the link/image and its description. Not used if no image or $show_images is true.
 398 * @param bool $show_images Optional. Whether to show images (if defined).
 399 * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner.
 400 *		If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a
 401 *		random order.
 402 * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
 403 * @param bool $show_rating Optional. Show rating stars/chars.
 404 * @param int $limit		Optional. Limit to X entries. If not specified, all entries are shown.
 405 * @param int $show_updated Optional. Whether to show last updated timestamp
 406 */
 407function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
 408						 $show_description = true, $show_rating = false,
 409						 $limit = -1, $show_updated = 0) {
 410	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
 411
 412	$cat_id = -1;
 413	$cat = get_term_by('name', $cat_name, 'link_category');
 414	if ( $cat )
 415		$cat_id = $cat->term_id;
 416
 417	get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated);
 418}
 419
 420/**
 421 * Gets the links associated with the named category.
 422 *
 423 * @since 1.0.1
 424 * @deprecated 2.1.0
 425 * @deprecated Use wp_list_bookmarks()
 426 * @see wp_list_bookmarks()
 427 *
 428 * @param string $category The category to use.
 429 * @param string $args
 430 * @return bool|null
 431 */
 432function wp_get_linksbyname($category, $args = '') {
 433	_deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()');
 434
 435	$defaults = array(
 436		'after' => '<br />',
 437		'before' => '',
 438		'categorize' => 0,
 439		'category_after' => '',
 440		'category_before' => '',
 441		'category_name' => $category,
 442		'show_description' => 1,
 443		'title_li' => '',
 444	);
 445
 446	$r = wp_parse_args( $args, $defaults );
 447
 448	return wp_list_bookmarks($r);
 449}
 450
 451/**
 452 * Gets an array of link objects associated with category $cat_name.
 453 *
 454 * <code>
 455 *	$links = get_linkobjectsbyname('fred');
 456 *	foreach ($links as $link) {
 457 * 		echo '<li>'.$link->link_name.'</li>';
 458 *	}
 459 * </code>
 460 *
 461 * @since 1.0.1
 462 * @deprecated 2.1.0
 463 * @deprecated Use get_bookmarks()
 464 * @see get_bookmarks()
 465 *
 466 * @param string $cat_name The category name to use. If no match is found uses all.
 467 * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'.
 468 *		Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
 469 *		specify 'rand' as the order which will return links in a random order.
 470 * @param int $limit Limit to X entries. If not specified, all entries are shown.
 471 * @return unknown
 472 */
 473function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
 474	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
 475
 476	$cat_id = -1;
 477	$cat = get_term_by('name', $cat_name, 'link_category');
 478	if ( $cat )
 479		$cat_id = $cat->term_id;
 480
 481	return get_linkobjects($cat_id, $orderby, $limit);
 482}
 483
 484/**
 485 * Gets an array of link objects associated with category n.
 486 *
 487 * Usage:
 488 * <code>
 489 *	$links = get_linkobjects(1);
 490 *	if ($links) {
 491 *		foreach ($links as $link) {
 492 *			echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
 493 *		}
 494 *	}
 495 * </code>
 496 *
 497 * Fields are:
 498 * <ol>
 499 *	<li>link_id</li>
 500 *	<li>link_url</li>
 501 *	<li>link_name</li>
 502 *	<li>link_image</li>
 503 *	<li>link_target</li>
 504 *	<li>link_category</li>
 505 *	<li>link_description</li>
 506 *	<li>link_visible</li>
 507 *	<li>link_owner</li>
 508 *	<li>link_rating</li>
 509 *	<li>link_updated</li>
 510 *	<li>link_rel</li>
 511 *	<li>link_notes</li>
 512 * </ol>
 513 *
 514 * @since 1.0.1
 515 * @deprecated 2.1.0
 516 * @deprecated Use get_bookmarks()
 517 * @see get_bookmarks()
 518 *
 519 * @param int $category The category to use. If no category supplied uses all
 520 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
 521 *		'description', or 'rating'. Or maybe owner. If you start the name with an
 522 *		underscore the order will be reversed. You can also specify 'rand' as the
 523 *		order which will return links in a random order.
 524 * @param int $limit Limit to X entries. If not specified, all entries are shown.
 525 * @return unknown
 526 */
 527function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
 528	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
 529
 530	$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
 531
 532	$links_array = array();
 533	foreach ($links as $link)
 534		$links_array[] = $link;
 535
 536	return $links_array;
 537}
 538
 539/**
 540 * Gets the links associated with category 'cat_name' and display rating stars/chars.
 541 *
 542 * @since 0.71
 543 * @deprecated 2.1.0
 544 * @deprecated Use get_bookmarks()
 545 * @see get_bookmarks()
 546 *
 547 * @param string $cat_name The category name to use. If no match is found uses all
 548 * @param string $before The html to output before the link
 549 * @param string $after The html to output after the link
 550 * @param string $between The html to output between the link/image and its description. Not used if no image or show_images is true
 551 * @param bool $show_images Whether to show images (if defined).
 552 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
 553 *		'description', or 'rating'. Or maybe owner. If you start the name with an
 554 *		underscore the order will be reversed. You can also specify 'rand' as the
 555 *		order which will return links in a random order.
 556 * @param bool $show_description Whether to show the description if show_images=false/not defined
 557 * @param int $limit Limit to X entries. If not specified, all entries are shown.
 558 * @param int $show_updated Whether to show last updated timestamp
 559 */
 560function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
 561									$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
 562	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
 563
 564	get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
 565}
 566
 567/**
 568 * Gets the links associated with category n and display rating stars/chars.
 569 *
 570 * @since 0.71
 571 * @deprecated 2.1.0
 572 * @deprecated Use get_bookmarks()
 573 * @see get_bookmarks()
 574 *
 575 * @param int $category The category to use. If no category supplied uses all
 576 * @param string $before The html to output before the link
 577 * @param string $after The html to output after the link
 578 * @param string $between The html to output between the link/image and its description. Not used if no image or show_images == true
 579 * @param bool $show_images Whether to show images (if defined).
 580 * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url',
 581 *		'description', or 'rating'. Or maybe owner. If you start the name with an
 582 *		underscore the order will be reversed. You can also specify 'rand' as the
 583 *		order which will return links in a random order.
 584 * @param bool $show_description Whether to show the description if show_images=false/not defined.
 585 * @param string $limit Limit to X entries. If not specified, all entries are shown.
 586 * @param int $show_updated Whether to show last updated timestamp
 587 */
 588function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
 589							  $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
 590	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
 591
 592	get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
 593}
 594
 595/**
 596 * Gets the auto_toggle setting.
 597 *
 598 * @since 0.71
 599 * @deprecated 2.1.0
 600 * @deprecated No alternative function available
 601 *
 602 * @param int $id The category to get. If no category supplied uses 0
 603 * @return int Only returns 0.
 604 */
 605function get_autotoggle($id = 0) {
 606	_deprecated_function( __FUNCTION__, '2.1' );
 607	return 0;
 608}
 609
 610/**
 611 * @since 0.71
 612 * @deprecated 2.1.0
 613 * @deprecated Use wp_list_categories()
 614 * @see wp_list_categories()
 615 *
 616 * @param int $optionall
 617 * @param string $all
 618 * @param string $sort_column
 619 * @param string $sort_order
 620 * @param string $file
 621 * @param bool $list
 622 * @param int $optiondates
 623 * @param int $optioncount
 624 * @param int $hide_empty
 625 * @param int $use_desc_for_title
 626 * @param bool $children
 627 * @param int $child_of
 628 * @param int $categories
 629 * @param int $recurse
 630 * @param string $feed
 631 * @param string $feed_image
 632 * @param string $exclude
 633 * @param bool $hierarchical
 634 * @return unknown
 635 */
 636function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
 637				   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
 638				   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
 639	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
 640
 641	$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
 642		'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
 643	return wp_list_cats($query);
 644}
 645
 646/**
 647 * @since 1.2.0
 648 * @deprecated 2.1.0
 649 * @deprecated Use wp_list_categories()
 650 * @see wp_list_categories()
 651 *
 652 * @param string|array $args
 653 * @return unknown
 654 */
 655function wp_list_cats($args = '') {
 656	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' );
 657
 658	$r = wp_parse_args( $args );
 659
 660	// Map to new names.
 661	if ( isset($r['optionall']) && isset($r['all']))
 662		$r['show_option_all'] = $r['all'];
 663	if ( isset($r['sort_column']) )
 664		$r['orderby'] = $r['sort_column'];
 665	if ( isset($r['sort_order']) )
 666		$r['order'] = $r['sort_order'];
 667	if ( isset($r['optiondates']) )
 668		$r['show_last_update'] = $r['optiondates'];
 669	if ( isset($r['optioncount']) )
 670		$r['show_count'] = $r['optioncount'];
 671	if ( isset($r['list']) )
 672		$r['style'] = $r['list'] ? 'list' : 'break';
 673	$r['title_li'] = '';
 674
 675	return wp_list_categories($r);
 676}
 677
 678/**
 679 * @since 0.71
 680 * @deprecated 2.1.0
 681 * @deprecated Use wp_dropdown_categories()
 682 * @see wp_dropdown_categories()
 683 *
 684 * @param int $optionall
 685 * @param string $all
 686 * @param string $orderby
 687 * @param string $order
 688 * @param int $show_last_update
 689 * @param int $show_count
 690 * @param int $hide_empty
 691 * @param bool $optionnone
 692 * @param int $selected
 693 * @param int $exclude
 694 * @return unknown
 695 */
 696function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
 697		$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
 698		$selected = 0, $exclude = 0) {
 699	_deprecated_function( __FUNCTION__, '2.1', 'wp_dropdown_categories()' );
 700
 701	$show_option_all = '';
 702	if ( $optionall )
 703		$show_option_all = $all;
 704
 705	$show_option_none = '';
 706	if ( $optionnone )
 707		$show_option_none = __('None');
 708
 709	$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
 710					'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude');
 711	$query = add_query_arg($vars, '');
 712	return wp_dropdown_categories($query);
 713}
 714
 715/**
 716 * List authors.
 717 *
 718 * @since 1.2.0
 719 * @deprecated 2.1.0
 720 * @deprecated Use wp_list_authors()
 721 * @see wp_list_authors()
 722 *
 723 * @param bool $optioncount
 724 * @param bool $exclude_admin
 725 * @param bool $show_fullname
 726 * @param bool $hide_empty
 727 * @param string $feed
 728 * @param string $feed_image
 729 * @return unknown
 730 */
 731function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
 732	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' );
 733
 734	$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
 735	return wp_list_authors($args);
 736}
 737
 738/**
 739 * @since 1.0.1
 740 * @deprecated 2.1.0
 741 * @deprecated Use wp_get_post_categories()
 742 * @see wp_get_post_categories()
 743 *
 744 * @param int $blogid Not Used
 745 * @param int $post_ID
 746 * @return unknown
 747 */
 748function wp_get_post_cats($blogid = '1', $post_ID = 0) {
 749	_deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' );
 750	return wp_get_post_categories($post_ID);
 751}
 752
 753/**
 754 * Sets the categories that the post id belongs to.
 755 *
 756 * @since 1.0.1
 757 * @deprecated 2.1.0
 758 * @deprecated Use wp_set_post_categories()
 759 * @see wp_set_post_categories()
 760 *
 761 * @param int $blogid Not used
 762 * @param int $post_ID
 763 * @param array $post_categories
 764 * @return unknown
 765 */
 766function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
 767	_deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' );
 768	return wp_set_post_categories($post_ID, $post_categories);
 769}
 770
 771/**
 772 * @since 0.71
 773 * @deprecated 2.1.0
 774 * @deprecated Use wp_get_archives()
 775 * @see wp_get_archives()
 776 *
 777 * @param string $type
 778 * @param string $limit
 779 * @param string $format
 780 * @param string $before
 781 * @param string $after
 782 * @param bool $show_post_count
 783 * @return unknown
 784 */
 785function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
 786	_deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' );
 787	$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
 788	return wp_get_archives($args);
 789}
 790
 791/**
 792 * Returns or Prints link to the author's posts.
 793 *
 794 * @since 1.2.0
 795 * @deprecated 2.1.0
 796 * @deprecated Use get_author_posts_url()
 797 * @see get_author_posts_url()
 798 *
 799 * @param bool $echo
 800 * @param int $author_id
 801 * @param string $author_nicename Optional.
 802 * @return string|null
 803 */
 804function get_author_link($echo, $author_id, $author_nicename = '') {
 805	_deprecated_function( __FUNCTION__, '2.1', 'get_author_posts_url()' );
 806
 807	$link = get_author_posts_url($author_id, $author_nicename);
 808
 809	if ( $echo )
 810		echo $link;
 811	return $link;
 812}
 813
 814/**
 815 * Print list of pages based on arguments.
 816 *
 817 * @since 0.71
 818 * @deprecated 2.1.0
 819 * @deprecated Use wp_link_pages()
 820 * @see wp_link_pages()
 821 *
 822 * @param string $before
 823 * @param string $after
 824 * @param string $next_or_number
 825 * @param string $nextpagelink
 826 * @param string $previouspagelink
 827 * @param string $pagelink
 828 * @param string $more_file
 829 * @return string
 830 */
 831function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
 832					$pagelink='%', $more_file='') {
 833	_deprecated_function( __FUNCTION__, '2.1', 'wp_link_pages()' );
 834
 835	$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
 836	return wp_link_pages($args);
 837}
 838
 839/**
 840 * Get value based on option.
 841 *
 842 * @since 0.71
 843 * @deprecated 2.1.0
 844 * @deprecated Use get_option()
 845 * @see get_option()
 846 *
 847 * @param string $option
 848 * @return string
 849 */
 850function get_settings($option) {
 851	_deprecated_function( __FUNCTION__, '2.1', 'get_option()' );
 852
 853	return get_option($option);
 854}
 855
 856/**
 857 * Print the permalink of the current post in the loop.
 858 *
 859 * @since 0.71
 860 * @deprecated 1.2.0
 861 * @deprecated Use the_permalink()
 862 * @see the_permalink()
 863 */
 864function permalink_link() {
 865	_deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' );
 866	the_permalink();
 867}
 868
 869/**
 870 * Print the permalink to the RSS feed.
 871 *
 872 * @since 0.71
 873 * @deprecated 2.3.0
 874 * @deprecated Use the_permalink_rss()
 875 * @see the_permalink_rss()
 876 *
 877 * @param string $deprecated
 878 */
 879function permalink_single_rss($deprecated = '') {
 880	_deprecated_function( __FUNCTION__, '2.3', 'the_permalink_rss()' );
 881	the_permalink_rss();
 882}
 883
 884/**
 885 * Gets the links associated with category.
 886 *
 887 * @see get_links() for argument information that can be used in $args
 888 * @since 1.0.1
 889 * @deprecated 2.1.0
 890 * @deprecated Use wp_list_bookmarks()
 891 * @see wp_list_bookmarks()
 892 *
 893 * @param string $args a query string
 894 * @return null|string
 895 */
 896function wp_get_links($args = '') {
 897	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
 898
 899	if ( strpos( $args, '=' ) === false ) {
 900		$cat_id = $args;
 901		$args = add_query_arg( 'category', $cat_id, $args );
 902	}
 903
 904	$defaults = array(
 905		'after' => '<br />',
 906		'before' => '',
 907		'between' => ' ',
 908		'categorize' => 0,
 909		'category' => '',
 910		'echo' => true,
 911		'limit' => -1,
 912		'orderby' => 'name',
 913		'show_description' => true,
 914		'show_images' => true,
 915		'show_rating' => false,
 916		'show_updated' => true,
 917		'title_li' => '',
 918	);
 919
 920	$r = wp_parse_args( $args, $defaults );
 921
 922	return wp_list_bookmarks($r);
 923}
 924
 925/**
 926 * Gets the links associated with category by id.
 927 *
 928 * @since 0.71
 929 * @deprecated 2.1.0
 930 * @deprecated Use get_bookmarks()
 931 * @see get_bookmarks()
 932 *
 933 * @param int $category The category to use. If no category supplied uses all
 934 * @param string $before the html to output before the link
 935 * @param string $after the html to output after the link
 936 * @param string $between the html to output between the link/image and its description.
 937 *		Not used if no image or show_images == true
 938 * @param bool $show_images whether to show images (if defined).
 939 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
 940 *		'description', or 'rating'. Or maybe owner. If you start the name with an
 941 *		underscore the order will be reversed. You can also specify 'rand' as the order
 942 *		which will return links in a random order.
 943 * @param bool $show_description whether to show the description if show_images=false/not defined.
 944 * @param bool $show_rating show rating stars/chars
 945 * @param int $limit Limit to X entries. If not specified, all entries are shown.
 946 * @param int $show_updated whether to show last updated timestamp
 947 * @param bool $echo whether to echo the results, or return them instead
 948 * @return null|string
 949 */
 950function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
 951			$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
 952	_deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' );
 953
 954	$order = 'ASC';
 955	if ( substr($orderby, 0, 1) == '_' ) {
 956		$order = 'DESC';
 957		$orderby = substr($orderby, 1);
 958	}
 959
 960	if ( $category == -1 ) //get_bookmarks uses '' to signify all categories
 961		$category = '';
 962
 963	$results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit));
 964
 965	if ( !$results )
 966		return;
 967
 968	$output = '';
 969
 970	foreach ( (array) $results as $row ) {
 971		if ( !isset($row->recently_updated) )
 972			$row->recently_updated = false;
 973		$output .= $before;
 974		if ( $show_updated && $row->recently_updated )
 975			$output .= get_option('links_recently_updated_prepend');
 976		$the_link = '#';
 977		if ( !empty($row->link_url) )
 978			$the_link = esc_url($row->link_url);
 979		$rel = $row->link_rel;
 980		if ( '' != $rel )
 981			$rel = ' rel="' . $rel . '"';
 982
 983		$desc = esc_attr(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display'));
 984		$name = esc_attr(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display'));
 985		$title = $desc;
 986
 987		if ( $show_updated )
 988			if (substr($row->link_updated_f, 0, 2) != '00')
 989				$title .= ' ('.__('Last updated') . ' ' . date(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
 990
 991		if ( '' != $title )
 992			$title = ' title="' . $title . '"';
 993
 994		$alt = ' alt="' . $name . '"';
 995
 996		$target = $row->link_target;
 997		if ( '' != $target )
 998			$target = ' target="' . $target . '"';
 999
1000		$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
1001
1002		if ( $row->link_image != null && $show_images ) {
1003			if ( strpos($row->link_image, 'http') !== false )
1004				$output .= "<img src=\"$row->link_image\" $alt $title />";
1005			else // If it's a relative path
1006				$output .= "<img src=\"" . get_option('siteurl') . "$row->link_image\" $alt $title />";
1007		} else {
1008			$output .= $name;
1009		}
1010
1011		$output .= '</a>';
1012
1013		if ( $show_updated && $row->recently_updated )
1014			$output .= get_option('links_recently_updated_append');
1015
1016		if ( $show_description && '' != $desc )
1017			$output .= $between . $desc;
1018
1019		if ($show_rating) {
1020			$output .= $between . get_linkrating($row);
1021		}
1022
1023		$output .= "$after\n";
1024	} // end while
1025
1026	if ( !$echo )
1027		return $output;
1028	echo $output;
1029}
1030
1031/**
1032 * Output entire list of links by category.
1033 *
1034 * Output a list of all links, listed by category, using the settings in
1035 * $wpdb->linkcategories and output it as a nested HTML unordered list.
1036 *
1037 * @since 1.0.1
1038 * @deprecated 2.1.0
1039 * @deprecated Use wp_list_bookmarks()
1040 * @see wp_list_bookmarks()
1041 *
1042 * @param string $order Sort link categories by 'name' or 'id'
1043 */
1044function get_links_list($order = 'name') {
1045	_deprecated_function( __FUNCTION__, '2.1', 'wp_list_bookmarks()' );
1046
1047	$order = strtolower($order);
1048
1049	// Handle link category sorting
1050	$direction = 'ASC';
1051	if ( '_' == substr($order,0,1) ) {
1052		$direction = 'DESC';
1053		$order = substr($order,1);
1054	}
1055
1056	if ( !isset($direction) )
1057		$direction = '';
1058
1059	$cats = get_categories(array('type' => 'link', 'orderby' => $order, 'order' => $direction, 'hierarchical' => 0));
1060
1061	// Display each category
1062	if ( $cats ) {
1063		foreach ( (array) $cats as $cat ) {
1064			// Handle each category.
1065
1066			// Display the category name
1067			echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";
1068			// Call get_links() with all the appropriate params
1069			get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
1070
1071			// Close the last category
1072			echo "\n\t</ul>\n</li>\n";
1073		}
1074	}
1075}
1076
1077/**
1078 * Show the link to the links popup and the number of links.
1079 *
1080 * @since 0.71
1081 * @deprecated 2.1.0
1082 * @deprecated {@internal Use function instead is unknown}}
1083 *
1084 * @param string $text the text of the link
1085 * @param int $width the width of the popup window
1086 * @param int $height the height of the popup window
1087 * @param string $file the page to open in the popup window
1088 * @param bool $count the number of links in the db
1089 */
1090function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
1091	_deprecated_function( __FUNCTION__, '2.1' );
1092}
1093
1094/**
1095 * @since 1.0.1
1096 * @deprecated 2.1.0
1097 * @deprecated Use sanitize_bookmark_field()
1098 * @see sanitize_bookmark_field()
1099 *
1100 * @param object $link
1101 * @return unknown
1102 */
1103function get_linkrating($link) {
1104	_deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' );
1105	return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
1106}
1107
1108/**
1109 * Gets the name of category by id.
1110 *
1111 * @since 0.71
1112 * @deprecated 2.1.0
1113 * @deprecated Use get_category()
1114 * @see get_category()
1115 *
1116 * @param int $id The category to get. If no category supplied uses 0
1117 * @return string
1118 */
1119function get_linkcatname($id = 0) {
1120	_deprecated_function( __FUNCTION__, '2.1', 'get_category()' );
1121
1122	$id = (int) $id;
1123
1124	if ( empty($id) )
1125		return '';
1126
1127	$cats = wp_get_link_cats($id);
1128
1129	if ( empty($cats) || ! is_array($cats) )
1130		return '';
1131
1132	$cat_id = (int) $cats[0]; // Take the first cat.
1133
1134	$cat = get_category($cat_id);
1135	return $cat->name;
1136}
1137
1138/**
1139 * Print RSS comment feed link.
1140 *
1141 * @since 1.0.1
1142 * @deprecated 2.5.0
1143 * @deprecated Use post_comments_feed_link()
1144 * @see post_comments_feed_link()
1145 *
1146 * @param string $link_text
1147 */
1148function comments_rss_link($link_text = 'Comments RSS') {
1149	_deprecated_function( __FUNCTION__, '2.5', 'post_comments_feed_link()' );
1150	post_comments_feed_link($link_text);
1151}
1152
1153/**
1154 * Print/Return link to category RSS2 feed.
1155 *
1156 * @since 1.2.0
1157 * @deprecated 2.5.0
1158 * @deprecated Use get_category_feed_link()
1159 * @see get_category_feed_link()
1160 *
1161 * @param bool $echo
1162 * @param int $cat_ID
1163 * @return string|null
1164 */
1165function get_category_rss_link($echo = false, $cat_ID = 1) {
1166	_deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' );
1167
1168	$link = get_category_feed_link($cat_ID, 'rss2');
1169
1170	if ( $echo )
1171		echo $link;
1172	return $link;
1173}
1174
1175/**
1176 * Print/Return link to author RSS feed.
1177 *
1178 * @since 1.2.0
1179 * @deprecated 2.5.0
1180 * @deprecated Use get_author_feed_link()
1181 * @see get_author_feed_link()
1182 *
1183 * @param bool $echo
1184 * @param int $author_id
1185 * @return string|null
1186 */
1187function get_author_rss_link($echo = false, $author_id = 1) {
1188	_deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' );
1189
1190	$link = get_author_feed_link($author_id);
1191	if ( $echo )
1192		echo $link;
1193	return $link;
1194}
1195
1196/**
1197 * Return link to the post RSS feed.
1198 *
1199 * @since 1.5.0
1200 * @deprecated 2.2.0
1201 * @deprecated Use get_post_comments_feed_link()
1202 * @see get_post_comments_feed_link()
1203 *
1204 * @return string
1205 */
1206function comments_rss() {
1207	_deprecated_function( __FUNCTION__, '2.2', 'get_post_comments_feed_link()' );
1208	return esc_url( get_post_comments_feed_link() );
1209}
1210
1211/**
1212 * An alias of wp_create_user().
1213 *
1214 * @since 2.0.0
1215 * @deprecated 2.0.0
1216 * @deprecated Use wp_create_user()
1217 * @see wp_create_user()
1218 *
1219 * @param string $username The user's username.
1220 * @param string $password The user's password.
1221 * @param string $email The user's email (optional).
1222 * @return int The new user's ID.
1223 */
1224function create_user($username, $password, $email) {
1225	_deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' );
1226	return wp_create_user($username, $password, $email);
1227}
1228
1229/**
1230 * Unused function.
1231 *
1232 * @deprecated 2.5.0
1233*/
1234function gzip_compression() {
1235	_deprecated_function( __FUNCTION__, '2.5' );
1236	return false;
1237}
1238
1239/**
1240 * Retrieve an array of comment data about comment $comment_ID.
1241 *
1242 * @since 0.71
1243 * @deprecated 2.7.0
1244 * @deprecated Use get_comment()
1245 * @see get_comment()
1246 *
1247 * @param int $comment_ID The ID of the comment
1248 * @param int $no_cache Whether to use the cache (cast to bool)
1249 * @param bool $include_unapproved Whether to include unapproved comments
1250 * @return array The comment data
1251 */
1252function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
1253	_deprecated_function( __FUNCTION__, '2.7', 'get_comment()' );
1254	return get_comment($comment_ID, ARRAY_A);
1255}
1256
1257/**
1258 * Retrieve the category name by the category ID.
1259 *
1260 * @since 0.71
1261 * @deprecated 2.8.0
1262 * @deprecated Use get_cat_name()
1263 * @see get_cat_name()
1264 *
1265 * @param int $cat_ID Category ID
1266 * @return string category name
1267 */
1268function get_catname( $cat_ID ) {
1269	_deprecated_function( __FUNCTION__, '2.8', 'get_cat_name()' );
1270	return get_cat_name( $cat_ID );
1271}
1272
1273/**
1274 * Retrieve category children list separated before and after the term IDs.
1275 *
1276 * @since 1.2.0
1277 * @deprecated 2.8.0
1278 * @deprecated Use get_term_children()
1279 * @see get_term_children()
1280 *
1281 * @param int $id Category ID to retrieve children.
1282 * @param string $before Optional. Prepend before category term ID.
1283 * @param string $after Optional, default is empty string. Append after category term ID.
1284 * @param array $visited Optional. Category Term IDs that have already been added.
1285 * @return string
1286 */
1287function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
1288	_deprecated_function( __FUNCTION__, '2.8', 'get_term_children()' );
1289	if ( 0 == $id )
1290		return '';
1291
1292	$chain = '';
1293	/** TODO: consult hierarchy */
1294	$cat_ids = get_all_category_ids();
1295	foreach ( (array) $cat_ids as $cat_id ) {
1296		if ( $cat_id == $id )
1297			continue;
1298
1299		$category = get_category( $cat_id );
1300		if ( is_wp_error( $category ) )
1301			return $category;
1302		if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) {
1303			$visited[] = $category->term_id;
1304			$chain .= $before.$category->term_id.$after;
1305			$chain .= get_category_children( $category->term_id, $before, $after );
1306		}
1307	}
1308	return $chain;
1309}
1310
1311/**
1312 * Retrieve the description of the author of the current post.
1313 *
1314 * @since 1.5.0
1315 * @deprecated 2.8.0
1316 * @deprecated Use get_the_author_meta('description')
1317 * @see get_the_author_meta()
1318 *
1319 * @return string The author's description.
1320 */
1321function get_the_author_description() {
1322	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'description\')' );
1323	return get_the_author_meta('description');
1324}
1325
1326/**
1327 * Display the description of the author of the current post.
1328 *
1329 * @since 1.0.0
1330 * @deprecated 2.8.0
1331 * @deprecated Use the_author_meta('description')
1332 * @see the_author_meta()
1333 */
1334function the_author_description() {
1335	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'description\')' );
1336	the_author_meta('description');
1337}
1338
1339/**
1340 * Retrieve the login name of the author of the current post.
1341 *
1342 * @since 1.5.0
1343 * @deprecated 2.8.0
1344 * @deprecated Use get_the_author_meta('login')
1345 * @see get_the_author_meta()
1346 *
1347 * @return string The author's login name (username).
1348 */
1349function get_the_author_login() {
1350	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'login\')' );
1351	return get_the_author_meta('login');
1352}
1353
1354/**
1355 * Display the login name of the author of the current post.
1356 *
1357 * @since 0.71
1358 * @deprecated 2.8.0
1359 * @deprecated Use the_author_meta('login')
1360 * @see the_author_meta()
1361 */
1362function the_author_login() {
1363	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'login\')' );
1364	the_author_meta('login');
1365}
1366
1367/**
1368 * Retrieve the first name of the author of the current post.
1369 *
1370 * @since 1.5.0
1371 * @deprecated 2.8.0
1372 * @deprecated Use get_the_author_meta('first_name')
1373 * @see get_the_author_meta()
1374 *
1375 * @return string The author's first name.
1376 */
1377function get_the_author_firstname() {
1378	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'first_name\')' );
1379	return get_the_author_meta('first_name');
1380}
1381
1382/**
1383 * Display the first name of the author of the current post.
1384 *
1385 * @since 0.71
1386 * @deprecated 2.8.0
1387 * @deprecated Use the_author_meta('first_name')
1388 * @see the_author_meta()
1389 */
1390function the_author_firstname() {
1391	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' );
1392	the_author_meta('first_name');
1393}
1394
1395/**
1396 * Retrieve the last name of the author of the current post.
1397 *
1398 * @since 1.5.0
1399 * @deprecated 2.8.0
1400 * @deprecated Use get_the_author_meta('last_name')
1401 * @see get_the_author_meta()
1402 *
1403 * @return string The author's last name.
1404 */
1405function get_the_author_lastname() {
1406	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'last_name\')' );
1407	return get_the_author_meta('last_name');
1408}
1409
1410/**
1411 * Display the last name of the author of the current post.
1412 *
1413 * @since 0.71
1414 * @deprecated 2.8.0
1415 * @deprecated Use the_author_meta('last_name')
1416 * @see the_author_meta()
1417 */
1418function the_author_lastname() {
1419	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' );
1420	the_author_meta('last_name');
1421}
1422
1423/**
1424 * Retrieve the nickname of the author of the current post.
1425 *
1426 * @since 1.5.0
1427 * @deprecated 2.8.0
1428 * @deprecated Use get_the_author_meta('nickname')
1429 * @see get_the_author_meta()
1430 *
1431 * @return string The author's nickname.
1432 */
1433function get_the_author_nickname() {
1434	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'nickname\')' );
1435	return get_the_author_meta('nickname');
1436}
1437
1438/**
1439 * Display the nickname of the author of the current post.
1440 *
1441 * @since 0.71
1442 * @deprecated 2.8.0
1443 * @deprecated Use the_author_meta('nickname')
1444 * @see the_author_meta()
1445 */
1446function the_author_nickname() {
1447	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' );
1448	the_author_meta('nickname');
1449}
1450
1451/**
1452 * Retrieve the email of the author of the current post.
1453 *
1454 * @since 1.5.0
1455 * @deprecated 2.8.0
1456 * @deprecated Use get_the_author_meta('email')
1457 * @see get_the_author_meta()
1458 *
1459 * @return string The author's username.
1460 */
1461function get_the_author_email() {
1462	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'email\')' );
1463	return get_the_author_meta('email');
1464}
1465
1466/**
1467 * Display the email of the author of the current post.
1468 *
1469 * @since 0.71
1470 * @deprecated 2.8.0
1471 * @deprecated Use the_author_meta('email')
1472 * @see the_author_meta()
1473 */
1474function the_author_email() {
1475	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'email\')' );
1476	the_author_meta('email');
1477}
1478
1479/**
1480 * Retrieve the ICQ number of the author of the current post.
1481 *
1482 * @since 1.5.0
1483 * @deprecated 2.8.0
1484 * @deprecated Use get_the_author_meta('icq')
1485 * @see get_the_author_meta()
1486 *
1487 * @return string The author's ICQ number.
1488 */
1489function get_the_author_icq() {
1490	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'icq\')' );
1491	return get_the_author_meta('icq');
1492}
1493
1494/**
1495 * Display the ICQ number of the author of the current post.
1496 *
1497 * @since 0.71
1498 * @deprecated 2.8.0
1499 * @deprecated Use the_author_meta('icq')
1500 * @see the_author_meta()
1501 */
1502function the_author_icq() {
1503	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'icq\')' );
1504	the_author_meta('icq');
1505}
1506
1507/**
1508 * Retrieve the Yahoo! IM name of the author of the current post.
1509 *
1510 * @since 1.5.0
1511 * @deprecated 2.8.0
1512 * @deprecated Use get_the_author_meta('yim')
1513 * @see get_the_author_meta()
1514 *
1515 * @return string The author's Yahoo! IM name.
1516 */
1517function get_the_author_yim() {
1518	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'yim\')' );
1519	return get_the_author_meta('yim');
1520}
1521
1522/**
1523 * Display the Yahoo! IM name of the author of the current post.
1524 *
1525 * @since 0.71
1526 * @deprecated 2.8.0
1527 * @deprecated Use the_author_meta('yim')
1528 * @see the_author_meta()
1529 */
1530function the_author_yim() {
1531	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'yim\')' );
1532	the_author_meta('yim');
1533}
1534
1535/**
1536 * Retrieve the MSN address of the author of the current post.
1537 *
1538 * @since 1.5.0
1539 * @deprecated 2.8.0
1540 * @deprecated Use get_the_author_meta('msn')
1541 * @see get_the_author_meta()
1542 *
1543 * @return string The author's MSN address.
1544 */
1545function get_the_author_msn() {
1546	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'msn\')' );
1547	return get_the_author_meta('msn');
1548}
1549
1550/**
1551 * Display the MSN address of the author of the current post.
1552 *
1553 * @since 0.71
1554 * @deprecated 2.8.0
1555 * @deprecated Use the_author_meta('msn')
1556 * @see the_author_meta()
1557 */
1558function the_author_msn() {
1559	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'msn\')' );
1560	the_author_meta('msn');
1561}
1562
1563/**
1564 * Retrieve the AIM address of the author of the current post.
1565 *
1566 * @since 1.5.0
1567 * @deprecated 2.8.0
1568 * @deprecated Use get_the_author_meta('aim')
1569 * @see get_the_author_meta()
1570 *
1571 * @return string The author's AIM address.
1572 */
1573function get_the_author_aim() {
1574	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'aim\')' );
1575	return get_the_author_meta('aim');
1576}
1577
1578/**
1579 * Display the AIM address of the author of the current post.
1580 *
1581 * @since 0.71
1582 * @see the_author_meta()
1583 * @deprecated 2.8.0
1584 * @deprecated Use the_author_meta('aim')
1585 */
1586function the_author_aim() {
1587	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'aim\')' );
1588	the_author_meta('aim');
1589}
1590
1591/**
1592 * Retrieve the specified author's preferred display name.
1593 *
1594 * @since 1.0.0
1595 * @deprecated 2.8.0
1596 * @deprecated Use get_the_author_meta('display_name')
1597 * @see get_the_author_meta()
1598 *
1599 * @param int $auth_id The ID of the author.
1600 * @return string The author's display name.
1601 */
1602function get_author_name( $auth_id = false ) {
1603	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'display_name\')' );
1604	return get_the_author_meta('display_name', $auth_id);
1605}
1606
1607/**
1608 * Retrieve the URL to the home page of the author of the current post.
1609 *
1610 * @since 1.5.0
1611 * @deprecated 2.8.0
1612 * @deprecated Use get_the_author_meta('url')
1613 * @see get_the_author_meta()
1614 *
1615 * @return string The URL to the author's page.
1616 */
1617function get_the_author_url() {
1618	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'url\')' );
1619	return get_the_author_meta('url');
1620}
1621
1622/**
1623 * Display the URL to the home page of the author of the current post.
1624 *
1625 * @since 0.71
1626 * @deprecated 2.8.0
1627 * @deprecated Use the_author_meta('url')
1628 * @see the_author_meta()
1629 */
1630function the_author_url() {
1631	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'url\')' );
1632	the_author_meta('url');
1633}
1634
1635/**
1636 * Retrieve the ID of the author of the current post.
1637 *
1638 * @since 1.5.0
1639 * @deprecated 2.8.0
1640 * @deprecated Use get_the_author_meta('ID')
1641 * @see get_the_author_meta()
1642 *
1643 * @return int The author's ID.
1644 */
1645function get_the_author_ID() {
1646	_deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' );
1647	return get_the_author_meta('ID');
1648}
1649
1650/**
1651 * Display the ID of the author of the current post.
1652 *
1653 * @since 0.71
1654 * @deprecated 2.8.0
1655 * @deprecated Use the_author_meta('ID')
1656 * @see the_author_meta()
1657*/
1658function the_author_ID() {
1659	_deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'ID\')' );
1660	the_author_meta('ID');
1661}
1662
1663/**
1664 * Display the post content for the feed.
1665 *
1666 * For encoding the html or the $encode_html parameter, there are three possible
1667 * values. '0' will make urls footnotes and use make_url_footnote(). '1' will
1668 * encode special characters and automatically display all of the content. The
1669 * value of '2' will strip all HTML tags from the content.
1670 *
1671 * Also note that you cannot set the amount of words and not set the html
1672 * encoding. If that is the case, then the html encoding will default to 2,
1673 * which will strip all HTML tags.
1674 *
1675 * To restrict the amount of words of the content, you can use the cut
1676 * parameter. If the content is less than the amount, then there won't be any
1677 * dots added to the end. If there is content left over, then dots will be added
1678 * and the rest of the content will be removed.
1679 *
1680 * @since 0.71
1681 * @uses apply_filters() Calls 'the_content_rss' on the content before processing.
1682 *
1683 * @deprecated 2.9.0
1684 * @deprecated Use the_content_feed()
1685 * @see the_content_feed()
1686 *
1687 * @param string $more_link_text Optional. Text to display when more content is available but not displayed.
1688 * @param int|bool $stripteaser Optional. Default is 0.
1689 * @param string $more_file Optional.
1690 * @param int $cut Optional. Amount of words to keep for the content.
1691 * @param int $encode_html Optional. How to encode the content.
1692 */
1693function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
1694	_deprecated_function( __FUNCTION__, '2.9', 'the_content_feed' );
1695	$content = get_the_content($more_link_text, $stripteaser);
1696	$content = apply_filters('the_content_rss', $content);
1697	if ( $cut && !$encode_html )
1698		$encode_html = 2;
1699	if ( 1== $encode_html ) {
1700		$content = esc_html($content);
1701		$cut = 0;
1702	} elseif ( 0 == $encode_html ) {
1703		$content = make_url_footnote($content);
1704	} elseif ( 2 == $encode_html ) {
1705		$content = strip_tags($content);
1706	}
1707	if ( $cut ) {
1708		$blah = explode(' ', $content);
1709		if ( count($blah) > $cut ) {
1710			$k = $cut;
1711			$use_dotdotdot = 1;
1712		} else {
1713			$k = count($blah);
1714			$use_dotdotdot = 0;
1715		}
1716
1717		/** @todo Check performance, might be faster to use array slice instead. */
1718		for ( $i=0; $i<$k; $i++ )
1719			$excerpt .= $blah[$i].' ';
1720		$excerpt .= ($use_dotdotdot) ? '...' : '';
1721		$content = $excerpt;
1722	}
1723	$content = str_replace(']]>', ']]&gt;', $content);
1724	echo $content;
1725}
1726
1727/**
1728 * Strip HTML and put links at the bottom of stripped content.
1729 *
1730 * Searches for all of the links, strips them out of the content, and places
1731 * them at the bottom of the content with numbers.
1732 *
1733 * @since 0.71
1734 * @deprecated 2.9.0
1735 *
1736 * @param string $content Content to get links
1737 * @return string HTML stripped out of content with links at the bottom.
1738 */
1739function make_url_footnote( $content ) {
1740	_deprecated_function( __FUNCTION__, '2.9', '' );
1741	preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches );
1742	$links_summary = "\n";
1743	for ( $i=0; $i<count($matches[0]); $i++ ) {
1744		$link_match = $matches[0][$i];
1745		$link_number = '['.($i+1).']';
1746		$link_url = $matches[2][$i];
1747		$link_text = $matches[4][$i];
1748		$content = str_replace( $link_match, $link_text . ' ' . $link_number, $content );
1749		$link_url = ( ( strtolower( substr( $link_url, 0, 7 ) ) != 'http://' ) && ( strtolower( substr( $link_url, 0, 8 ) ) != 'https://'…

Large files files are truncated, but you can click here to view the full file