https://help.codibu.com/kby”>
Retrieve meta field names for a post.
Description Description
If there are no meta fields, then nothing (null) will be returned.
Parameters Parameters
- $post_id
-
(int) (Optional) Post ID. Default is ID of the global $post.
Return Return
(array|void) Array of the keys, if retrieved.
Source Source
File: wp-includes/post.php
2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 |
function get_post_custom_keys( $post_id = 0 ) { $custom = get_post_custom( $post_id ); if ( ! is_array ( $custom ) ) { return ; } $keys = array_keys ( $custom ); if ( $keys ) { return $keys ; } } |
Expand full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |