From ef6c0b7e4278a8383a45d49e847354cdf98f39ed Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Sat, 24 Jun 2023 05:12:28 +0000 Subject: [PATCH] Twenty Seventeen: Make `twentyseventeen_is_static_front_page()` an alias of `twentyseventeen_is_frontpage()`. Since both functions return the exact same thing, this changeset makes `twentyseventeen_is_static_front_page()` an alias of `twentyseventeen_is_frontpage()` and updates the related docblocks and function callback. Props mukesh27, soulseekah, swissspidy, sabernhardt, audrasjb, SergeyBiryukov, hareesh-pillai. Fixes #43515. git-svn-id: https://develop.svn.wordpress.org/trunk@56012 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentyseventeen/inc/customizer.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyseventeen/inc/customizer.php b/src/wp-content/themes/twentyseventeen/inc/customizer.php index 635212cf27..43863d0dc9 100644 --- a/src/wp-content/themes/twentyseventeen/inc/customizer.php +++ b/src/wp-content/themes/twentyseventeen/inc/customizer.php @@ -144,7 +144,7 @@ function twentyseventeen_customize_register( $wp_customize ) { 'section' => 'theme_options', 'type' => 'dropdown-pages', 'allow_addition' => true, - 'active_callback' => 'twentyseventeen_is_static_front_page', + 'active_callback' => 'twentyseventeen_is_frontpage', ) ); @@ -221,9 +221,16 @@ function twentyseventeen_customize_partial_blogdescription() { /** * Return whether we're previewing the front page and it's a static page. + * + * This function is an alias for twentyseventeen_is_frontpage(). + * + * @since Twenty Seventeen 1.0 + * @since Twenty Seventeen 3.3 Converted function to an alias. + * + * @return bool Whether the current page is the front page and static. */ function twentyseventeen_is_static_front_page() { - return ( is_front_page() && ! is_home() ); + return twentyseventeen_is_frontpage(); } /**