apply_filters_deprecated example


        $content = apply_filters( 'the_editor_content', $content$default_editor );

        // Remove the filter as the next editor on the same page may not need it.         if ( self::$this_tinymce ) {
            remove_filter( 'the_editor_content', 'format_for_editor' );
        }

        // Back-compat for the `htmledit_pre` and `richedit_pre` filters.         if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) {
            /** This filter is documented in wp-includes/deprecated.php */
            $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' );
        } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) {
            /** This filter is documented in wp-includes/deprecated.php */
            $content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' );
        }

        if ( false !== stripos( $content, 'textarea' ) ) {
            $content = preg_replace( '%</textarea%i', '&lt;/textarea', $content );
        }

        printf( $the_editor$content );
        echo "\n</div>\n\n";

        
/** * Filters the new site meta variables. * * Use the {@see 'add_signup_meta'} filter instead. * * @since MU (3.0.0) * @deprecated 3.0.0 Use the {@see 'add_signup_meta'} filter instead. * * @param array $blog_meta_defaults An array of default blog meta variables. */
    $meta_defaults = apply_filters_deprecated( 'signup_create_blog_meta', array( $blog_meta_defaults ), '3.0.0', 'add_signup_meta' );

    /** * Filters the new default site meta variables. * * @since 3.0.0 * * @param array $meta { * An array of default site meta variables. * * @type int $lang_id The language ID. * @type int $blog_public Whether search engines should be discouraged from indexing the site. 1 for true, 0 for false. * } */


        if ( has_filter( 'query_string' ) ) {  // Don't bother filtering and parsing if no plugins are hooked in.             /** * Filters the query string before parsing. * * @since 1.5.0 * @deprecated 2.1.0 Use {@see 'query_vars'} or {@see 'request'} filters instead. * * @param string $query_string The query string to modify. */
            $this->query_string = apply_filters_deprecated(
                'query_string',
                array( $this->query_string ),
                '2.1.0',
                'query_vars, request'
            );
            parse_str( $this->query_string, $this->query_vars );
        }
    }

    /** * Set up the WordPress Globals. * * The query_vars property will be extracted to the GLOBALS. So care should * be taken when naming global variables that might interfere with the * WordPress environment. * * @since 2.0.0 * * @global WP_Query $wp_query WordPress Query object. * @global string $query_string Query string for the loop. * @global array $posts The found posts. * @global WP_Post|null $post The current post, if available. * @global string $request The SQL statement for the request. * @global int $more Only set, if single page or post. * @global int $single If single page or post. Only set, if single page or post. * @global WP_User $authordata Only set, if author archive. */
$login_header_title = '';

    /** * Filters the title attribute of the header logo above login form. * * @since 2.1.0 * @deprecated 5.2.0 Use {@see 'login_headertext'} instead. * * @param string $login_header_title Login header logo title attribute. */
    $login_header_title = apply_filters_deprecated(
        'login_headertitle',
        array( $login_header_title ),
        '5.2.0',
        'login_headertext',
        __( 'Usage of the title attribute on the login logo is not recommended for accessibility reasons. Use the link text instead.' )
    );

    $login_header_text = empty( $login_header_title ) ? __( 'Powered by WordPress' ) : $login_header_title;

    /** * Filters the link text of the header logo above the login form. * * @since 5.2.0 * * @param string $login_header_text The login header logo link text. */

}

/** * Filters the allowed options list. * * @since 2.7.0 * @deprecated 5.5.0 Use {@see 'allowed_options'} instead. * * @param array $allowed_options The allowed options list. */
$allowed_options = apply_filters_deprecated(
    'whitelist_options',
    array( $allowed_options ),
    '5.5.0',
    'allowed_options',
    __( 'Please consider writing more inclusive code.' )
);

/** * Filters the allowed options list. * * @since 5.5.0 * * @param array $allowed_options The allowed options list. */


        /** * Filters the capability to read private posts for a custom post type * when generating SQL for getting posts by author. * * @since 2.2.0 * @deprecated 3.2.0 The hook transitioned from "somewhat useless" to "totally useless". * * @param string $cap Capability. */
        $cap = apply_filters_deprecated( 'pub_priv_sql_capability', array( '' ), '3.2.0' );

        if ( ! $cap ) {
            $cap = current_user_can( $post_type_obj->cap->read_private_posts );
        }

        // Only need to check the cap if $public_only is false.         $post_status_sql = "post_status = 'publish'";

        if ( false === $public_only ) {
            if ( $cap ) {
                // Does the user have the capability to view private posts? Guess so.

                    $allowed = apply_filters_deprecated(
                        "auth_{$object_type}_{$object_subtype}_meta_{$meta_key}",
                        array( $allowed$meta_key$object_id$user_id$cap$caps ),
                        '4.9.8',
                        "auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}"
                    );
                }

                if ( ! $allowed ) {
                    $caps[] = $cap;
                }
            }
            
restore_current_blog();
    }

    /** * Filters a blog's details. * * @since MU (3.0.0) * @deprecated 4.7.0 Use {@see 'site_details'} instead. * * @param WP_Site $details The blog details. */
    $details = apply_filters_deprecated( 'blog_details', array( $details ), '4.7.0', 'site_details' );

    wp_cache_set( $blog_id . $all$details, 'blog-details' );

    $key = md5( $details->domain . $details->path );
    wp_cache_set( $key$details, 'blog-lookup' );

    return $details;
}

