WordPress.org

Make WordPress Core

Changeset 48910


Ignore:
Timestamp:
08/31/2020 01:30:20 PM (7 weeks ago)
Author:
SergeyBiryukov
Message:

Docs: Add a @since note to the display_post_states filter to clarify that it is now also applied in the Customizer context.

If any admin functions are used within the filter, their existence should be checked with function_exists() before being used.

Follow-up to [47763], [48620].

Props audrasjb, garrett-eclipse, Howdy_McGee, dlh, khag7, SergeyBiryukov.
Fixes #51081.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template.php

    r48880 r48910  
    22242224     * @since 2.8.0
    22252225     * @since 3.6.0 Added the `$post` parameter.
     2226     * @since 5.5.0 Also applied in the Customizer context. If any admin functions
     2227     *              are used within the filter, their existence should be checked
     2228     *              with `function_exists()` before being used.
    22262229     *
    22272230     * @param string[] $post_states An array of post display states.
Note: See TracChangeset for help on using the changeset viewer.