| changeset 5 | 5e2f62d02dcd |
| parent 0 | d970ebf37754 |
| child 7 | cf61fcea0001 |
| 4:346c88efed21 | 5:5e2f62d02dcd |
|---|---|
51 |
51 |
52 /** |
52 /** |
53 * Sets up the WordPress Loop. |
53 * Sets up the WordPress Loop. |
54 * |
54 * |
55 * @since 1.0.1 |
55 * @since 1.0.1 |
56 * @deprecated 1.5 |
56 * @deprecated 1.5.0 |
57 * @deprecated Use The Loop - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop} |
57 * @deprecated Use The Loop - {@link https://codex.wordpress.org/The_Loop Use new WordPress Loop} |
58 */ |
58 */ |
59 function start_wp() { |
59 function start_wp() { |
60 global $wp_query; |
60 global $wp_query; |
61 |
61 |
62 _deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') ); |
62 _deprecated_function( __FUNCTION__, '1.5', __('new WordPress Loop') ); |
119 } |
119 } |
120 |
120 |
121 /** |
121 /** |
122 * Prints link to the previous post. |
122 * Prints link to the previous post. |
123 * |
123 * |
124 * @since 1.5 |
124 * @since 1.5.0 |
125 * @deprecated 2.0 |
125 * @deprecated 2.0.0 |
126 * @deprecated Use previous_post_link() |
126 * @deprecated Use previous_post_link() |
127 * @see previous_post_link() |
127 * @see previous_post_link() |
128 * |
128 * |
129 * @param string $format |
129 * @param string $format |
130 * @param string $previous |
130 * @param string $previous |
157 |
157 |
158 /** |
158 /** |
159 * Prints link to the next post. |
159 * Prints link to the next post. |
160 * |
160 * |
161 * @since 0.71 |
161 * @since 0.71 |
162 * @deprecated 2.0 |
162 * @deprecated 2.0.0 |
163 * @deprecated Use next_post_link() |
163 * @deprecated Use next_post_link() |
164 * @see next_post_link() |
164 * @see next_post_link() |
165 * |
165 * |
166 * @param string $format |
166 * @param string $format |
167 * @param string $next |
167 * @param string $next |
192 } |
192 } |
193 |
193 |
194 /** |
194 /** |
195 * Whether user can create a post. |
195 * Whether user can create a post. |
196 * |
196 * |
197 * @since 1.5 |
197 * @since 1.5.0 |
198 * @deprecated 2.0 |
198 * @deprecated 2.0.0 |
199 * @deprecated Use current_user_can() |
199 * @deprecated Use current_user_can() |
200 * @see current_user_can() |
200 * @see current_user_can() |
201 * |
201 * |
202 * @param int $user_id |
202 * @param int $user_id |
203 * @param int $blog_id Not Used |
203 * @param int $blog_id Not Used |
212 } |
212 } |
213 |
213 |
214 /** |
214 /** |
215 * Whether user can create a post. |
215 * Whether user can create a post. |
216 * |
216 * |
217 * @since 1.5 |
217 * @since 1.5.0 |
218 * @deprecated 2.0 |
218 * @deprecated 2.0.0 |
219 * @deprecated Use current_user_can() |
219 * @deprecated Use current_user_can() |
220 * @see current_user_can() |
220 * @see current_user_can() |
221 * |
221 * |
222 * @param int $user_id |
222 * @param int $user_id |
223 * @param int $blog_id Not Used |
223 * @param int $blog_id Not Used |
232 } |
232 } |
233 |
233 |
234 /** |
234 /** |
235 * Whether user can edit a post. |
235 * Whether user can edit a post. |
236 * |
236 * |
237 * @since 1.5 |
237 * @since 1.5.0 |
238 * @deprecated 2.0 |
238 * @deprecated 2.0.0 |
239 * @deprecated Use current_user_can() |
239 * @deprecated Use current_user_can() |
240 * @see current_user_can() |
240 * @see current_user_can() |
241 * |
241 * |
242 * @param int $user_id |
242 * @param int $user_id |
243 * @param int $post_id |
243 * @param int $post_id |
261 } |
261 } |
262 |
262 |
263 /** |
263 /** |
264 * Whether user can delete a post. |
264 * Whether user can delete a post. |
265 * |
265 * |
266 * @since 1.5 |
266 * @since 1.5.0 |
267 * @deprecated 2.0 |
267 * @deprecated 2.0.0 |
268 * @deprecated Use current_user_can() |
268 * @deprecated Use current_user_can() |
269 * @see current_user_can() |
269 * @see current_user_can() |
270 * |
270 * |
271 * @param int $user_id |
271 * @param int $user_id |
272 * @param int $post_id |
272 * @param int $post_id |
281 } |
281 } |
282 |
282 |
283 /** |
283 /** |
284 * Whether user can set new posts' dates. |
284 * Whether user can set new posts' dates. |
285 * |
285 * |
286 * @since 1.5 |
286 * @since 1.5.0 |
287 * @deprecated 2.0 |
287 * @deprecated 2.0.0 |
288 * @deprecated Use current_user_can() |
288 * @deprecated Use current_user_can() |
289 * @see current_user_can() |
289 * @see current_user_can() |
290 * |
290 * |
291 * @param int $user_id |
291 * @param int $user_id |
292 * @param int $blog_id Not Used |
292 * @param int $blog_id Not Used |
301 } |
301 } |
302 |
302 |
303 /** |
303 /** |
304 * Whether user can delete a post. |
304 * Whether user can delete a post. |
305 * |
305 * |
306 * @since 1.5 |
306 * @since 1.5.0 |
307 * @deprecated 2.0 |
307 * @deprecated 2.0.0 |
308 * @deprecated Use current_user_can() |
308 * @deprecated Use current_user_can() |
309 * @see current_user_can() |
309 * @see current_user_can() |
310 * |
310 * |
311 * @param int $user_id |
311 * @param int $user_id |
312 * @param int $post_id |
312 * @param int $post_id |
321 } |
321 } |
322 |
322 |
323 /** |
323 /** |
324 * Whether user can delete a post. |
324 * Whether user can delete a post. |
325 * |
325 * |
326 * @since 1.5 |
326 * @since 1.5.0 |
327 * @deprecated 2.0 |
327 * @deprecated 2.0.0 |
328 * @deprecated Use current_user_can() |
328 * @deprecated Use current_user_can() |
329 * @see current_user_can() |
329 * @see current_user_can() |
330 * |
330 * |
331 * @param int $user_id |
331 * @param int $user_id |
332 * @param int $post_id |
332 * @param int $post_id |
341 } |
341 } |
342 |
342 |
343 /** |
343 /** |
344 * Whether user can delete a post. |
344 * Whether user can delete a post. |
345 * |
345 * |
346 * @since 1.5 |
346 * @since 1.5.0 |
347 * @deprecated 2.0 |
347 * @deprecated 2.0.0 |
348 * @deprecated Use current_user_can() |
348 * @deprecated Use current_user_can() |
349 * @see current_user_can() |
349 * @see current_user_can() |
350 * |
350 * |
351 * @param int $user_id |
351 * @param int $user_id |
352 * @param int $post_id |
352 * @param int $post_id |
361 } |
361 } |
362 |
362 |
363 /** |
363 /** |
364 * Can user can edit other user. |
364 * Can user can edit other user. |
365 * |
365 * |
366 * @since 1.5 |
366 * @since 1.5.0 |
367 * @deprecated 2.0 |
367 * @deprecated 2.0.0 |
368 * @deprecated Use current_user_can() |
368 * @deprecated Use current_user_can() |
369 * @see current_user_can() |
369 * @see current_user_can() |
370 * |
370 * |
371 * @param int $user_id |
371 * @param int $user_id |
372 * @param int $other_user |
372 * @param int $other_user |
385 |
385 |
386 /** |
386 /** |
387 * Gets the links associated with category $cat_name. |
387 * Gets the links associated with category $cat_name. |
388 * |
388 * |
389 * @since 0.71 |
389 * @since 0.71 |
390 * @deprecated 2.1 |
390 * @deprecated 2.1.0 |
391 * @deprecated Use get_bookmarks() |
391 * @deprecated Use get_bookmarks() |
392 * @see get_bookmarks() |
392 * @see get_bookmarks() |
393 * |
393 * |
394 * @param string $cat_name Optional. The category name to use. If no match is found uses all. |
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. |
395 * @param string $before Optional. The html to output before the link. |
419 |
419 |
420 /** |
420 /** |
421 * Gets the links associated with the named category. |
421 * Gets the links associated with the named category. |
422 * |
422 * |
423 * @since 1.0.1 |
423 * @since 1.0.1 |
424 * @deprecated 2.1 |
424 * @deprecated 2.1.0 |
425 * @deprecated Use wp_list_bookmarks() |
425 * @deprecated Use wp_list_bookmarks() |
426 * @see wp_list_bookmarks() |
426 * @see wp_list_bookmarks() |
427 * |
427 * |
428 * @param string $category The category to use. |
428 * @param string $category The category to use. |
429 * @param string $args |
429 * @param string $args |
430 * @return bool|null |
430 * @return string|null |
431 */ |
431 */ |
432 function wp_get_linksbyname($category, $args = '') { |
432 function wp_get_linksbyname($category, $args = '') { |
433 _deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()'); |
433 _deprecated_function(__FUNCTION__, '2.1', 'wp_list_bookmarks()'); |
434 |
434 |
435 $defaults = array( |
435 $defaults = array( |
449 } |
449 } |
450 |
450 |
451 /** |
451 /** |
452 * Gets an array of link objects associated with category $cat_name. |
452 * Gets an array of link objects associated with category $cat_name. |
453 * |
453 * |
454 * <code> |
454 * $links = get_linkobjectsbyname( 'fred' ); |
455 * $links = get_linkobjectsbyname('fred'); |
455 * foreach ( $links as $link ) { |
456 * foreach ($links as $link) { |
456 * echo '<li>' . $link->link_name . '</li>'; |
457 * echo '<li>'.$link->link_name.'</li>'; |
457 * } |
458 * } |
|
459 * </code> |
|
460 * |
458 * |
461 * @since 1.0.1 |
459 * @since 1.0.1 |
462 * @deprecated 2.1 |
460 * @deprecated 2.1.0 |
463 * @deprecated Use get_bookmarks() |
461 * @deprecated Use get_bookmarks() |
464 * @see get_bookmarks() |
462 * @see get_bookmarks() |
465 * |
463 * |
466 * @param string $cat_name The category name to use. If no match is found uses all. |
464 * @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'. |
465 * @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 |
466 * 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. |
467 * 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. |
468 * @param int $limit Limit to X entries. If not specified, all entries are shown. |
471 * @return unknown |
469 * @return array |
472 */ |
470 */ |
473 function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) { |
471 function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) { |
474 _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); |
472 _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); |
475 |
473 |
476 $cat_id = -1; |
474 $cat_id = -1; |
483 |
481 |
484 /** |
482 /** |
485 * Gets an array of link objects associated with category n. |
483 * Gets an array of link objects associated with category n. |
486 * |
484 * |
487 * Usage: |
485 * Usage: |
488 * <code> |
486 * |
489 * $links = get_linkobjects(1); |
487 * $links = get_linkobjects(1); |
490 * if ($links) { |
488 * if ($links) { |
491 * foreach ($links as $link) { |
489 * foreach ($links as $link) { |
492 * echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>'; |
490 * echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>'; |
493 * } |
491 * } |
494 * } |
492 * } |
495 * </code> |
|
496 * |
493 * |
497 * Fields are: |
494 * Fields are: |
498 * <ol> |
495 * |
499 * <li>link_id</li> |
496 * - link_id |
500 * <li>link_url</li> |
497 * - link_url |
501 * <li>link_name</li> |
498 * - link_name |
502 * <li>link_image</li> |
499 * - link_image |
503 * <li>link_target</li> |
500 * - link_target |
504 * <li>link_category</li> |
501 * - link_category |
505 * <li>link_description</li> |
502 * - link_description |
506 * <li>link_visible</li> |
503 * - link_visible |
507 * <li>link_owner</li> |
504 * - link_owner |
508 * <li>link_rating</li> |
505 * - link_rating |
509 * <li>link_updated</li> |
506 * - link_updated |
510 * <li>link_rel</li> |
507 * - link_rel |
511 * <li>link_notes</li> |
508 * - link_notes |
512 * </ol> |
|
513 * |
509 * |
514 * @since 1.0.1 |
510 * @since 1.0.1 |
515 * @deprecated 2.1 |
511 * @deprecated 2.1.0 |
516 * @deprecated Use get_bookmarks() |
512 * @deprecated Use get_bookmarks() |
517 * @see get_bookmarks() |
513 * @see get_bookmarks() |
518 * |
514 * |
519 * @param int $category The category to use. If no category supplied uses all |
515 * @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', |
516 * @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 |
517 * '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 |
518 * underscore the order will be reversed. You can also specify 'rand' as the |
523 * order which will return links in a random order. |
519 * order which will return links in a random order. |
524 * @param int $limit Limit to X entries. If not specified, all entries are shown. |
520 * @param int $limit Limit to X entries. If not specified, all entries are shown. |
525 * @return unknown |
521 * @return array |
526 */ |
522 */ |
527 function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { |
523 function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { |
528 _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); |
524 _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); |
529 |
525 |
530 $links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ; |
526 $links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ; |
538 |
534 |
539 /** |
535 /** |
540 * Gets the links associated with category 'cat_name' and display rating stars/chars. |
536 * Gets the links associated with category 'cat_name' and display rating stars/chars. |
541 * |
537 * |
542 * @since 0.71 |
538 * @since 0.71 |
543 * @deprecated 2.1 |
539 * @deprecated 2.1.0 |
544 * @deprecated Use get_bookmarks() |
540 * @deprecated Use get_bookmarks() |
545 * @see get_bookmarks() |
541 * @see get_bookmarks() |
546 * |
542 * |
547 * @param string $cat_name The category name to use. If no match is found uses all |
543 * @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 |
544 * @param string $before The html to output before the link |
566 |
562 |
567 /** |
563 /** |
568 * Gets the links associated with category n and display rating stars/chars. |
564 * Gets the links associated with category n and display rating stars/chars. |
569 * |
565 * |
570 * @since 0.71 |
566 * @since 0.71 |
571 * @deprecated 2.1 |
567 * @deprecated 2.1.0 |
572 * @deprecated Use get_bookmarks() |
568 * @deprecated Use get_bookmarks() |
573 * @see get_bookmarks() |
569 * @see get_bookmarks() |
574 * |
570 * |
575 * @param int $category The category to use. If no category supplied uses all |
571 * @param int $category The category to use. If no category supplied uses all |
576 * @param string $before The html to output before the link |
572 * @param string $before The html to output before the link |
580 * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', |
576 * @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 |
577 * '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 |
578 * underscore the order will be reversed. You can also specify 'rand' as the |
583 * order which will return links in a random order. |
579 * 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. |
580 * @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. |
581 * @param int $limit Limit to X entries. If not specified, all entries are shown. |
586 * @param int $show_updated Whether to show last updated timestamp |
582 * @param int $show_updated Whether to show last updated timestamp |
587 */ |
583 */ |
588 function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, |
584 function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, |
589 $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { |
585 $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { |
590 _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); |
586 _deprecated_function( __FUNCTION__, '2.1', 'get_bookmarks()' ); |
594 |
590 |
595 /** |
591 /** |
596 * Gets the auto_toggle setting. |
592 * Gets the auto_toggle setting. |
597 * |
593 * |
598 * @since 0.71 |
594 * @since 0.71 |
599 * @deprecated 2.1 |
595 * @deprecated 2.1.0 |
600 * @deprecated No alternative function available |
596 * @deprecated No alternative function available |
601 * |
597 * |
602 * @param int $id The category to get. If no category supplied uses 0 |
598 * @param int $id The category to get. If no category supplied uses 0 |
603 * @return int Only returns 0. |
599 * @return int Only returns 0. |
604 */ |
600 */ |
607 return 0; |
603 return 0; |
608 } |
604 } |
609 |
605 |
610 /** |
606 /** |
611 * @since 0.71 |
607 * @since 0.71 |
612 * @deprecated 2.1 |
608 * @deprecated 2.1.0 |
613 * @deprecated Use wp_list_categories() |
609 * @deprecated Use wp_list_categories() |
614 * @see wp_list_categories() |
610 * @see wp_list_categories() |
615 * |
611 * |
616 * @param int $optionall |
612 * @param int $optionall |
617 * @param string $all |
613 * @param string $all |
629 * @param int $recurse |
625 * @param int $recurse |
630 * @param string $feed |
626 * @param string $feed |
631 * @param string $feed_image |
627 * @param string $feed_image |
632 * @param string $exclude |
628 * @param string $exclude |
633 * @param bool $hierarchical |
629 * @param bool $hierarchical |
634 * @return unknown |
630 * @return false|null |
635 */ |
631 */ |
636 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, |
632 function 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, |
633 $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) { |
634 $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { |
639 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); |
635 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); |
642 'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); |
638 'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); |
643 return wp_list_cats($query); |
639 return wp_list_cats($query); |
644 } |
640 } |
645 |
641 |
646 /** |
642 /** |
647 * @since 1.2 |
643 * @since 1.2.0 |
648 * @deprecated 2.1 |
644 * @deprecated 2.1.0 |
649 * @deprecated Use wp_list_categories() |
645 * @deprecated Use wp_list_categories() |
650 * @see wp_list_categories() |
646 * @see wp_list_categories() |
651 * |
647 * |
652 * @param string|array $args |
648 * @param string|array $args |
653 * @return unknown |
649 * @return false|null|string |
654 */ |
650 */ |
655 function wp_list_cats($args = '') { |
651 function wp_list_cats($args = '') { |
656 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); |
652 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_categories()' ); |
657 |
653 |
658 $r = wp_parse_args( $args ); |
654 $r = wp_parse_args( $args ); |
675 return wp_list_categories($r); |
671 return wp_list_categories($r); |
676 } |
672 } |
677 |
673 |
678 /** |
674 /** |
679 * @since 0.71 |
675 * @since 0.71 |
680 * @deprecated 2.1 |
676 * @deprecated 2.1.0 |
681 * @deprecated Use wp_dropdown_categories() |
677 * @deprecated Use wp_dropdown_categories() |
682 * @see wp_dropdown_categories() |
678 * @see wp_dropdown_categories() |
683 * |
679 * |
684 * @param int $optionall |
680 * @param int $optionall |
685 * @param string $all |
681 * @param string $all |
689 * @param int $show_count |
685 * @param int $show_count |
690 * @param int $hide_empty |
686 * @param int $hide_empty |
691 * @param bool $optionnone |
687 * @param bool $optionnone |
692 * @param int $selected |
688 * @param int $selected |
693 * @param int $exclude |
689 * @param int $exclude |
694 * @return unknown |
690 * @return string |
695 */ |
691 */ |
696 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc', |
692 function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc', |
697 $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false, |
693 $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false, |
698 $selected = 0, $exclude = 0) { |
694 $selected = 0, $exclude = 0) { |
699 _deprecated_function( __FUNCTION__, '2.1', 'wp_dropdown_categories()' ); |
695 _deprecated_function( __FUNCTION__, '2.1', 'wp_dropdown_categories()' ); |
711 $query = add_query_arg($vars, ''); |
707 $query = add_query_arg($vars, ''); |
712 return wp_dropdown_categories($query); |
708 return wp_dropdown_categories($query); |
713 } |
709 } |
714 |
710 |
715 /** |
711 /** |
716 * @since 1.2 |
712 * List authors. |
717 * @deprecated 2.1 |
713 * |
714 * @since 1.2.0 |
|
715 * @deprecated 2.1.0 |
|
718 * @deprecated Use wp_list_authors() |
716 * @deprecated Use wp_list_authors() |
719 * @see wp_list_authors() |
717 * @see wp_list_authors() |
720 * |
718 * |
721 * @param bool $optioncount |
719 * @param bool $optioncount |
722 * @param bool $exclude_admin |
720 * @param bool $exclude_admin |
723 * @param bool $show_fullname |
721 * @param bool $show_fullname |
724 * @param bool $hide_empty |
722 * @param bool $hide_empty |
725 * @param string $feed |
723 * @param string $feed |
726 * @param string $feed_image |
724 * @param string $feed_image |
727 * @return unknown |
725 * @return null|string |
728 */ |
726 */ |
729 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { |
727 function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') { |
730 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' ); |
728 _deprecated_function( __FUNCTION__, '2.1', 'wp_list_authors()' ); |
731 |
729 |
732 $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image'); |
730 $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image'); |
733 return wp_list_authors($args); |
731 return wp_list_authors($args); |
734 } |
732 } |
735 |
733 |
736 /** |
734 /** |
737 * @since 1.0.1 |
735 * @since 1.0.1 |
738 * @deprecated 2.1 |
736 * @deprecated 2.1.0 |
739 * @deprecated Use wp_get_post_categories() |
737 * @deprecated Use wp_get_post_categories() |
740 * @see wp_get_post_categories() |
738 * @see wp_get_post_categories() |
741 * |
739 * |
742 * @param int $blogid Not Used |
740 * @param int $blogid Not Used |
743 * @param int $post_ID |
741 * @param int $post_ID |
744 * @return unknown |
742 * @return array |
745 */ |
743 */ |
746 function wp_get_post_cats($blogid = '1', $post_ID = 0) { |
744 function wp_get_post_cats($blogid = '1', $post_ID = 0) { |
747 _deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' ); |
745 _deprecated_function( __FUNCTION__, '2.1', 'wp_get_post_categories()' ); |
748 return wp_get_post_categories($post_ID); |
746 return wp_get_post_categories($post_ID); |
749 } |
747 } |
750 |
748 |
751 /** |
749 /** |
752 * Sets the categories that the post id belongs to. |
750 * Sets the categories that the post id belongs to. |
753 * |
751 * |
754 * @since 1.0.1 |
752 * @since 1.0.1 |
755 * @deprecated 2.1 |
753 * @deprecated 2.1.0 |
756 * @deprecated Use wp_set_post_categories() |
754 * @deprecated Use wp_set_post_categories() |
757 * @see wp_set_post_categories() |
755 * @see wp_set_post_categories() |
758 * |
756 * |
759 * @param int $blogid Not used |
757 * @param int $blogid Not used |
760 * @param int $post_ID |
758 * @param int $post_ID |
761 * @param array $post_categories |
759 * @param array $post_categories |
762 * @return unknown |
760 * @return bool|mixed |
763 */ |
761 */ |
764 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) { |
762 function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) { |
765 _deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' ); |
763 _deprecated_function( __FUNCTION__, '2.1', 'wp_set_post_categories()' ); |
766 return wp_set_post_categories($post_ID, $post_categories); |
764 return wp_set_post_categories($post_ID, $post_categories); |
767 } |
765 } |
768 |
766 |
769 /** |
767 /** |
770 * @since 0.71 |
768 * @since 0.71 |
771 * @deprecated 2.1 |
769 * @deprecated 2.1.0 |
772 * @deprecated Use wp_get_archives() |
770 * @deprecated Use wp_get_archives() |
773 * @see wp_get_archives() |
771 * @see wp_get_archives() |
774 * |
772 * |
775 * @param string $type |
773 * @param string $type |
776 * @param string $limit |
774 * @param string $limit |
777 * @param string $format |
775 * @param string $format |
778 * @param string $before |
776 * @param string $before |
779 * @param string $after |
777 * @param string $after |
780 * @param bool $show_post_count |
778 * @param bool $show_post_count |
781 * @return unknown |
779 * @return string|null |
782 */ |
780 */ |
783 function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) { |
781 function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) { |
784 _deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' ); |
782 _deprecated_function( __FUNCTION__, '2.1', 'wp_get_archives()' ); |
785 $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count'); |
783 $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count'); |
786 return wp_get_archives($args); |
784 return wp_get_archives($args); |
787 } |
785 } |
788 |
786 |
789 /** |
787 /** |
790 * Returns or Prints link to the author's posts. |
788 * Returns or Prints link to the author's posts. |
791 * |
789 * |
792 * @since 1.2 |
790 * @since 1.2.0 |
793 * @deprecated 2.1 |
791 * @deprecated 2.1.0 |
794 * @deprecated Use get_author_posts_url() |
792 * @deprecated Use get_author_posts_url() |
795 * @see get_author_posts_url() |
793 * @see get_author_posts_url() |
796 * |
794 * |
797 * @param bool $echo |
795 * @param bool $echo |
798 * @param int $author_id |
796 * @param int $author_id |
811 |
809 |
812 /** |
810 /** |
813 * Print list of pages based on arguments. |
811 * Print list of pages based on arguments. |
814 * |
812 * |
815 * @since 0.71 |
813 * @since 0.71 |
816 * @deprecated 2.1 |
814 * @deprecated 2.1.0 |
817 * @deprecated Use wp_link_pages() |
815 * @deprecated Use wp_link_pages() |
818 * @see wp_link_pages() |
816 * @see wp_link_pages() |
819 * |
817 * |
820 * @param string $before |
818 * @param string $before |
821 * @param string $after |
819 * @param string $after |
836 |
834 |
837 /** |
835 /** |
838 * Get value based on option. |
836 * Get value based on option. |
839 * |
837 * |
840 * @since 0.71 |
838 * @since 0.71 |
841 * @deprecated 2.1 |
839 * @deprecated 2.1.0 |
842 * @deprecated Use get_option() |
840 * @deprecated Use get_option() |
843 * @see get_option() |
841 * @see get_option() |
844 * |
842 * |
845 * @param string $option |
843 * @param string $option |
846 * @return string |
844 * @return string |
853 |
851 |
854 /** |
852 /** |
855 * Print the permalink of the current post in the loop. |
853 * Print the permalink of the current post in the loop. |
856 * |
854 * |
857 * @since 0.71 |
855 * @since 0.71 |
858 * @deprecated 1.2 |
856 * @deprecated 1.2.0 |
859 * @deprecated Use the_permalink() |
857 * @deprecated Use the_permalink() |
860 * @see the_permalink() |
858 * @see the_permalink() |
861 */ |
859 */ |
862 function permalink_link() { |
860 function permalink_link() { |
863 _deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' ); |
861 _deprecated_function( __FUNCTION__, '1.2', 'the_permalink()' ); |
866 |
864 |
867 /** |
865 /** |
868 * Print the permalink to the RSS feed. |
866 * Print the permalink to the RSS feed. |
869 * |
867 * |
870 * @since 0.71 |
868 * @since 0.71 |
871 * @deprecated 2.3 |
869 * @deprecated 2.3.0 |
872 * @deprecated Use the_permalink_rss() |
870 * @deprecated Use the_permalink_rss() |
873 * @see the_permalink_rss() |
871 * @see the_permalink_rss() |
874 * |
872 * |
875 * @param string $deprecated |
873 * @param string $deprecated |
876 */ |
874 */ |
882 /** |
880 /** |
883 * Gets the links associated with category. |
881 * Gets the links associated with category. |
884 * |
882 * |
885 * @see get_links() for argument information that can be used in $args |
883 * @see get_links() for argument information that can be used in $args |
886 * @since 1.0.1 |
884 * @since 1.0.1 |
887 * @deprecated 2.1 |
885 * @deprecated 2.1.0 |
888 * @deprecated Use wp_list_bookmarks() |
886 * @deprecated Use wp_list_bookmarks() |
889 * @see wp_list_bookmarks() |
887 * @see wp_list_bookmarks() |
890 * |
888 * |
891 * @param string $args a query string |
889 * @param string $args a query string |
892 * @return null|string |
890 * @return null|string |
922 |
920 |
923 /** |
921 /** |
924 * Gets the links associated with category by id. |
922 * Gets the links associated with category by id. |
925 * |
923 * |
926 * @since 0.71 |
924 * @since 0.71 |
927 * @deprecated 2.1 |
925 * @deprecated 2.1.0 |
928 * @deprecated Use get_bookmarks() |
926 * @deprecated Use get_bookmarks() |
929 * @see get_bookmarks() |
927 * @see get_bookmarks() |
930 * |
928 * |
931 * @param int $category The category to use. If no category supplied uses all |
929 * @param int $category The category to use. If no category supplied uses all |
932 * @param string $before the html to output before the link |
930 * @param string $before the html to output before the link |
1031 * |
1029 * |
1032 * Output a list of all links, listed by category, using the settings in |
1030 * Output a list of all links, listed by category, using the settings in |
1033 * $wpdb->linkcategories and output it as a nested HTML unordered list. |
1031 * $wpdb->linkcategories and output it as a nested HTML unordered list. |
1034 * |
1032 * |
1035 * @since 1.0.1 |
1033 * @since 1.0.1 |
1036 * @deprecated 2.1 |
1034 * @deprecated 2.1.0 |
1037 * @deprecated Use wp_list_bookmarks() |
1035 * @deprecated Use wp_list_bookmarks() |
1038 * @see wp_list_bookmarks() |
1036 * @see wp_list_bookmarks() |
1039 * |
1037 * |
1040 * @param string $order Sort link categories by 'name' or 'id' |
1038 * @param string $order Sort link categories by 'name' or 'id' |
1041 */ |
1039 */ |
1074 |
1072 |
1075 /** |
1073 /** |
1076 * Show the link to the links popup and the number of links. |
1074 * Show the link to the links popup and the number of links. |
1077 * |
1075 * |
1078 * @since 0.71 |
1076 * @since 0.71 |
1079 * @deprecated 2.1 |
1077 * @deprecated 2.1.0 |
1080 * @deprecated {@internal Use function instead is unknown}} |
1078 * @deprecated {@internal Use function instead is unknown}} |
1081 * |
1079 * |
1082 * @param string $text the text of the link |
1080 * @param string $text the text of the link |
1083 * @param int $width the width of the popup window |
1081 * @param int $width the width of the popup window |
1084 * @param int $height the height of the popup window |
1082 * @param int $height the height of the popup window |
1089 _deprecated_function( __FUNCTION__, '2.1' ); |
1087 _deprecated_function( __FUNCTION__, '2.1' ); |
1090 } |
1088 } |
1091 |
1089 |
1092 /** |
1090 /** |
1093 * @since 1.0.1 |
1091 * @since 1.0.1 |
1094 * @deprecated 2.1 |
1092 * @deprecated 2.1.0 |
1095 * @deprecated Use sanitize_bookmark_field() |
1093 * @deprecated Use sanitize_bookmark_field() |
1096 * @see sanitize_bookmark_field() |
1094 * @see sanitize_bookmark_field() |
1097 * |
1095 * |
1098 * @param object $link |
1096 * @param object $link |
1099 * @return unknown |
1097 * @return mixed |
1100 */ |
1098 */ |
1101 function get_linkrating($link) { |
1099 function get_linkrating($link) { |
1102 _deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' ); |
1100 _deprecated_function( __FUNCTION__, '2.1', 'sanitize_bookmark_field()' ); |
1103 return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display'); |
1101 return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display'); |
1104 } |
1102 } |
1105 |
1103 |
1106 /** |
1104 /** |
1107 * Gets the name of category by id. |
1105 * Gets the name of category by id. |
1108 * |
1106 * |
1109 * @since 0.71 |
1107 * @since 0.71 |
1110 * @deprecated 2.1 |
1108 * @deprecated 2.1.0 |
1111 * @deprecated Use get_category() |
1109 * @deprecated Use get_category() |
1112 * @see get_category() |
1110 * @see get_category() |
1113 * |
1111 * |
1114 * @param int $id The category to get. If no category supplied uses 0 |
1112 * @param int $id The category to get. If no category supplied uses 0 |
1115 * @return string |
1113 * @return string |
1135 |
1133 |
1136 /** |
1134 /** |
1137 * Print RSS comment feed link. |
1135 * Print RSS comment feed link. |
1138 * |
1136 * |
1139 * @since 1.0.1 |
1137 * @since 1.0.1 |
1140 * @deprecated 2.5 |
1138 * @deprecated 2.5.0 |
1141 * @deprecated Use post_comments_feed_link() |
1139 * @deprecated Use post_comments_feed_link() |
1142 * @see post_comments_feed_link() |
1140 * @see post_comments_feed_link() |
1143 * |
1141 * |
1144 * @param string $link_text |
1142 * @param string $link_text |
1145 */ |
1143 */ |
1149 } |
1147 } |
1150 |
1148 |
1151 /** |
1149 /** |
1152 * Print/Return link to category RSS2 feed. |
1150 * Print/Return link to category RSS2 feed. |
1153 * |
1151 * |
1154 * @since 1.2 |
1152 * @since 1.2.0 |
1155 * @deprecated 2.5 |
1153 * @deprecated 2.5.0 |
1156 * @deprecated Use get_category_feed_link() |
1154 * @deprecated Use get_category_feed_link() |
1157 * @see get_category_feed_link() |
1155 * @see get_category_feed_link() |
1158 * |
1156 * |
1159 * @param bool $echo |
1157 * @param bool $echo |
1160 * @param int $cat_ID |
1158 * @param int $cat_ID |
1161 * @return string|null |
1159 * @return string |
1162 */ |
1160 */ |
1163 function get_category_rss_link($echo = false, $cat_ID = 1) { |
1161 function get_category_rss_link($echo = false, $cat_ID = 1) { |
1164 _deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' ); |
1162 _deprecated_function( __FUNCTION__, '2.5', 'get_category_feed_link()' ); |
1165 |
1163 |
1166 $link = get_category_feed_link($cat_ID, 'rss2'); |
1164 $link = get_category_feed_link($cat_ID, 'rss2'); |
1171 } |
1169 } |
1172 |
1170 |
1173 /** |
1171 /** |
1174 * Print/Return link to author RSS feed. |
1172 * Print/Return link to author RSS feed. |
1175 * |
1173 * |
1176 * @since 1.2 |
1174 * @since 1.2.0 |
1177 * @deprecated 2.5 |
1175 * @deprecated 2.5.0 |
1178 * @deprecated Use get_author_feed_link() |
1176 * @deprecated Use get_author_feed_link() |
1179 * @see get_author_feed_link() |
1177 * @see get_author_feed_link() |
1180 * |
1178 * |
1181 * @param bool $echo |
1179 * @param bool $echo |
1182 * @param int $author_id |
1180 * @param int $author_id |
1183 * @return string|null |
1181 * @return string |
1184 */ |
1182 */ |
1185 function get_author_rss_link($echo = false, $author_id = 1) { |
1183 function get_author_rss_link($echo = false, $author_id = 1) { |
1186 _deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' ); |
1184 _deprecated_function( __FUNCTION__, '2.5', 'get_author_feed_link()' ); |
1187 |
1185 |
1188 $link = get_author_feed_link($author_id); |
1186 $link = get_author_feed_link($author_id); |
1192 } |
1190 } |
1193 |
1191 |
1194 /** |
1192 /** |
1195 * Return link to the post RSS feed. |
1193 * Return link to the post RSS feed. |
1196 * |
1194 * |
1197 * @since 1.5 |
1195 * @since 1.5.0 |
1198 * @deprecated 2.2 |
1196 * @deprecated 2.2.0 |
1199 * @deprecated Use get_post_comments_feed_link() |
1197 * @deprecated Use get_post_comments_feed_link() |
1200 * @see get_post_comments_feed_link() |
1198 * @see get_post_comments_feed_link() |
1201 * |
1199 * |
1202 * @return string |
1200 * @return string |
1203 */ |
1201 */ |
1207 } |
1205 } |
1208 |
1206 |
1209 /** |
1207 /** |
1210 * An alias of wp_create_user(). |
1208 * An alias of wp_create_user(). |
1211 * |
1209 * |
1212 * @since 2.0 |
1210 * @since 2.0.0 |
1213 * @deprecated 2.0 |
1211 * @deprecated 2.0.0 |
1214 * @deprecated Use wp_create_user() |
1212 * @deprecated Use wp_create_user() |
1215 * @see wp_create_user() |
1213 * @see wp_create_user() |
1216 * |
1214 * |
1217 * @param string $username The user's username. |
1215 * @param string $username The user's username. |
1218 * @param string $password The user's password. |
1216 * @param string $password The user's password. |
1219 * @param string $email The user's email (optional). |
1217 * @param string $email The user's email. |
1220 * @return int The new user's ID. |
1218 * @return int The new user's ID. |
1221 */ |
1219 */ |
1222 function create_user($username, $password, $email) { |
1220 function create_user($username, $password, $email) { |
1223 _deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' ); |
1221 _deprecated_function( __FUNCTION__, '2.0', 'wp_create_user()' ); |
1224 return wp_create_user($username, $password, $email); |
1222 return wp_create_user($username, $password, $email); |
1225 } |
1223 } |
1226 |
1224 |
1227 /** |
1225 /** |
1228 * Unused function. |
1226 * Unused function. |
1229 * |
1227 * |
1230 * @deprecated 2.5 |
1228 * @deprecated 2.5.0 |
1231 */ |
1229 */ |
1232 function gzip_compression() { |
1230 function gzip_compression() { |
1233 _deprecated_function( __FUNCTION__, '2.5' ); |
1231 _deprecated_function( __FUNCTION__, '2.5' ); |
1234 return false; |
1232 return false; |
1235 } |
1233 } |
1236 |
1234 |
1237 /** |
1235 /** |
1238 * Retrieve an array of comment data about comment $comment_ID. |
1236 * Retrieve an array of comment data about comment $comment_ID. |
1239 * |
1237 * |
1240 * @since 0.71 |
1238 * @since 0.71 |
1241 * @deprecated 2.7 |
1239 * @deprecated 2.7.0 |
1242 * @deprecated Use get_comment() |
1240 * @deprecated Use get_comment() |
1243 * @see get_comment() |
1241 * @see get_comment() |
1244 * |
1242 * |
1245 * @param int $comment_ID The ID of the comment |
1243 * @param int $comment_ID The ID of the comment |
1246 * @param int $no_cache Whether to use the cache (cast to bool) |
1244 * @param int $no_cache Whether to use the cache (cast to bool) |
1254 |
1252 |
1255 /** |
1253 /** |
1256 * Retrieve the category name by the category ID. |
1254 * Retrieve the category name by the category ID. |
1257 * |
1255 * |
1258 * @since 0.71 |
1256 * @since 0.71 |
1259 * @deprecated 2.8 |
1257 * @deprecated 2.8.0 |
1260 * @deprecated Use get_cat_name() |
1258 * @deprecated Use get_cat_name() |
1261 * @see get_cat_name() |
1259 * @see get_cat_name() |
1262 * |
1260 * |
1263 * @param int $cat_ID Category ID |
1261 * @param int $cat_ID Category ID |
1264 * @return string category name |
1262 * @return string category name |
1270 |
1268 |
1271 /** |
1269 /** |
1272 * Retrieve category children list separated before and after the term IDs. |
1270 * Retrieve category children list separated before and after the term IDs. |
1273 * |
1271 * |
1274 * @since 1.2.0 |
1272 * @since 1.2.0 |
1275 * @deprecated 2.8 |
1273 * @deprecated 2.8.0 |
1276 * @deprecated Use get_term_children() |
1274 * @deprecated Use get_term_children() |
1277 * @see get_term_children() |
1275 * @see get_term_children() |
1278 * |
1276 * |
1279 * @param int $id Category ID to retrieve children. |
1277 * @param int $id Category ID to retrieve children. |
1280 * @param string $before Optional. Prepend before category term ID. |
1278 * @param string $before Optional. Prepend before category term ID. |
1305 } |
1303 } |
1306 return $chain; |
1304 return $chain; |
1307 } |
1305 } |
1308 |
1306 |
1309 /** |
1307 /** |
1308 * Retrieves all category IDs. |
|
1309 * |
|
1310 * @since 2.0.0 |
|
1311 * @deprecated 4.0.0 Use get_terms() instead. |
|
1312 * @see get_terms() |
|
1313 * @link https://codex.wordpress.org/Function_Reference/get_all_category_ids |
|
1314 * |
|
1315 * @return object List of all of the category IDs. |
|
1316 */ |
|
1317 function get_all_category_ids() { |
|
1318 _deprecated_function( __FUNCTION__, '4.0', 'get_terms()' ); |
|
1319 |
|
1320 if ( ! $cat_ids = wp_cache_get( 'all_category_ids', 'category' ) ) { |
|
1321 $cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') ); |
|
1322 wp_cache_add( 'all_category_ids', $cat_ids, 'category' ); |
|
1323 } |
|
1324 |
|
1325 return $cat_ids; |
|
1326 } |
|
1327 |
|
1328 /** |
|
1310 * Retrieve the description of the author of the current post. |
1329 * Retrieve the description of the author of the current post. |
1311 * |
1330 * |
1312 * @since 1.5 |
1331 * @since 1.5.0 |
1313 * @deprecated 2.8 |
1332 * @deprecated 2.8.0 |
1314 * @deprecated Use get_the_author_meta('description') |
1333 * @deprecated Use get_the_author_meta('description') |
1315 * @see get_the_author_meta() |
1334 * @see get_the_author_meta() |
1316 * |
1335 * |
1317 * @return string The author's description. |
1336 * @return string The author's description. |
1318 */ |
1337 */ |
1323 |
1342 |
1324 /** |
1343 /** |
1325 * Display the description of the author of the current post. |
1344 * Display the description of the author of the current post. |
1326 * |
1345 * |
1327 * @since 1.0.0 |
1346 * @since 1.0.0 |
1328 * @deprecated 2.8 |
1347 * @deprecated 2.8.0 |
1329 * @deprecated Use the_author_meta('description') |
1348 * @deprecated Use the_author_meta('description') |
1330 * @see the_author_meta() |
1349 * @see the_author_meta() |
1331 */ |
1350 */ |
1332 function the_author_description() { |
1351 function the_author_description() { |
1333 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'description\')' ); |
1352 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'description\')' ); |
1335 } |
1354 } |
1336 |
1355 |
1337 /** |
1356 /** |
1338 * Retrieve the login name of the author of the current post. |
1357 * Retrieve the login name of the author of the current post. |
1339 * |
1358 * |
1340 * @since 1.5 |
1359 * @since 1.5.0 |
1341 * @deprecated 2.8 |
1360 * @deprecated 2.8.0 |
1342 * @deprecated Use get_the_author_meta('login') |
1361 * @deprecated Use get_the_author_meta('login') |
1343 * @see get_the_author_meta() |
1362 * @see get_the_author_meta() |
1344 * |
1363 * |
1345 * @return string The author's login name (username). |
1364 * @return string The author's login name (username). |
1346 */ |
1365 */ |
1351 |
1370 |
1352 /** |
1371 /** |
1353 * Display the login name of the author of the current post. |
1372 * Display the login name of the author of the current post. |
1354 * |
1373 * |
1355 * @since 0.71 |
1374 * @since 0.71 |
1356 * @deprecated 2.8 |
1375 * @deprecated 2.8.0 |
1357 * @deprecated Use the_author_meta('login') |
1376 * @deprecated Use the_author_meta('login') |
1358 * @see the_author_meta() |
1377 * @see the_author_meta() |
1359 */ |
1378 */ |
1360 function the_author_login() { |
1379 function the_author_login() { |
1361 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'login\')' ); |
1380 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'login\')' ); |
1363 } |
1382 } |
1364 |
1383 |
1365 /** |
1384 /** |
1366 * Retrieve the first name of the author of the current post. |
1385 * Retrieve the first name of the author of the current post. |
1367 * |
1386 * |
1368 * @since 1.5 |
1387 * @since 1.5.0 |
1369 * @deprecated 2.8 |
1388 * @deprecated 2.8.0 |
1370 * @deprecated Use get_the_author_meta('first_name') |
1389 * @deprecated Use get_the_author_meta('first_name') |
1371 * @see get_the_author_meta() |
1390 * @see get_the_author_meta() |
1372 * |
1391 * |
1373 * @return string The author's first name. |
1392 * @return string The author's first name. |
1374 */ |
1393 */ |
1379 |
1398 |
1380 /** |
1399 /** |
1381 * Display the first name of the author of the current post. |
1400 * Display the first name of the author of the current post. |
1382 * |
1401 * |
1383 * @since 0.71 |
1402 * @since 0.71 |
1384 * @deprecated 2.8 |
1403 * @deprecated 2.8.0 |
1385 * @deprecated Use the_author_meta('first_name') |
1404 * @deprecated Use the_author_meta('first_name') |
1386 * @see the_author_meta() |
1405 * @see the_author_meta() |
1387 */ |
1406 */ |
1388 function the_author_firstname() { |
1407 function the_author_firstname() { |
1389 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' ); |
1408 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'first_name\')' ); |
1391 } |
1410 } |
1392 |
1411 |
1393 /** |
1412 /** |
1394 * Retrieve the last name of the author of the current post. |
1413 * Retrieve the last name of the author of the current post. |
1395 * |
1414 * |
1396 * @since 1.5 |
1415 * @since 1.5.0 |
1397 * @deprecated 2.8 |
1416 * @deprecated 2.8.0 |
1398 * @deprecated Use get_the_author_meta('last_name') |
1417 * @deprecated Use get_the_author_meta('last_name') |
1399 * @see get_the_author_meta() |
1418 * @see get_the_author_meta() |
1400 * |
1419 * |
1401 * @return string The author's last name. |
1420 * @return string The author's last name. |
1402 */ |
1421 */ |
1407 |
1426 |
1408 /** |
1427 /** |
1409 * Display the last name of the author of the current post. |
1428 * Display the last name of the author of the current post. |
1410 * |
1429 * |
1411 * @since 0.71 |
1430 * @since 0.71 |
1412 * @deprecated 2.8 |
1431 * @deprecated 2.8.0 |
1413 * @deprecated Use the_author_meta('last_name') |
1432 * @deprecated Use the_author_meta('last_name') |
1414 * @see the_author_meta() |
1433 * @see the_author_meta() |
1415 */ |
1434 */ |
1416 function the_author_lastname() { |
1435 function the_author_lastname() { |
1417 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' ); |
1436 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'last_name\')' ); |
1419 } |
1438 } |
1420 |
1439 |
1421 /** |
1440 /** |
1422 * Retrieve the nickname of the author of the current post. |
1441 * Retrieve the nickname of the author of the current post. |
1423 * |
1442 * |
1424 * @since 1.5 |
1443 * @since 1.5.0 |
1425 * @deprecated 2.8 |
1444 * @deprecated 2.8.0 |
1426 * @deprecated Use get_the_author_meta('nickname') |
1445 * @deprecated Use get_the_author_meta('nickname') |
1427 * @see get_the_author_meta() |
1446 * @see get_the_author_meta() |
1428 * |
1447 * |
1429 * @return string The author's nickname. |
1448 * @return string The author's nickname. |
1430 */ |
1449 */ |
1435 |
1454 |
1436 /** |
1455 /** |
1437 * Display the nickname of the author of the current post. |
1456 * Display the nickname of the author of the current post. |
1438 * |
1457 * |
1439 * @since 0.71 |
1458 * @since 0.71 |
1440 * @deprecated 2.8 |
1459 * @deprecated 2.8.0 |
1441 * @deprecated Use the_author_meta('nickname') |
1460 * @deprecated Use the_author_meta('nickname') |
1442 * @see the_author_meta() |
1461 * @see the_author_meta() |
1443 */ |
1462 */ |
1444 function the_author_nickname() { |
1463 function the_author_nickname() { |
1445 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' ); |
1464 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'nickname\')' ); |
1447 } |
1466 } |
1448 |
1467 |
1449 /** |
1468 /** |
1450 * Retrieve the email of the author of the current post. |
1469 * Retrieve the email of the author of the current post. |
1451 * |
1470 * |
1452 * @since 1.5 |
1471 * @since 1.5.0 |
1453 * @deprecated 2.8 |
1472 * @deprecated 2.8.0 |
1454 * @deprecated Use get_the_author_meta('email') |
1473 * @deprecated Use get_the_author_meta('email') |
1455 * @see get_the_author_meta() |
1474 * @see get_the_author_meta() |
1456 * |
1475 * |
1457 * @return string The author's username. |
1476 * @return string The author's username. |
1458 */ |
1477 */ |
1463 |
1482 |
1464 /** |
1483 /** |
1465 * Display the email of the author of the current post. |
1484 * Display the email of the author of the current post. |
1466 * |
1485 * |
1467 * @since 0.71 |
1486 * @since 0.71 |
1468 * @deprecated 2.8 |
1487 * @deprecated 2.8.0 |
1469 * @deprecated Use the_author_meta('email') |
1488 * @deprecated Use the_author_meta('email') |
1470 * @see the_author_meta() |
1489 * @see the_author_meta() |
1471 */ |
1490 */ |
1472 function the_author_email() { |
1491 function the_author_email() { |
1473 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'email\')' ); |
1492 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'email\')' ); |
1475 } |
1494 } |
1476 |
1495 |
1477 /** |
1496 /** |
1478 * Retrieve the ICQ number of the author of the current post. |
1497 * Retrieve the ICQ number of the author of the current post. |
1479 * |
1498 * |
1480 * @since 1.5 |
1499 * @since 1.5.0 |
1481 * @deprecated 2.8 |
1500 * @deprecated 2.8.0 |
1482 * @deprecated Use get_the_author_meta('icq') |
1501 * @deprecated Use get_the_author_meta('icq') |
1483 * @see get_the_author_meta() |
1502 * @see get_the_author_meta() |
1484 * |
1503 * |
1485 * @return string The author's ICQ number. |
1504 * @return string The author's ICQ number. |
1486 */ |
1505 */ |
1491 |
1510 |
1492 /** |
1511 /** |
1493 * Display the ICQ number of the author of the current post. |
1512 * Display the ICQ number of the author of the current post. |
1494 * |
1513 * |
1495 * @since 0.71 |
1514 * @since 0.71 |
1496 * @deprecated 2.8 |
1515 * @deprecated 2.8.0 |
1497 * @deprecated Use the_author_meta('icq') |
1516 * @deprecated Use the_author_meta('icq') |
1498 * @see the_author_meta() |
1517 * @see the_author_meta() |
1499 */ |
1518 */ |
1500 function the_author_icq() { |
1519 function the_author_icq() { |
1501 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'icq\')' ); |
1520 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'icq\')' ); |
1503 } |
1522 } |
1504 |
1523 |
1505 /** |
1524 /** |
1506 * Retrieve the Yahoo! IM name of the author of the current post. |
1525 * Retrieve the Yahoo! IM name of the author of the current post. |
1507 * |
1526 * |
1508 * @since 1.5 |
1527 * @since 1.5.0 |
1509 * @deprecated 2.8 |
1528 * @deprecated 2.8.0 |
1510 * @deprecated Use get_the_author_meta('yim') |
1529 * @deprecated Use get_the_author_meta('yim') |
1511 * @see get_the_author_meta() |
1530 * @see get_the_author_meta() |
1512 * |
1531 * |
1513 * @return string The author's Yahoo! IM name. |
1532 * @return string The author's Yahoo! IM name. |
1514 */ |
1533 */ |
1519 |
1538 |
1520 /** |
1539 /** |
1521 * Display the Yahoo! IM name of the author of the current post. |
1540 * Display the Yahoo! IM name of the author of the current post. |
1522 * |
1541 * |
1523 * @since 0.71 |
1542 * @since 0.71 |
1524 * @deprecated 2.8 |
1543 * @deprecated 2.8.0 |
1525 * @deprecated Use the_author_meta('yim') |
1544 * @deprecated Use the_author_meta('yim') |
1526 * @see the_author_meta() |
1545 * @see the_author_meta() |
1527 */ |
1546 */ |
1528 function the_author_yim() { |
1547 function the_author_yim() { |
1529 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'yim\')' ); |
1548 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'yim\')' ); |
1531 } |
1550 } |
1532 |
1551 |
1533 /** |
1552 /** |
1534 * Retrieve the MSN address of the author of the current post. |
1553 * Retrieve the MSN address of the author of the current post. |
1535 * |
1554 * |
1536 * @since 1.5 |
1555 * @since 1.5.0 |
1537 * @deprecated 2.8 |
1556 * @deprecated 2.8.0 |
1538 * @deprecated Use get_the_author_meta('msn') |
1557 * @deprecated Use get_the_author_meta('msn') |
1539 * @see get_the_author_meta() |
1558 * @see get_the_author_meta() |
1540 * |
1559 * |
1541 * @return string The author's MSN address. |
1560 * @return string The author's MSN address. |
1542 */ |
1561 */ |
1547 |
1566 |
1548 /** |
1567 /** |
1549 * Display the MSN address of the author of the current post. |
1568 * Display the MSN address of the author of the current post. |
1550 * |
1569 * |
1551 * @since 0.71 |
1570 * @since 0.71 |
1552 * @deprecated 2.8 |
1571 * @deprecated 2.8.0 |
1553 * @deprecated Use the_author_meta('msn') |
1572 * @deprecated Use the_author_meta('msn') |
1554 * @see the_author_meta() |
1573 * @see the_author_meta() |
1555 */ |
1574 */ |
1556 function the_author_msn() { |
1575 function the_author_msn() { |
1557 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'msn\')' ); |
1576 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'msn\')' ); |
1559 } |
1578 } |
1560 |
1579 |
1561 /** |
1580 /** |
1562 * Retrieve the AIM address of the author of the current post. |
1581 * Retrieve the AIM address of the author of the current post. |
1563 * |
1582 * |
1564 * @since 1.5 |
1583 * @since 1.5.0 |
1565 * @deprecated 2.8 |
1584 * @deprecated 2.8.0 |
1566 * @deprecated Use get_the_author_meta('aim') |
1585 * @deprecated Use get_the_author_meta('aim') |
1567 * @see get_the_author_meta() |
1586 * @see get_the_author_meta() |
1568 * |
1587 * |
1569 * @return string The author's AIM address. |
1588 * @return string The author's AIM address. |
1570 */ |
1589 */ |
1576 /** |
1595 /** |
1577 * Display the AIM address of the author of the current post. |
1596 * Display the AIM address of the author of the current post. |
1578 * |
1597 * |
1579 * @since 0.71 |
1598 * @since 0.71 |
1580 * @see the_author_meta() |
1599 * @see the_author_meta() |
1581 * @deprecated 2.8 |
1600 * @deprecated 2.8.0 |
1582 * @deprecated Use the_author_meta('aim') |
1601 * @deprecated Use the_author_meta('aim') |
1583 */ |
1602 */ |
1584 function the_author_aim() { |
1603 function the_author_aim() { |
1585 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'aim\')' ); |
1604 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'aim\')' ); |
1586 the_author_meta('aim'); |
1605 the_author_meta('aim'); |
1588 |
1607 |
1589 /** |
1608 /** |
1590 * Retrieve the specified author's preferred display name. |
1609 * Retrieve the specified author's preferred display name. |
1591 * |
1610 * |
1592 * @since 1.0.0 |
1611 * @since 1.0.0 |
1593 * @deprecated 2.8 |
1612 * @deprecated 2.8.0 |
1594 * @deprecated Use get_the_author_meta('display_name') |
1613 * @deprecated Use get_the_author_meta('display_name') |
1595 * @see get_the_author_meta() |
1614 * @see get_the_author_meta() |
1596 * |
1615 * |
1597 * @param int $auth_id The ID of the author. |
1616 * @param int $auth_id The ID of the author. |
1598 * @return string The author's display name. |
1617 * @return string The author's display name. |
1603 } |
1622 } |
1604 |
1623 |
1605 /** |
1624 /** |
1606 * Retrieve the URL to the home page of the author of the current post. |
1625 * Retrieve the URL to the home page of the author of the current post. |
1607 * |
1626 * |
1608 * @since 1.5 |
1627 * @since 1.5.0 |
1609 * @deprecated 2.8 |
1628 * @deprecated 2.8.0 |
1610 * @deprecated Use get_the_author_meta('url') |
1629 * @deprecated Use get_the_author_meta('url') |
1611 * @see get_the_author_meta() |
1630 * @see get_the_author_meta() |
1612 * |
1631 * |
1613 * @return string The URL to the author's page. |
1632 * @return string The URL to the author's page. |
1614 */ |
1633 */ |
1619 |
1638 |
1620 /** |
1639 /** |
1621 * Display the URL to the home page of the author of the current post. |
1640 * Display the URL to the home page of the author of the current post. |
1622 * |
1641 * |
1623 * @since 0.71 |
1642 * @since 0.71 |
1624 * @deprecated 2.8 |
1643 * @deprecated 2.8.0 |
1625 * @deprecated Use the_author_meta('url') |
1644 * @deprecated Use the_author_meta('url') |
1626 * @see the_author_meta() |
1645 * @see the_author_meta() |
1627 */ |
1646 */ |
1628 function the_author_url() { |
1647 function the_author_url() { |
1629 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'url\')' ); |
1648 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'url\')' ); |
1631 } |
1650 } |
1632 |
1651 |
1633 /** |
1652 /** |
1634 * Retrieve the ID of the author of the current post. |
1653 * Retrieve the ID of the author of the current post. |
1635 * |
1654 * |
1636 * @since 1.5 |
1655 * @since 1.5.0 |
1637 * @deprecated 2.8 |
1656 * @deprecated 2.8.0 |
1638 * @deprecated Use get_the_author_meta('ID') |
1657 * @deprecated Use get_the_author_meta('ID') |
1639 * @see get_the_author_meta() |
1658 * @see get_the_author_meta() |
1640 * |
1659 * |
1641 * @return int The author's ID. |
1660 * @return string|int The author's ID. |
1642 */ |
1661 */ |
1643 function get_the_author_ID() { |
1662 function get_the_author_ID() { |
1644 _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' ); |
1663 _deprecated_function( __FUNCTION__, '2.8', 'get_the_author_meta(\'ID\')' ); |
1645 return get_the_author_meta('ID'); |
1664 return get_the_author_meta('ID'); |
1646 } |
1665 } |
1647 |
1666 |
1648 /** |
1667 /** |
1649 * Display the ID of the author of the current post. |
1668 * Display the ID of the author of the current post. |
1650 * |
1669 * |
1651 * @since 0.71 |
1670 * @since 0.71 |
1652 * @deprecated 2.8 |
1671 * @deprecated 2.8.0 |
1653 * @deprecated Use the_author_meta('ID') |
1672 * @deprecated Use the_author_meta('ID') |
1654 * @see the_author_meta() |
1673 * @see the_author_meta() |
1655 */ |
1674 */ |
1656 function the_author_ID() { |
1675 function the_author_ID() { |
1657 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'ID\')' ); |
1676 _deprecated_function( __FUNCTION__, '2.8', 'the_author_meta(\'ID\')' ); |
1673 * To restrict the amount of words of the content, you can use the cut |
1692 * To restrict the amount of words of the content, you can use the cut |
1674 * parameter. If the content is less than the amount, then there won't be any |
1693 * parameter. If the content is less than the amount, then there won't be any |
1675 * dots added to the end. If there is content left over, then dots will be added |
1694 * dots added to the end. If there is content left over, then dots will be added |
1676 * and the rest of the content will be removed. |
1695 * and the rest of the content will be removed. |
1677 * |
1696 * |
1678 * @package WordPress |
1697 * @since 0.71 |
1679 * @subpackage Feed |
|
1680 * @since 0.71 |
|
1681 * @uses apply_filters() Calls 'the_content_rss' on the content before processing. |
|
1682 * |
1698 * |
1683 * @deprecated 2.9.0 |
1699 * @deprecated 2.9.0 |
1684 * @deprecated Use the_content_feed() |
1700 * @deprecated Use the_content_feed() |
1685 * @see the_content_feed() |
1701 * @see the_content_feed() |
1686 * |
1702 * |
1687 * @param string $more_link_text Optional. Text to display when more content is available but not displayed. |
1703 * @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. |
1704 * @param int $stripteaser Optional. Default is 0. |
1689 * @param string $more_file Optional. |
1705 * @param string $more_file Optional. |
1690 * @param int $cut Optional. Amount of words to keep for the content. |
1706 * @param int $cut Optional. Amount of words to keep for the content. |
1691 * @param int $encode_html Optional. How to encode the content. |
1707 * @param int $encode_html Optional. How to encode the content. |
1692 */ |
1708 */ |
1693 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) { |
1709 function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) { |
1738 */ |
1754 */ |
1739 function make_url_footnote( $content ) { |
1755 function make_url_footnote( $content ) { |
1740 _deprecated_function( __FUNCTION__, '2.9', '' ); |
1756 _deprecated_function( __FUNCTION__, '2.9', '' ); |
1741 preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches ); |
1757 preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches ); |
1742 $links_summary = "\n"; |
1758 $links_summary = "\n"; |
1743 for ( $i=0; $i<count($matches[0]); $i++ ) { |
1759 for ( $i = 0, $c = count( $matches[0] ); $i < $c; $i++ ) { |
1744 $link_match = $matches[0][$i]; |
1760 $link_match = $matches[0][$i]; |
1745 $link_number = '['.($i+1).']'; |
1761 $link_number = '['.($i+1).']'; |
1746 $link_url = $matches[2][$i]; |
1762 $link_url = $matches[2][$i]; |
1747 $link_text = $matches[4][$i]; |
1763 $link_text = $matches[4][$i]; |
1748 $content = str_replace( $link_match, $link_text . ' ' . $link_number, $content ); |
1764 $content = str_replace( $link_match, $link_text . ' ' . $link_number, $content ); |
1783 |
1799 |
1784 /** |
1800 /** |
1785 * Translates $text like translate(), but assumes that the text |
1801 * Translates $text like translate(), but assumes that the text |
1786 * contains a context after its last vertical bar. |
1802 * contains a context after its last vertical bar. |
1787 * |
1803 * |
1788 * @since 2.5 |
1804 * @since 2.5.0 |
1789 * @uses translate() |
|
1790 * @deprecated 3.0.0 |
1805 * @deprecated 3.0.0 |
1791 * @deprecated Use _x() |
1806 * @deprecated Use _x() |
1792 * @see _x() |
1807 * @see _x() |
1793 * |
1808 * |
1794 * @param string $text Text to translate |
1809 * @param string $text Text to translate |
1832 } |
1847 } |
1833 |
1848 |
1834 /** |
1849 /** |
1835 * Register plural strings in POT file, but don't translate them. |
1850 * Register plural strings in POT file, but don't translate them. |
1836 * |
1851 * |
1837 * @since 2.5 |
1852 * @since 2.5.0 |
1838 * @deprecated 2.8.0 |
1853 * @deprecated 2.8.0 |
1839 * @deprecated Use _n_noop() |
1854 * @deprecated Use _n_noop() |
1840 * @see _n_noop() |
1855 * @see _n_noop() |
1841 */ |
1856 */ |
1842 function __ngettext_noop() { |
1857 function __ngettext_noop() { |
1914 |
1929 |
1915 if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) { |
1930 if ( !$fullsize && $src = wp_get_attachment_thumb_url( $post->ID ) ) { |
1916 // We have a thumbnail desired, specified and existing |
1931 // We have a thumbnail desired, specified and existing |
1917 |
1932 |
1918 $src_file = basename($src); |
1933 $src_file = basename($src); |
1919 $class = 'attachmentthumb'; |
|
1920 } elseif ( wp_attachment_is_image( $post->ID ) ) { |
1934 } elseif ( wp_attachment_is_image( $post->ID ) ) { |
1921 // We have an image without a thumbnail |
1935 // We have an image without a thumbnail |
1922 |
1936 |
1923 $src = wp_get_attachment_url( $post->ID ); |
1937 $src = wp_get_attachment_url( $post->ID ); |
1924 $src_file = & $file; |
1938 $src_file = & $file; |
1925 $class = 'attachmentimage'; |
|
1926 } elseif ( $src = wp_mime_type_icon( $post->ID ) ) { |
1939 } elseif ( $src = wp_mime_type_icon( $post->ID ) ) { |
1927 // No thumb, no image. We'll look for a mime-related icon instead. |
1940 // No thumb, no image. We'll look for a mime-related icon instead. |
1928 |
1941 |
1929 $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' ); |
1942 $icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' ); |
1930 $src_file = $icon_dir . '/' . basename($src); |
1943 $src_file = $icon_dir . '/' . basename($src); |
1945 * @see wp_get_attachment_image() |
1958 * @see wp_get_attachment_image() |
1946 * |
1959 * |
1947 * @param int $id Optional. Post ID. |
1960 * @param int $id Optional. Post ID. |
1948 * @param bool $fullsize Optional, default to false. Whether to have full size image. |
1961 * @param bool $fullsize Optional, default to false. Whether to have full size image. |
1949 * @param array $max_dims Optional. Dimensions of image. |
1962 * @param array $max_dims Optional. Dimensions of image. |
1950 * @return string HTML content. |
1963 * @return false|string HTML content. |
1951 */ |
1964 */ |
1952 function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { |
1965 function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { |
1953 _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' ); |
1966 _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' ); |
1954 $id = (int) $id; |
1967 $id = (int) $id; |
1955 if ( !$post = get_post($id) ) |
1968 if ( !$post = get_post($id) ) |
2002 * @see wp_get_attachment_image() |
2015 * @see wp_get_attachment_image() |
2003 * |
2016 * |
2004 * @param int $id Optional. Post ID. |
2017 * @param int $id Optional. Post ID. |
2005 * @param bool $fullsize Optional, default to false. Whether to have full size image. |
2018 * @param bool $fullsize Optional, default to false. Whether to have full size image. |
2006 * @param array $max_dims Optional. Dimensions of image. |
2019 * @param array $max_dims Optional. Dimensions of image. |
2007 * @return string |
2020 * @return false|string |
2008 */ |
2021 */ |
2009 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { |
2022 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { |
2010 _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' ); |
2023 _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' ); |
2011 $id = (int) $id; |
2024 $id = (int) $id; |
2012 if ( !$post = get_post($id) ) |
2025 if ( !$post = get_post($id) ) |
2146 * @see wp_register_sidebar_widget() |
2159 * @see wp_register_sidebar_widget() |
2147 * |
2160 * |
2148 * @param string|int $name Widget ID. |
2161 * @param string|int $name Widget ID. |
2149 * @param callback $output_callback Run when widget is called. |
2162 * @param callback $output_callback Run when widget is called. |
2150 * @param string $classname Classname widget option. |
2163 * @param string $classname Classname widget option. |
2151 * @param mixed $params,... Widget parameters. |
2164 * @param mixed $params ,... Widget parameters. |
2152 */ |
2165 */ |
2153 function register_sidebar_widget($name, $output_callback, $classname = '') { |
2166 function register_sidebar_widget($name, $output_callback, $classname = '') { |
2154 _deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' ); |
2167 _deprecated_function( __FUNCTION__, '2.8', 'wp_register_sidebar_widget()' ); |
2155 // Compat |
2168 // Compat |
2156 if ( is_array($name) ) { |
2169 if ( is_array($name) ) { |
2381 if ( $cur ) |
2394 if ( $cur ) |
2382 do_action( 'update_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); |
2395 do_action( 'update_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value ); |
2383 |
2396 |
2384 if ( !$cur ) |
2397 if ( !$cur ) |
2385 $wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') ); |
2398 $wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') ); |
2386 else if ( $cur->meta_value != $meta_value ) |
2399 elseif ( $cur->meta_value != $meta_value ) |
2387 $wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') ); |
2400 $wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') ); |
2388 else |
2401 else |
2389 return false; |
2402 return false; |
2390 |
2403 |
2391 clean_user_cache( $user_id ); |
2404 clean_user_cache( $user_id ); |
2405 * For setups that use the multi-blog feature. Can be used outside of the |
2418 * For setups that use the multi-blog feature. Can be used outside of the |
2406 * multi-blog feature. |
2419 * multi-blog feature. |
2407 * |
2420 * |
2408 * @since 2.2.0 |
2421 * @since 2.2.0 |
2409 * @deprecated 3.1.0 |
2422 * @deprecated 3.1.0 |
2410 * @uses $wpdb WordPress database object for queries |
2423 * |
2424 * @global wpdb $wpdb WordPress database abstraction object. |
|
2411 * @uses $blog_id The Blog id of the blog for those that use more than one blog |
2425 * @uses $blog_id The Blog id of the blog for those that use more than one blog |
2412 * |
2426 * |
2413 * @param int $id Blog ID. |
2427 * @param int $id Blog ID. |
2414 * @return array List of users that are part of that Blog ID |
2428 * @return array List of users that are part of that Blog ID |
2415 */ |
2429 */ |
2485 function funky_javascript_callback($matches) { |
2499 function funky_javascript_callback($matches) { |
2486 return "&#".base_convert($matches[1],16,10).";"; |
2500 return "&#".base_convert($matches[1],16,10).";"; |
2487 } |
2501 } |
2488 |
2502 |
2489 /** |
2503 /** |
2490 * Fixes javascript bugs in browsers. |
2504 * Fixes JavaScript bugs in browsers. |
2491 * |
2505 * |
2492 * Converts unicode characters to HTML numbered entities. |
2506 * Converts unicode characters to HTML numbered entities. |
2493 * |
2507 * |
2494 * @since 1.5.0 |
2508 * @since 1.5.0 |
2495 * @uses $is_macIE |
2509 * @uses $is_macIE |
2499 * @param string $text Text to be made safe. |
2513 * @param string $text Text to be made safe. |
2500 * @return string Fixed text. |
2514 * @return string Fixed text. |
2501 */ |
2515 */ |
2502 function funky_javascript_fix($text) { |
2516 function funky_javascript_fix($text) { |
2503 _deprecated_function( __FUNCTION__, '3.0' ); |
2517 _deprecated_function( __FUNCTION__, '3.0' ); |
2504 // Fixes for browsers' javascript bugs |
2518 // Fixes for browsers' JavaScript bugs. |
2505 global $is_macIE, $is_winIE; |
2519 global $is_macIE, $is_winIE; |
2506 |
2520 |
2507 if ( $is_winIE || $is_macIE ) |
2521 if ( $is_winIE || $is_macIE ) |
2508 $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", |
2522 $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", |
2509 "funky_javascript_callback", |
2523 "funky_javascript_callback", |
2616 */ |
2630 */ |
2617 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) { |
2631 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) { |
2618 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); |
2632 _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' ); |
2619 |
2633 |
2620 wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) ); |
2634 wp_editor( $content, $id, array( 'media_buttons' => $media_buttons ) ); |
2621 return; |
|
2622 } |
2635 } |
2623 |
2636 |
2624 /** |
2637 /** |
2625 * Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users |
2638 * Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users |
2626 * |
2639 * |
2668 _deprecated_function( __FUNCTION__, '3.3' ); |
2681 _deprecated_function( __FUNCTION__, '3.3' ); |
2669 |
2682 |
2670 if ( is_object($user) ) { |
2683 if ( is_object($user) ) { |
2671 if ( !isset($user->ID) ) |
2684 if ( !isset($user->ID) ) |
2672 $user->ID = 0; |
2685 $user->ID = 0; |
2673 if ( !is_a( $user, 'WP_User' ) ) { |
2686 if ( ! ( $user instanceof WP_User ) ) { |
2674 $vars = get_object_vars($user); |
2687 $vars = get_object_vars($user); |
2675 foreach ( array_keys($vars) as $field ) { |
2688 foreach ( array_keys($vars) as $field ) { |
2676 if ( is_string($user->$field) || is_numeric($user->$field) ) |
2689 if ( is_string($user->$field) || is_numeric($user->$field) ) |
2677 $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context); |
2690 $user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context); |
2678 } |
2691 } |
2969 } |
2982 } |
2970 |
2983 |
2971 /** |
2984 /** |
2972 * Accepts matches array from preg_replace_callback in wpautop() or a string. |
2985 * Accepts matches array from preg_replace_callback in wpautop() or a string. |
2973 * |
2986 * |
2974 * Ensures that the contents of a <<pre>>...<</pre>> HTML block are not |
2987 * Ensures that the contents of a `<pre>...</pre>` HTML block are not |
2975 * converted into paragraphs or line-breaks. |
2988 * converted into paragraphs or line-breaks. |
2976 * |
2989 * |
2977 * @since 1.2.0 |
2990 * @since 1.2.0 |
2978 * @deprecated 3.4.0 |
2991 * @deprecated 3.4.0 |
2979 * |
2992 * |
3025 * @since 3.1.0 |
3038 * @since 3.1.0 |
3026 * @deprecated 3.4.0 |
3039 * @deprecated 3.4.0 |
3027 * @deprecated Use remove_theme_support('custom-header') |
3040 * @deprecated Use remove_theme_support('custom-header') |
3028 * @see remove_theme_support() |
3041 * @see remove_theme_support() |
3029 * |
3042 * |
3030 * @return bool Whether support was removed. |
3043 * @return null|bool Whether support was removed. |
3031 */ |
3044 */ |
3032 function remove_custom_image_header() { |
3045 function remove_custom_image_header() { |
3033 _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' ); |
3046 _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-header\' )' ); |
3034 return remove_theme_support( 'custom-header' ); |
3047 return remove_theme_support( 'custom-header' ); |
3035 } |
3048 } |
3062 * Remove custom background support. |
3075 * Remove custom background support. |
3063 * |
3076 * |
3064 * @since 3.1.0 |
3077 * @since 3.1.0 |
3065 * @see add_custom_background() |
3078 * @see add_custom_background() |
3066 * |
3079 * |
3067 * @return bool Whether support was removed. |
3080 * @return null|bool Whether support was removed. |
3068 */ |
3081 */ |
3069 function remove_custom_background() { |
3082 function remove_custom_background() { |
3070 _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' ); |
3083 _deprecated_function( __FUNCTION__, '3.4', 'remove_theme_support( \'custom-background\' )' ); |
3071 return remove_theme_support( 'custom-background' ); |
3084 return remove_theme_support( 'custom-background' ); |
3072 } |
3085 } |
3131 * associated with 'all_page_ids' and 'get_pages'. |
3144 * associated with 'all_page_ids' and 'get_pages'. |
3132 * |
3145 * |
3133 * @since 2.0.0 |
3146 * @since 2.0.0 |
3134 * @deprecated 3.4.0 |
3147 * @deprecated 3.4.0 |
3135 * |
3148 * |
3136 * @uses do_action() Will call the 'clean_page_cache' hook action. |
|
3137 * |
|
3138 * @param int $id Page ID to clean |
3149 * @param int $id Page ID to clean |
3139 */ |
3150 */ |
3140 function clean_page_cache( $id ) { |
3151 function clean_page_cache( $id ) { |
3141 _deprecated_function( __FUNCTION__, '3.4', 'clean_post_cache()' ); |
3152 _deprecated_function( __FUNCTION__, '3.4', 'clean_post_cache()' ); |
3142 |
3153 |
3278 * @deprecated 3.5.0 |
3289 * @deprecated 3.5.0 |
3279 * @see get_post() |
3290 * @see get_post() |
3280 * |
3291 * |
3281 * @param int $postid Post ID. |
3292 * @param int $postid Post ID. |
3282 * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A. |
3293 * @param string $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A. |
3283 * @return object|array Post object or array holding post contents and information |
3294 * @return WP_Post|null Post object or array holding post contents and information |
3284 */ |
3295 */ |
3285 function wp_get_single_post( $postid = 0, $mode = OBJECT ) { |
3296 function wp_get_single_post( $postid = 0, $mode = OBJECT ) { |
3286 _deprecated_function( __FUNCTION__, '3.5', 'get_post()' ); |
3297 _deprecated_function( __FUNCTION__, '3.5', 'get_post()' ); |
3287 return get_post( $postid, $mode ); |
3298 return get_post( $postid, $mode ); |
3288 } |
3299 } |
3388 */ |
3399 */ |
3389 function _search_terms_tidy( $t ) { |
3400 function _search_terms_tidy( $t ) { |
3390 _deprecated_function( __FUNCTION__, '3.7' ); |
3401 _deprecated_function( __FUNCTION__, '3.7' ); |
3391 return trim( $t, "\"'\n\r " ); |
3402 return trim( $t, "\"'\n\r " ); |
3392 } |
3403 } |
3404 |
|
3405 /** |
|
3406 * Determine if TinyMCE is available. |
|
3407 * |
|
3408 * Checks to see if the user has deleted the tinymce files to slim down |
|
3409 * their WordPress install. |
|
3410 * |
|
3411 * @since 2.1.0 |
|
3412 * @deprecated 3.9.0 |
|
3413 * |
|
3414 * @return bool Whether TinyMCE exists. |
|
3415 */ |
|
3416 function rich_edit_exists() { |
|
3417 global $wp_rich_edit_exists; |
|
3418 _deprecated_function( __FUNCTION__, '3.9' ); |
|
3419 |
|
3420 if ( ! isset( $wp_rich_edit_exists ) ) |
|
3421 $wp_rich_edit_exists = file_exists( ABSPATH . WPINC . '/js/tinymce/tinymce.js' ); |
|
3422 |
|
3423 return $wp_rich_edit_exists; |
|
3424 } |
|
3425 |
|
3426 /** |
|
3427 * Old callback for tag link tooltips. |
|
3428 * |
|
3429 * @since 2.7.0 |
|
3430 * @deprecated 3.9.0 |
|
3431 * @access private |
|
3432 */ |
|
3433 function default_topic_count_text( $count ) { |
|
3434 return $count; |
|
3435 } |
|
3436 |
|
3437 /** |
|
3438 * Formerly used to escape strings before inserting into the DB. |
|
3439 * |
|
3440 * Has not performed this function for many, many years. Use wpdb::prepare() instead. |
|
3441 * |
|
3442 * @since 0.71 |
|
3443 * @deprecated 3.9.0 |
|
3444 * |
|
3445 * @param string $content The text to format. |
|
3446 * @return string The very same text. |
|
3447 */ |
|
3448 function format_to_post( $content ) { |
|
3449 _deprecated_function( __FUNCTION__, '3.9' ); |
|
3450 return $content; |
|
3451 } |
|
3452 |
|
3453 /** |
|
3454 * Formerly used to escape strings before searching the DB. It was poorly documented and never worked as described. |
|
3455 * |
|
3456 * @since 2.5.0 |
|
3457 * @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 * |
|
3477 * @param string $url The URL to test. |
|
3478 * @return bool Whether SSL access is available. |
|
3479 */ |
|
3480 function url_is_accessable_via_ssl( $url ) { |
|
3481 _deprecated_function( __FUNCTION__, '4.0' ); |
|
3482 |
|
3483 $response = wp_remote_get( set_url_scheme( $url, 'https' ) ); |
|
3484 |
|
3485 if ( !is_wp_error( $response ) ) { |
|
3486 $status = wp_remote_retrieve_response_code( $response ); |
|
3487 if ( 200 == $status || 401 == $status ) { |
|
3488 return true; |
|
3489 } |
|
3490 } |
|
3491 |
|
3492 return false; |
|
3493 } |