Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_post_status_object [ WordPress Function ]

get_post_status_object ( $post_status )
Parameters:
  • (string) $post_status The name of a registered post status
Uses:
  • $wp_post_statuses
See:
Returns:
  • (object) A post status object
Defined at:



Retrieve a post status object by name

Source


<?php
function get_post_status_object$post_status ) {
    global 
$wp_post_statuses;

    if ( empty(
$wp_post_statuses[$post_status]) )
        return 
null;

    return 
$wp_post_statuses[$post_status];
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics