Switch language

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




get_post_type_object [ WordPress Function ]

get_post_type_object ( $post_type )
Parameters:
  • (string) $post_type The name of a registered post type
Uses:
  • $wp_post_types
See:
Returns:
  • (object) A post type object
Defined at:



Retrieve a post type object by name

Source


<?php
function get_post_type_object$post_type ) {
    global 
$wp_post_types;

    if ( empty(
$wp_post_types[$post_type]) )
        return 
null;

    return 
$wp_post_types[$post_type];
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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