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
This commit is contained in:
Jb Audras
2023-06-24 05:12:28 +00:00
parent eb9f60f605
commit ef6c0b7e42

View File

@@ -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();
}
/**