/** * Clears the blog details cache. * * @since MU (3.0.0) * * @param int $blog_id Optional. Blog ID. Defaults to current blog. */
/** * Filters the legacy contextual help list. * * @since 2.7.0 * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or * {@see get_current_screen()->remove_help_tab()} instead. * * @param array $old_compat_help Old contextual help. * @param WP_Screen $screen Current WP_Screen instance. */
        self::$_old_compat_help = apply_filters_deprecated(
            'contextual_help_list',
            array( self::$_old_compat_help$this ),
            '3.3.0',
            'get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab()'
        );

        $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : '';

        /** * Filters the legacy contextual help text. * * @since 2.7.0 * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or * {@see get_current_screen()->remove_help_tab()} instead. * * @param string $old_help Help text that appears on the screen. * @param string $screen_id Screen ID. * @param WP_Screen $screen Current WP_Screen instance. */
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( '%1$s needs to be a %2$s object.' ), '$image', 'WP_Image_Editor' ) );

        /** * Filters the GD image resource to be streamed to the browser. * * @since 2.9.0 * @deprecated 3.5.0 Use {@see 'image_editor_save_pre'} instead. * * @param resource|GdImage $image Image resource to be streamed. * @param int $attachment_id The attachment post ID. */
        $image = apply_filters_deprecated( 'image_save_pre', array( $image$attachment_id ), '3.5.0', 'image_editor_save_pre' );

        switch ( $mime_type ) {
            case 'image/jpeg':
                header( 'Content-Type: image/jpeg' );
                return imagejpeg( $image, null, 90 );
            case 'image/png':
                header( 'Content-Type: image/png' );
                return imagepng( $image );
            case 'image/gif':
                header( 'Content-Type: image/gif' );
                return imagegif( $image );
            
/** * Filters the legacy (pre-3.5.0) media buttons. * * Use {@see 'media_buttons'} action instead. * * @since 2.5.0 * @deprecated 3.5.0 Use {@see 'media_buttons'} action instead. * * @param string $string Media buttons context. Default empty. */
    $legacy_filter = apply_filters_deprecated( 'media_buttons_context', array( '' ), '3.5.0', 'media_buttons' );

    if ( $legacy_filter ) {
        // #WP22559. Close <a> if a plugin started by closing <a> to open their own <a> tag.         if ( 0 === stripos( trim( $legacy_filter ), '</a>' ) ) {
            $legacy_filter .= '</a>';
        }
        echo $legacy_filter;
    }
}

/** * Retrieves the upload iframe source URL. * * @since 3.0.0 * * @global int $post_ID * * @param string $type Media type. * @param int $post_id Post ID. * @param string $tab Media upload tab. * @return string Upload iframe source URL. */


        /** * Filters whether the REST API is enabled. * * @since 4.4.0 * @deprecated 4.7.0 Use the {@see 'rest_authentication_errors'} filter to * restrict access to the REST API. * * @param bool $rest_enabled Whether the REST API is enabled. Default true. */
        apply_filters_deprecated(
            'rest_enabled',
            array( true ),
            '4.7.0',
            'rest_authentication_errors',
            sprintf(
                /* translators: %s: rest_authentication_errors */
                __( 'The REST API can no longer be completely disabled, the %s filter can be used to restrict access to the API, instead.' ),
                'rest_authentication_errors'
            )
        );

        
if ( 'post_tag' === $permastructname ) {

                /** * Filters rewrite rules used specifically for Tags. * * @since 2.3.0 * @deprecated 3.1.0 Use {@see 'post_tag_rewrite_rules'} instead. * * @param string[] $rules Array of rewrite rules generated for tags, keyed by their regex pattern. */
                $rules = apply_filters_deprecated( 'tag_rewrite_rules', array( $rules ), '3.1.0', 'post_tag_rewrite_rules' );
            }

            $this->extra_rules_top = array_merge( $this->extra_rules_top, $rules );
        }

        // Put them together.         if ( $this->use_verbose_page_rules ) {
            $this->rules = array_merge( $this->extra_rules_top, $robots_rewrite$favicon_rewrite$deprecated_files$registration_pages$root_rewrite$comments_rewrite$search_rewrite$author_rewrite$date_rewrite$page_rewrite$post_rewrite$this->extra_rules );
        } else {
            $this->rules = array_merge( $this->extra_rules_top, $robots_rewrite$favicon_rewrite$deprecated_files$registration_pages$root_rewrite$comments_rewrite$search_rewrite$author_rewrite$date_rewrite$post_rewrite$page_rewrite$this->extra_rules );
        }

        

        return apply_filters_deprecated(
            'wp_get_default_privacy_policy_content',
            array( $content$strings$description$blocks ),
            '5.7.0',
            'wp_add_privacy_policy_content()'
        );
    }

    /** * Adds the suggested privacy policy text to the policy postbox. * * @since 4.9.6 */
$post = $block_editor_context->post;

        /** * Filters the default array of categories for block types. * * @since 5.0.0 * @deprecated 5.8.0 Use the {@see 'block_categories_all'} filter instead. * * @param array[] $block_categories Array of categories for block types. * @param WP_Post $post Post being loaded. */
        $block_categories = apply_filters_deprecated( 'block_categories', array( $block_categories$post ), '5.8.0', 'block_categories_all' );
    }

    return $block_categories;
}

/** * Gets the list of allowed block types to use in the block editor. * * @since 5.8.0 * * @param WP_Block_Editor_Context $block_editor_context The current block editor context. * * @return bool|string[] Array of block type slugs, or boolean to enable/disable all. */
Home | Imprint | This part of the site doesn't use cookies.