WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/09/2019 12:57:27 PM (2 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/includes/class-wp-screen.php

    r46591 r46684  
    797797         * @param WP_Screen $this            Current WP_Screen instance.
    798798         */
    799         self::$_old_compat_help = apply_filters( 'contextual_help_list', self::$_old_compat_help, $this );
     799        self::$_old_compat_help = apply_filters_deprecated(
     800            'contextual_help_list',
     801            array( self::$_old_compat_help, $this ),
     802            '3.3.0',
     803            'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()'
     804        );
    800805
    801806        $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : '';
     
    812817         * @param WP_Screen $this      Current WP_Screen instance.
    813818         */
    814         $old_help = apply_filters( 'contextual_help', $old_help, $this->id, $this );
     819        $old_help = apply_filters_deprecated(
     820            'contextual_help',
     821            array( $old_help, $this->id, $this ),
     822            '3.3.0',
     823            'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()'
     824        );
    815825
    816826        // Default help only if there is no old-style block of text and no new-style help tabs.
     
    826836             * @param string $old_help_default Default contextual help text.
    827837             */
    828             $default_help = apply_filters( 'default_contextual_help', '' );
     838            $default_help = apply_filters_deprecated(
     839                'default_contextual_help',
     840                array( '' ),
     841                '3.3.0',
     842                'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()'
     843            );
    829844            if ( $default_help ) {
    830845                $old_help = '<p>' . $default_help . '</p>';
Note: See TracChangeset for help on using the changeset viewer.