diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php index 1992b059a0..cec2496149 100644 --- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php +++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php @@ -205,7 +205,7 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { ) ); - /* Enable Header Search --------- */ + /* Enable Header Search ----------------------------------------------- */ $wp_customize->add_setting( 'enable_header_search', @@ -226,6 +226,27 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) { ) ); + /* Show author bio ---------------------------------------------------- */ + + $wp_customize->add_setting( + 'show_author_bio', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => array( __CLASS__, 'sanitize_checkbox' ), + ) + ); + + $wp_customize->add_control( + 'show_author_bio', + array( + 'type' => 'checkbox', + 'section' => 'options', + 'priority' => 10, + 'label' => __( 'Show author bio', 'twentytwenty' ), + ) + ); + /* Display full content or excerpts on the blog and archives --------- */ $wp_customize->add_setting( diff --git a/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php b/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php index 657b94835d..14553c66fc 100644 --- a/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php +++ b/wp-content/themes/twentytwenty/template-parts/entry-author-bio.php @@ -7,7 +7,7 @@ * @since 1.0.0 */ -if ( (bool) get_the_author_meta( 'description' ) ) : ?> +if ( (bool) get_the_author_meta( 'description' ) && (bool) get_theme_mod( 'show_author_bio', true ) ) : ?>
diff --git a/wp-includes/version.php b/wp-includes/version.php index fb4735d8fc..43ea8a7586 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-46812'; +$wp_version = '5.4-alpha-46813'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.