Skip to content

Commit ab2f5a5

Browse files
authored
Boost: Fix switching static front page to posts page during c.css generation (Automattic#37027)
* Fix switching static front page to posts page during c.css generation * Fix returning home page for posts page in source providers list * add changelog * Update changelog * Update changelog filename
1 parent 690ffed commit ab2f5a5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

projects/plugins/boost/app/class-jetpack-boost.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ public function __construct() {
117117

118118
add_action( 'jetpack_boost_critical_css_environment_changed', array( $this, 'handle_environment_change' ), 10, 2 );
119119

120-
add_filter( 'query_vars', array( self::class, 'whitelist_query_args' ) );
121-
122120
// Fired when plugin ready.
123121
do_action( 'jetpack_boost_loaded', $this );
124122

projects/plugins/boost/app/lib/critical-css/source-providers/providers/WP_Core_Provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function get_critical_source_urls( $context_posts = array() ) {
3939

4040
$posts_page = get_option( 'page_for_posts' );
4141
if ( ! empty( $posts_page ) ) {
42-
$permalink = get_permalink( $front_page );
42+
$permalink = get_permalink( $posts_page );
4343
if ( ! empty( $permalink ) ) {
4444
$urls['posts_page'] = array( $permalink );
4545
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: fixed
3+
Comment: Fixed switching content of home page during critical css generation. Fixed returning home url instead of posts url for posts page source provider.
4+
5+

0 commit comments

Comments
 (0)