Make WordPress Core


Ignore:
Timestamp:
05/14/2020 05:15:41 PM (5 years ago)
Author:
ianbelanger
Message:

Bundled Themes: Twenty Twenty custom post types that don't support authors, shows author box.

This fixes the issue where custom post types will show an author box, even if they don't support authors.

Props joyously, donmhico.
Fixes #48803.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r47122 r47799  
    339339
    340340                // Author.
    341                 if ( in_array( 'author', $post_meta, true ) ) {
     341                if ( post_type_supports( get_post_type( $post_id ), 'author' ) && in_array( 'author', $post_meta, true ) ) {
    342342
    343343                    $has_meta = true;
Note: See TracChangeset for help on using the changeset viewer.