From 798c2f7a1380f98cb0f8a2a6ee2d248e7ce9f10f Mon Sep 17 00:00:00 2001
From: jrfnl <github_nospam@adviesenzo.nl>
Date: Mon, 18 Jul 2016 00:22:30 +0200
Subject: [PATCH] Change over existing deprecated hooks to use the new
do_action_deprecated() or apply_filters_deprecated() functions.
---
src/wp-admin/edit-form-advanced.php | 4 ++--
src/wp-admin/edit-tag-form.php | 28 +++++++++++-----------
src/wp-admin/edit-tags.php | 24 +++++++++----------
src/wp-admin/includes/class-wp-screen.php | 18 +++++++-------
.../includes/class-wp-terms-list-table.php | 8 +++----
src/wp-admin/includes/image-edit.php | 12 +++++-----
src/wp-admin/includes/media.php | 2 +-
src/wp-includes/class-wp-rewrite.php | 8 +++----
src/wp-includes/class-wp.php | 4 ++--
src/wp-includes/deprecated.php | 4 ++--
src/wp-includes/post.php | 6 ++---
src/wp-includes/rss.php | 2 +-
src/wp-includes/taxonomy.php | 8 +++----
src/wp-includes/user.php | 4 ++--
src/wp-signup.php | 2 +-
15 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php
index bd229b9..f973fbd 100644
a
|
b
|
if ( post_type_supports($post_type, 'custom-fields') ) |
278 | 278 | * Fires in the middle of built-in meta box registration. |
279 | 279 | * |
280 | 280 | * @since 2.1.0 |
281 | | * @deprecated 3.7.0 Use 'add_meta_boxes' instead. |
| 281 | * @deprecated 3.7.0 Use {@see 'add_meta_boxes'} instead. |
282 | 282 | * |
283 | 283 | * @param WP_Post $post Post object. |
284 | 284 | */ |
285 | | do_action( 'dbx_post_advanced', $post ); |
| 285 | do_action_deprecated( 'dbx_post_advanced', array( $post ), '3.7.0', 'add_meta_boxes' ); |
286 | 286 | |
287 | 287 | // Allow the Discussion meta box to show up if the post type supports comments, |
288 | 288 | // or if comments or pings are open. |
diff --git a/src/wp-admin/edit-tag-form.php b/src/wp-admin/edit-tag-form.php
index 7d218dd..4720d03 100644
a
|
b
|
if ( 'category' == $taxonomy ) { |
17 | 17 | * Fires before the Edit Category form. |
18 | 18 | * |
19 | 19 | * @since 2.1.0 |
20 | | * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. |
| 20 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. |
21 | 21 | * |
22 | 22 | * @param object $tag Current category term object. |
23 | 23 | */ |
24 | | do_action( 'edit_category_form_pre', $tag ); |
| 24 | do_action_deprecated( 'edit_category_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' ); |
25 | 25 | } elseif ( 'link_category' == $taxonomy ) { |
26 | 26 | /** |
27 | 27 | * Fires before the Edit Link Category form. |
28 | 28 | * |
29 | 29 | * @since 2.3.0 |
30 | | * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. |
| 30 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. |
31 | 31 | * |
32 | 32 | * @param object $tag Current link category term object. |
33 | 33 | */ |
34 | | do_action( 'edit_link_category_form_pre', $tag ); |
| 34 | do_action_deprecated( 'edit_link_category_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' ); |
35 | 35 | } else { |
36 | 36 | /** |
37 | 37 | * Fires before the Edit Tag form. |
38 | 38 | * |
39 | 39 | * @since 2.5.0 |
40 | | * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. |
| 40 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. |
41 | 41 | * |
42 | 42 | * @param object $tag Current tag term object. |
43 | 43 | */ |
44 | | do_action( 'edit_tag_form_pre', $tag ); |
| 44 | do_action_deprecated( 'edit_tag_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' ); |
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
… |
… |
do_action( "{$taxonomy}_term_edit_form_top", $tag, $taxonomy ); |
189 | 189 | * Fires after the Edit Category form fields are displayed. |
190 | 190 | * |
191 | 191 | * @since 2.9.0 |
192 | | * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. |
| 192 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead. |
193 | 193 | * |
194 | 194 | * @param object $tag Current category term object. |
195 | 195 | */ |
196 | | do_action( 'edit_category_form_fields', $tag ); |
| 196 | do_action_deprecated( 'edit_category_form_fields', array( $tag ), '3.0.0', '{$taxonomy}_edit_form_fields' ); |
197 | 197 | } elseif ( 'link_category' == $taxonomy ) { |
198 | 198 | /** |
199 | 199 | * Fires after the Edit Link Category form fields are displayed. |
200 | 200 | * |
201 | 201 | * @since 2.9.0 |
202 | | * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. |
| 202 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead. |
203 | 203 | * |
204 | 204 | * @param object $tag Current link category term object. |
205 | 205 | */ |
206 | | do_action( 'edit_link_category_form_fields', $tag ); |
| 206 | do_action_deprecated( 'edit_link_category_form_fields', array( $tag ), '3.0.0', '{$taxonomy}_edit_form_fields' ); |
207 | 207 | } else { |
208 | 208 | /** |
209 | 209 | * Fires after the Edit Tag form fields are displayed. |
210 | 210 | * |
211 | 211 | * @since 2.9.0 |
212 | | * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. |
| 212 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead. |
213 | 213 | * |
214 | 214 | * @param object $tag Current tag term object. |
215 | 215 | */ |
216 | | do_action( 'edit_tag_form_fields', $tag ); |
| 216 | do_action_deprecated( 'edit_tag_form_fields', array( $tag ), '3.0.0', '{$taxonomy}_edit_form_fields' ); |
217 | 217 | } |
218 | 218 | /** |
219 | 219 | * Fires after the Edit Term form fields are displayed. |
… |
… |
if ( 'category' == $taxonomy ) { |
242 | 242 | * Fires at the end of the Edit Term form. |
243 | 243 | * |
244 | 244 | * @since 2.5.0 |
245 | | * @deprecated 3.0.0 Use {$taxonomy}_edit_form instead. |
| 245 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form'} instead. |
246 | 246 | * |
247 | 247 | * @param object $tag Current taxonomy term object. |
248 | 248 | */ |
249 | | do_action( 'edit_tag_form', $tag ); |
| 249 | do_action_deprecated( 'edit_tag_form', array( $tag ), '3.0.0', '{$taxonomy}_edit_form' ); |
250 | 250 | } |
251 | 251 | /** |
252 | 252 | * Fires at the end of the Edit Term form for all taxonomies. |
diff --git a/src/wp-admin/edit-tags.php b/src/wp-admin/edit-tags.php
index dbb1f48..20d8a04 100644
a
|
b
|
if ( current_user_can($tax->cap->edit_terms) ) { |
351 | 351 | * Fires before the Add Category form. |
352 | 352 | * |
353 | 353 | * @since 2.1.0 |
354 | | * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. |
| 354 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. |
355 | 355 | * |
356 | 356 | * @param object $arg Optional arguments cast to an object. |
357 | 357 | */ |
358 | | do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) ); |
| 358 | do_action_deprecated( 'add_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' ); |
359 | 359 | } elseif ( 'link_category' == $taxonomy ) { |
360 | 360 | /** |
361 | 361 | * Fires before the link category form. |
362 | 362 | * |
363 | 363 | * @since 2.3.0 |
364 | | * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. |
| 364 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. |
365 | 365 | * |
366 | 366 | * @param object $arg Optional arguments cast to an object. |
367 | 367 | */ |
368 | | do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) ); |
| 368 | do_action_deprecated( 'add_link_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' ); |
369 | 369 | } else { |
370 | 370 | /** |
371 | 371 | * Fires before the Add Tag form. |
372 | 372 | * |
373 | 373 | * @since 2.5.0 |
374 | | * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. |
| 374 | * @deprecated 3.0.0 {@see '{$taxonomy}_pre_add_form'} instead. |
375 | 375 | * |
376 | 376 | * @param string $taxonomy The taxonomy slug. |
377 | 377 | */ |
378 | | do_action( 'add_tag_form_pre', $taxonomy ); |
| 378 | do_action_deprecated( 'add_tag_form_pre', array( $taxonomy ), '3.0.0', '{$taxonomy}_pre_add_form' ); |
379 | 379 | } |
380 | 380 | |
381 | 381 | /** |
… |
… |
if ( 'category' == $taxonomy ) { |
501 | 501 | * Fires at the end of the Edit Category form. |
502 | 502 | * |
503 | 503 | * @since 2.1.0 |
504 | | * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. |
| 504 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead. |
505 | 505 | * |
506 | 506 | * @param object $arg Optional arguments cast to an object. |
507 | 507 | */ |
508 | | do_action( 'edit_category_form', (object) array( 'parent' => 0 ) ); |
| 508 | do_action_deprecated( 'edit_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' ); |
509 | 509 | } elseif ( 'link_category' == $taxonomy ) { |
510 | 510 | /** |
511 | 511 | * Fires at the end of the Edit Link form. |
512 | 512 | * |
513 | 513 | * @since 2.3.0 |
514 | | * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. |
| 514 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead. |
515 | 515 | * |
516 | 516 | * @param object $arg Optional arguments cast to an object. |
517 | 517 | */ |
518 | | do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) ); |
| 518 | do_action_deprecated( 'edit_link_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' ); |
519 | 519 | } else { |
520 | 520 | /** |
521 | 521 | * Fires at the end of the Add Tag form. |
522 | 522 | * |
523 | 523 | * @since 2.7.0 |
524 | | * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. |
| 524 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead. |
525 | 525 | * |
526 | 526 | * @param string $taxonomy The taxonomy slug. |
527 | 527 | */ |
528 | | do_action( 'add_tag_form', $taxonomy ); |
| 528 | do_action_deprecated( 'add_tag_form', array( $taxonomy ), '3.0.0', '{$taxonomy}_add_form' ); |
529 | 529 | } |
530 | 530 | |
531 | 531 | /** |
diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php
index a7d9a1a..89fd280 100644
a
|
b
|
final class WP_Screen { |
732 | 732 | * Filters the legacy contextual help list. |
733 | 733 | * |
734 | 734 | * @since 2.7.0 |
735 | | * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or |
736 | | * get_current_screen()->remove_help_tab() instead. |
| 735 | * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or |
| 736 | * {@see get_current_screen()->remove_help_tab()} instead. |
737 | 737 | * |
738 | 738 | * @param array $old_compat_help Old contextual help. |
739 | 739 | * @param WP_Screen $this Current WP_Screen instance. |
740 | 740 | */ |
741 | | self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this ); |
| 741 | self::$_old_compat_help = apply_filters_deprecated( 'contextual_help_list', array( self::$_old_compat_help, $this ), '3.3.0', false, __( 'Use get_current_screen()->add_help_tab() or get_current_screen()->remove_help_tab() instead.' ) ); |
742 | 742 | |
743 | 743 | $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : ''; |
744 | 744 | |
… |
… |
final class WP_Screen { |
746 | 746 | * Filters the legacy contextual help text. |
747 | 747 | * |
748 | 748 | * @since 2.7.0 |
749 | | * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or |
750 | | * get_current_screen()->remove_help_tab() instead. |
| 749 | * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or |
| 750 | * {@see get_current_screen()->remove_help_tab()} instead. |
751 | 751 | * |
752 | 752 | * @param string $old_help Help text that appears on the screen. |
753 | 753 | * @param string $screen_id Screen ID. |
754 | 754 | * @param WP_Screen $this Current WP_Screen instance. |
755 | 755 | * |
756 | 756 | */ |
757 | | $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this ); |
| 757 | $old_help = apply_filters_deprecated( 'contextual_help', array( $old_help, $this->id, $this ), '3.3.0', false, __( 'Use get_current_screen()->add_help_tab() or get_current_screen()->remove_help_tab() instead.' ) ); |
758 | 758 | |
759 | 759 | // Default help only if there is no old-style block of text and no new-style help tabs. |
760 | 760 | if ( empty( $old_help ) && ! $this->get_help_tabs() ) { |
… |
… |
final class WP_Screen { |
763 | 763 | * Filters the default legacy contextual help text. |
764 | 764 | * |
765 | 765 | * @since 2.8.0 |
766 | | * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or |
767 | | * get_current_screen()->remove_help_tab() instead. |
| 766 | * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or |
| 767 | * {@see get_current_screen()->remove_help_tab()} instead. |
768 | 768 | * |
769 | 769 | * @param string $old_help_default Default contextual help text. |
770 | 770 | */ |
771 | | $default_help = apply_filters( 'default_contextual_help', '' ); |
| 771 | $default_help = apply_filters_deprecated( 'default_contextual_help', array( '' ), '3.3.0', false, __( 'Use get_current_screen()->add_help_tab() or get_current_screen()->remove_help_tab() instead.' ) ); |
772 | 772 | if ( $default_help ) |
773 | 773 | $old_help = '<p>' . $default_help . '</p>'; |
774 | 774 | } |
diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php
index e765794..1b398eb 100644
a
|
b
|
class WP_Terms_List_Table extends WP_List_Table { |
91 | 91 | * Filters the number of terms displayed per page for the Tags list table. |
92 | 92 | * |
93 | 93 | * @since 2.7.0 |
94 | | * @deprecated 2.8.0 Use edit_tags_per_page instead. |
| 94 | * @deprecated 2.8.0 Use {@see 'edit_tags_per_page'} instead. |
95 | 95 | * |
96 | 96 | * @param int $tags_per_page Number of tags to be displayed. Default 20. |
97 | 97 | */ |
98 | | $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); |
| 98 | $tags_per_page = apply_filters_deprecated( 'tagsperpage', array( $tags_per_page ), '2.8.0', 'edit_tags_per_page' ); |
99 | 99 | } elseif ( 'category' === $this->screen->taxonomy ) { |
100 | 100 | /** |
101 | 101 | * Filters the number of terms displayed per page for the Categories list table. |
… |
… |
class WP_Terms_List_Table extends WP_List_Table { |
472 | 472 | * Filters the action links displayed for each term in the Tags list table. |
473 | 473 | * |
474 | 474 | * @since 2.8.0 |
475 | | * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. |
| 475 | * @deprecated 3.0.0 Use {@see '{$taxonomy}_row_actions'} instead. |
476 | 476 | * |
477 | 477 | * @param array $actions An array of action links to be displayed. Default |
478 | 478 | * 'Edit', 'Quick Edit', 'Delete', and 'View'. |
479 | 479 | * @param object $tag Term object. |
480 | 480 | */ |
481 | | $actions = apply_filters( 'tag_row_actions', $actions, $tag ); |
| 481 | $actions = apply_filters_deprecated( 'tag_row_actions', array( $actions, $tag ), '3.0.0', '{$taxonomy}_row_actions' ); |
482 | 482 | |
483 | 483 | /** |
484 | 484 | * Filters the action links displayed for each term in the terms list table. |
diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php
index c614a77..de9004a 100644
a
|
b
|
function wp_stream_image( $image, $mime_type, $post_id ) { |
262 | 262 | * Filters the GD image resource to be streamed to the browser. |
263 | 263 | * |
264 | 264 | * @since 2.9.0 |
265 | | * @deprecated 3.5.0 Use image_editor_save_pre instead. |
| 265 | * @deprecated 3.5.0 Use {@see 'image_editor_save_pre'} instead. |
266 | 266 | * |
267 | 267 | * @param resource $image Image resource to be streamed. |
268 | 268 | * @param int $post_id Post ID. |
269 | 269 | */ |
270 | | $image = apply_filters( 'image_save_pre', $image, $post_id ); |
| 270 | $image = apply_filters_deprecated( 'image_save_pre', array( $image, $post_id ), '3.5.0', 'image_editor_save_pre' ); |
271 | 271 | |
272 | 272 | switch ( $mime_type ) { |
273 | 273 | case 'image/jpeg': |
… |
… |
function wp_save_image_file( $filename, $image, $mime_type, $post_id ) { |
333 | 333 | * returning that value instead. |
334 | 334 | * |
335 | 335 | * @since 2.9.0 |
336 | | * @deprecated 3.5.0 Use wp_save_image_editor_file instead. |
| 336 | * @deprecated 3.5.0 Use {@see 'wp_save_image_editor_file'} instead. |
337 | 337 | * |
338 | 338 | * @param mixed $override Value to return instead of saving. Default null. |
339 | 339 | * @param string $filename Name of the file to be saved. |
… |
… |
function wp_save_image_file( $filename, $image, $mime_type, $post_id ) { |
341 | 341 | * @param string $mime_type Image mime type. |
342 | 342 | * @param int $post_id Post ID. |
343 | 343 | */ |
344 | | $saved = apply_filters( 'wp_save_image_file', null, $filename, $image, $mime_type, $post_id ); |
| 344 | $saved = apply_filters_deprecated( 'wp_save_image_file', array( null, $filename, $image, $mime_type, $post_id ), '3.5.0', 'wp_save_image_editor_file' ); |
345 | 345 | |
346 | 346 | if ( null !== $saved ) |
347 | 347 | return $saved; |
… |
… |
function image_edit_apply_changes( $image, $changes ) { |
528 | 528 | * Filters the GD image resource before applying changes to the image. |
529 | 529 | * |
530 | 530 | * @since 2.9.0 |
531 | | * @deprecated 3.5.0 Use wp_image_editor_before_change instead. |
| 531 | * @deprecated 3.5.0 Use {@see 'wp_image_editor_before_change'} instead. |
532 | 532 | * |
533 | 533 | * @param resource $image GD image resource. |
534 | 534 | * @param array $changes Array of change operations. |
535 | 535 | */ |
536 | | $image = apply_filters( 'image_edit_before_change', $image, $changes ); |
| 536 | $image = apply_filters_deprecated( 'image_edit_before_change', array( $image, $changes ), '3.5.0', 'wp_image_editor_before_change' ); |
537 | 537 | } |
538 | 538 | |
539 | 539 | foreach ( $changes as $operation ) { |
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index 8b95181..a3eced7 100644
a
|
b
|
function media_buttons($editor_id = 'content') { |
577 | 577 | * |
578 | 578 | * @param string $string Media buttons context. Default empty. |
579 | 579 | */ |
580 | | $legacy_filter = apply_filters( 'media_buttons_context', '' ); |
| 580 | $legacy_filter = apply_filters_deprecated( 'media_buttons_context', array( '' ), '3.5.0', false, __( 'Use \'media_buttons\' action instead.' ) ); |
581 | 581 | |
582 | 582 | if ( $legacy_filter ) { |
583 | 583 | // #WP22559. Close <a> if a plugin started by closing <a> to open their own <a> tag. |
diff --git a/src/wp-includes/class-wp-rewrite.php b/src/wp-includes/class-wp-rewrite.php
index 2c57615..4842236 100644
a
|
b
|
class WP_Rewrite { |
1420 | 1420 | * Filters rewrite rules used specifically for Tags. |
1421 | 1421 | * |
1422 | 1422 | * @since 2.3.0 |
1423 | | * @deprecated 3.1.0 Use 'post_tag_rewrite_rules' instead |
| 1423 | * @deprecated 3.1.0 Use {@see 'post_tag_rewrite_rules'} instead |
1424 | 1424 | * |
1425 | 1425 | * @param array $rules The rewrite rules generated for tags. |
1426 | 1426 | */ |
1427 | | $rules = apply_filters( 'tag_rewrite_rules', $rules ); |
| 1427 | $rules = apply_filters_deprecated( 'tag_rewrite_rules', array( $rules ), '3.1.0', 'post_tag_rewrite_rules' ); |
1428 | 1428 | } |
1429 | 1429 | |
1430 | 1430 | $this->extra_rules_top = array_merge($this->extra_rules_top, $rules); |
… |
… |
class WP_Rewrite { |
1562 | 1562 | * Filters the list of rewrite rules formatted for output to an .htaccess file. |
1563 | 1563 | * |
1564 | 1564 | * @since 1.5.0 |
1565 | | * @deprecated 1.5.0 Use the mod_rewrite_rules filter instead. |
| 1565 | * @deprecated 1.5.0 Use the {@see 'mod_rewrite_rules'} filter instead. |
1566 | 1566 | * |
1567 | 1567 | * @param string $rules mod_rewrite Rewrite rules formatted for .htaccess. |
1568 | 1568 | */ |
1569 | | return apply_filters( 'rewrite_rules', $rules ); |
| 1569 | return apply_filters_deprecated( 'rewrite_rules', array( $rules ), '1.5.0', 'mod_rewrite_rules' ); |
1570 | 1570 | } |
1571 | 1571 | |
1572 | 1572 | /** |
diff --git a/src/wp-includes/class-wp.php b/src/wp-includes/class-wp.php
index 4a97183..b136c34 100644
a
|
b
|
class WP { |
535 | 535 | * Filters the query string before parsing. |
536 | 536 | * |
537 | 537 | * @since 1.5.0 |
538 | | * @deprecated 2.1.0 Use 'query_vars' or 'request' filters instead. |
| 538 | * @deprecated 2.1.0 Use {@see 'query_vars'} or {@see 'request'} filters instead. |
539 | 539 | * |
540 | 540 | * @param string $query_string The query string to modify. |
541 | 541 | */ |
542 | | $this->query_string = apply_filters( 'query_string', $this->query_string ); |
| 542 | $this->query_string = apply_filters_deprecated( 'query_string', array( $this->query_string ), '2.1.0', false, __( 'Use \'query_vars\' or \'request\' filters instead.' ) ); |
543 | 543 | parse_str($this->query_string, $this->query_vars); |
544 | 544 | } |
545 | 545 | } |
diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
index 0d30113..9014191 100644
a
|
b
|
function wp_richedit_pre($text) { |
3553 | 3553 | * |
3554 | 3554 | * @param string $output Text for the rich text editor. |
3555 | 3555 | */ |
3556 | | return apply_filters( 'richedit_pre', '' ); |
| 3556 | return apply_filters_deprecated( 'richedit_pre', array( '' ), '4.3.0' ); |
3557 | 3557 | } |
3558 | 3558 | |
3559 | 3559 | $output = convert_chars($text); |
… |
… |
function wp_htmledit_pre($output) { |
3591 | 3591 | * |
3592 | 3592 | * @param string $output The HTML-formatted text. |
3593 | 3593 | */ |
3594 | | return apply_filters( 'htmledit_pre', $output ); |
| 3594 | return apply_filters_deprecated( 'htmledit_pre', array( $output ), '4.3.0' ); |
3595 | 3595 | } |
3596 | 3596 | |
3597 | 3597 | /** |
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index b6c2fae..55a7fe5 100644
a
|
b
|
function get_posts_by_author_sql( $post_type, $full = true, $post_author = null, |
5331 | 5331 | * |
5332 | 5332 | * @param string $cap Capability. |
5333 | 5333 | */ |
5334 | | if ( ! $cap = apply_filters( 'pub_priv_sql_capability', '' ) ) { |
| 5334 | if ( ! $cap = apply_filters_deprecated( 'pub_priv_sql_capability', array( '' ), '3.2.0', false, __( 'The hook transitioned from "somewhat useless" to "totally useless".' ) ) ) { |
5335 | 5335 | $cap = current_user_can( $post_type_obj->cap->read_private_posts ); |
5336 | 5336 | } |
5337 | 5337 | |
… |
… |
function _transition_post_status( $new_status, $old_status, $post ) { |
5720 | 5720 | * Fires when a post's status is transitioned from private to published. |
5721 | 5721 | * |
5722 | 5722 | * @since 1.5.0 |
5723 | | * @deprecated 2.3.0 Use 'private_to_publish' instead. |
| 5723 | * @deprecated 2.3.0 Use {@see 'private_to_publish'} instead. |
5724 | 5724 | * |
5725 | 5725 | * @param int $post_id Post ID. |
5726 | 5726 | */ |
5727 | | do_action('private_to_published', $post->ID); |
| 5727 | do_action_deprecated( 'private_to_published', array( $post->ID ), '2.3.0', 'private_to_publish' ); |
5728 | 5728 | } |
5729 | 5729 | |
5730 | 5730 | // If published posts changed clear the lastpostmodified cache. |
diff --git a/src/wp-includes/rss.php b/src/wp-includes/rss.php
index 4c3fb15..593799a 100644
a
|
b
|
_deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/class-simplepie.php' |
24 | 24 | * @since 2.3.0 |
25 | 25 | * @deprecated 3.0.0 |
26 | 26 | */ |
27 | | do_action( 'load_feed_engine' ); |
| 27 | do_action_deprecated( 'load_feed_engine', array(), '3.0.0' ); |
28 | 28 | |
29 | 29 | /** RSS feed constant. */ |
30 | 30 | define('RSS', 'RSS'); |
diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
index 0aa97ec..adf5f6a 100644
a
|
b
|
function get_term_link( $term, $taxonomy = '' ) { |
4109 | 4109 | * Filters the tag link. |
4110 | 4110 | * |
4111 | 4111 | * @since 2.3.0 |
4112 | | * @deprecated 2.5.0 Use 'term_link' instead. |
| 4112 | * @deprecated 2.5.0 Use {@see 'term_link'} instead. |
4113 | 4113 | * |
4114 | 4114 | * @param string $termlink Tag link URL. |
4115 | 4115 | * @param int $term_id Term ID. |
4116 | 4116 | */ |
4117 | | $termlink = apply_filters( 'tag_link', $termlink, $term->term_id ); |
| 4117 | $termlink = apply_filters_deprecated( 'tag_link', array( $termlink, $term->term_id ), '2.5.0', 'term_link' ); |
4118 | 4118 | } elseif ( 'category' == $taxonomy ) { |
4119 | 4119 | |
4120 | 4120 | /** |
4121 | 4121 | * Filters the category link. |
4122 | 4122 | * |
4123 | 4123 | * @since 1.5.0 |
4124 | | * @deprecated 2.5.0 Use 'term_link' instead. |
| 4124 | * @deprecated 2.5.0 Use {@see 'term_link'} instead. |
4125 | 4125 | * |
4126 | 4126 | * @param string $termlink Category link URL. |
4127 | 4127 | * @param int $term_id Term ID. |
4128 | 4128 | */ |
4129 | | $termlink = apply_filters( 'category_link', $termlink, $term->term_id ); |
| 4129 | $termlink = apply_filters_deprecated( 'category_link', array( $termlink, $term->term_id ), '2.5.0', 'term_link' ); |
4130 | 4130 | } |
4131 | 4131 | |
4132 | 4132 | /** |
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index e47ffd6..df3bd4f 100644
a
|
b
|
function get_password_reset_key( $user ) { |
2044 | 2044 | * Use the {@see 'retrieve_password'} hook instead. |
2045 | 2045 | * |
2046 | 2046 | * @since 1.5.0 |
2047 | | * @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead. |
| 2047 | * @deprecated 1.5.1 Misspelled. Use {@see 'retrieve_password'} hook instead. |
2048 | 2048 | * |
2049 | 2049 | * @param string $user_login The user login name. |
2050 | 2050 | */ |
2051 | | do_action( 'retreive_password', $user->user_login ); |
| 2051 | do_action_deprecated( 'retreive_password', array( $user->user_login ), '1.5.1', 'retrieve_password' ); |
2052 | 2052 | |
2053 | 2053 | /** |
2054 | 2054 | * Fires before a new password is retrieved. |
diff --git a/src/wp-signup.php b/src/wp-signup.php
index 99bd2af..42e5d49 100644
a
|
b
|
function validate_another_blog_signup() { |
406 | 406 | * |
407 | 407 | * @param array $blog_meta_defaults An array of default blog meta variables. |
408 | 408 | */ |
409 | | $meta_defaults = apply_filters( 'signup_create_blog_meta', $blog_meta_defaults ); |
| 409 | $meta_defaults = apply_filters_deprecated( 'signup_create_blog_meta', array( $blog_meta_defaults ), '3.0.0', 'add_signup_meta' ); |
410 | 410 | |
411 | 411 | /** |
412 | 412 | * Filters the new default site meta variables. |