Changeset 2290 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
- Timestamp:
- 01/12/2016 10:59:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r2282 r2290 440 440 441 441 return in_array( $post_type, get_parsed_post_types() ); 442 } 443 444 /** 445 * Get the specific type of hook. 446 * 447 * @param int|WP_Post|null $post Optional. Post ID or post object. Default is global $post. 448 * @return string Either 'action', 'filter', or an empty string if not a hook post type. 449 */ 450 function get_hook_type( $post = null ) { 451 $hook = ''; 452 453 if ( 'wp-parser-hook' === get_post_type( $post ) ) { 454 $hook = get_post_meta( get_post_field( 'ID', $post ), '_wp-parser_hook_type', true ); 455 } 456 457 return $hook; 442 458 } 443 459
Note: See TracChangeset
for help on using the changeset viewer.