close
Skip to content

Commit 9e32afc

Browse files
committed
Posts, Post Types: Add post_states_string filter for HTML string of post states.
Developed in WordPress/wordpress-develop#10000 Props paulbonneau, mukesh27, westonruter, SirLouen, dmsnell, brandbrilliance, shsajalchowdhury, aialvi, ugyensupport. Fixes #51403. Built from https://develop.svn.wordpress.org/trunk@60986 git-svn-id: https://core.svn.wordpress.org/trunk@60322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 9fdc4c3 commit 9e32afc

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎wp-admin/includes/template.php‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,6 +2265,17 @@ function _post_states( $post, $display = true ) {
22652265
}
22662266
}
22672267

2268+
/**
2269+
* Filters the HTML string of post states.
2270+
*
2271+
* @since 6.9.0
2272+
*
2273+
* @param string $post_states_string The post states HTML string.
2274+
* @param string[] $post_states The post states.
2275+
* @param WP_Post $post The current post object.
2276+
*/
2277+
$post_states_string = apply_filters( 'post_states_string', $post_states_string, $post_states, $post );
2278+
22682279
if ( $display ) {
22692280
echo $post_states_string;
22702281
}

‎wp-includes/version.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.9-alpha-60985';
19+
$wp_version = '6.9-alpha-60986';
2020

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

0 commit comments

Comments
 (0)