Make WordPress Core


Ignore:
Timestamp:
11/09/2019 12:57:27 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Consistently use do_action_deprecated() and apply_filters_deprecated() for deprecated hooks.

Props jrf.
See #48255.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r45932 r46684  
    379379                 * @param object $arg Optional arguments cast to an object.
    380380                 */
    381                 do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) );
     381                do_action_deprecated( 'add_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' );
    382382        } elseif ( 'link_category' == $taxonomy ) {
    383383                /**
     
    389389                 * @param object $arg Optional arguments cast to an object.
    390390                 */
    391                 do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) );
     391                do_action_deprecated( 'add_link_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' );
    392392        } else {
    393393                /**
     
    399399                 * @param string $taxonomy The taxonomy slug.
    400400                 */
    401                 do_action( 'add_tag_form_pre', $taxonomy );
     401                do_action_deprecated( 'add_tag_form_pre', array( $taxonomy ), '3.0.0', '{$taxonomy}_pre_add_form' );
    402402        }
    403403
     
    535535                 * @param object $arg Optional arguments cast to an object.
    536536                 */
    537                 do_action( 'edit_category_form', (object) array( 'parent' => 0 ) );
     537                do_action_deprecated( 'edit_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' );
    538538        } elseif ( 'link_category' == $taxonomy ) {
    539539                /**
     
    545545                 * @param object $arg Optional arguments cast to an object.
    546546                 */
    547                 do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) );
     547                do_action_deprecated( 'edit_link_category_form', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_add_form' );
    548548        } else {
    549549                /**
     
    555555                 * @param string $taxonomy The taxonomy slug.
    556556                 */
    557                 do_action( 'add_tag_form', $taxonomy );
     557                do_action_deprecated( 'add_tag_form', array( $taxonomy ), '3.0.0', '{$taxonomy}_add_form' );
    558558        }
    559559
Note: See TracChangeset for help on using the changeset viewer.