WordPress.org

Make WordPress Core

Changeset 48915


Ignore:
Timestamp:
08/31/2020 05:55:24 PM (3 months ago)
Author:
desrosj
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.
Merges [48910] to the 5.5 branch.
Fixes #51081.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-admin/includes/template.php

    r48882 r48915  
    22152215     * @since 2.8.0
    22162216     * @since 3.6.0 Added the `$post` parameter.
     2217     * @since 5.5.0 Also applied in the Customizer context. If any admin functions
     2218     *              are used within the filter, their existence should be checked
     2219     *              with `function_exists()` before being used.
    22172220     *
    22182221     * @param string[] $post_states An array of post display states.
Note: See TracChangeset for help on using the changeset viewer.