Commit 1ea45950 authored by Jonathan Desrosiers's avatar Jonathan Desrosiers
Browse files

Docs: Add a `@since` note to the `display_post_states` filter to clarify that...

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.
Built from https://develop.svn.wordpress.org/branches/5.5@48915


git-svn-id: https://core.svn.wordpress.org/branches/5.5@48677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 6aa31766
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2214,6 +2214,9 @@ function get_post_states( $post ) {
	 *
	 * @since 2.8.0
	 * @since 3.6.0 Added the `$post` parameter.
	 * @since 5.5.0 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.
	 *
	 * @param string[] $post_states An array of post display states.
	 * @param WP_Post  $post        The current post object.
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
 *
 * @global string $wp_version
 */
$wp_version = '5.5.1-RC1-48914';
$wp_version = '5.5.1-RC1-48915';

/**
 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.