Make WordPress Core


Ignore:
Timestamp:
10/20/2025 07:04:44 PM (12 months ago)
Author:
westonruter
Message:

Posts, Post Types: Add post_states_string filter for HTML string of post states.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/10000

Props paulbonneau, mukesh27, westonruter, SirLouen, dmsnell, brandbrilliance, shsajalchowdhury, aialvi, ugyensupport.
Fixes #51403.

File:
1 edited

Legend:

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

    r60682 r60986  
    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;
Note: See TracChangeset for help on using the changeset viewer.