Switch language

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




get_post_custom_keys [ WordPress Function ]

get_post_custom_keys ( $post_id = 0 )
Parameters:
  • (int) $post_id post ID
Links:
Returns:
  • (array|null) Either array of the keys, or null if keys could not be retrieved.
Defined at:



Retrieve meta field names for a post.

If there are no meta fields, then nothing (null) will be returned.

Source


<?php
function get_post_custom_keys$post_id ) {
    
$custom get_post_custom$post_id );

    if ( !
is_array($custom) )
        return;

    if ( 
$keys array_keys($custom) )
        return 
$keys;
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

0 User Note(s)

None yet. Be the first!

Add New ...



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