wp-admin/includes/template.php:2250$postWP_Post$displaybooloptionaltruestringfunction _post_states( $post, $display = true ) { $post_states = get_post_states( $post ); $post_states_string = ''; if ( ! empty( $post_states ) ) { $state_count = count( $post_states ); $i = 0; $post_states_string .= ' — '; foreach ( $post_states as $state ) { ++$i; $separator = ( $i < $state_count ) ? ', ' : ''; $post_states_string .= "<span class='post-state'>{$state}{$separator}</span>"; } } if ( $display ) { echo $post_states_string; } return $post_states_string;}Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$display parameter and a return value.from the docblocksrc/wp-admin/includes/template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.