wp-content/themes/twentytwenty/inc/template-tags.php:242Retrieves the post meta.
$post_idintoptionalnull$locationstringoptional'single-top'5 hooks fire while twentytwenty_get_post_meta() runs, in this order:
Filters post types array.
Filters post meta info visibility.
Filters post tags visibility.
Fires before post meta HTML display.
Fires after post meta HTML display.
function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) { // Require post ID. if ( ! $post_id ) { return; } /** * Filters post types array. * * This filter can be used to hide post meta information of post, page or custom post type * registered by child themes or plugins. * * @since Twenty Twenty 1.0 * * @param array Array of post types. */ $disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) ); // Check whether the post type is allowed to output post meta. if ( in_array( get_post_type( $post_id ), $disallowed_post_types, true ) ) { return; } $post_meta_wrapper_classes = ''; $post_meta_classes = ''; // Get the post meta settings for the location specified. if ( 'single-top' === $location ) { /** * Filters post meta info visibility. * * Use this filter to hide post meta information like Author, Post date, Comments, Is sticky status. * * @since Twenty Twenty 1.0 * * @param array $args { * @type string $author * @type string $post-date * @type string $comments * @type string $sticky * } */ $post_meta = apply_filters( 'twentytwenty_post_meta_location_single_top', array( 'author', 'post-date', 'comments', 'sticky', ) ); $post_meta_wrapper_classes = ' post-meta-single post-meta-single-top'; } elseif ( 'single-bottom' === $location ) { /** * Filters post tags visibility. * * Use this filter to hide post tags. * * @since Twenty Twenty 1.0 * * @param array $args { * @type string $tags * } */ $post_meta = apply_filters( 'twentytwenty_post_meta_location_single_bottom', array( 'tags', ) ); $post_meta_wrapper_classes = ' post-meta-single post-meta-single-bottom'; } // If the post meta setting has the value 'empty', it's explicitly empty and the default post meta shouldn't be output.Introduced in Twenty Twenty 1.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
none to string|void.verified against sourcesrc/wp-content/themes/twentytwenty/inc/template-tags.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.