mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-13 22:26:06 +01:00
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. This brings the changes in [47799] to the 5.4 branch. Props joyously, donmhico. Fixes #48803. Built from https://develop.svn.wordpress.org/branches/5.4@47830 git-svn-id: http://core.svn.wordpress.org/branches/5.4@47606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8e5980a770
commit
5bab6998d6
@ -338,7 +338,7 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
|||||||
do_action( 'twentytwenty_start_of_post_meta_list', $post_id, $post_meta, $location );
|
do_action( 'twentytwenty_start_of_post_meta_list', $post_id, $post_meta, $location );
|
||||||
|
|
||||||
// Author.
|
// Author.
|
||||||
if ( in_array( 'author', $post_meta, true ) ) {
|
if ( post_type_supports( get_post_type( $post_id ), 'author' ) && in_array( 'author', $post_meta, true ) ) {
|
||||||
|
|
||||||
$has_meta = true;
|
$has_meta = true;
|
||||||
?>
|
?>
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
// Single bottom post meta.
|
// Single bottom post meta.
|
||||||
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
|
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( post_type_supports( get_post_type( get_the_ID() ), 'author' ) && is_single() ) {
|
||||||
|
|
||||||
get_template_part( 'template-parts/entry-author-bio' );
|
get_template_part( 'template-parts/entry-author-bio' );
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
// Single bottom post meta.
|
// Single bottom post meta.
|
||||||
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
|
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
|
||||||
|
|
||||||
if ( is_single() ) {
|
if ( post_type_supports( get_post_type( get_the_ID() ), 'author' ) && is_single() ) {
|
||||||
|
|
||||||
get_template_part( 'template-parts/entry-author-bio' );
|
get_template_part( 'template-parts/entry-author-bio' );
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.4.2-alpha-47829';
|
$wp_version = '5.4.2-alpha-47830';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user