Skip to content

Commit

Permalink
Moved the fix to its own function so that it is semantically correct
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrdortiz committed May 10, 2024
1 parent f572b7c commit e26f72d
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ function wpcom_themes_show_banner() {
array(),
Jetpack_Mu_Wpcom::PACKAGE_VERSION
);
wp_enqueue_style(
'wpcom-themes-ui-fixes',
plugins_url( 'css/ui-fixes.css', __FILE__ ),
array(),
Jetpack_Mu_Wpcom::PACKAGE_VERSION
);
}
add_action( 'load-theme-install.php', 'wpcom_themes_show_banner' );

Expand Down Expand Up @@ -91,11 +85,18 @@ function wpcom_themes_remove_wpcom_actions() {
'in_footer' => true,
)
);
}
add_action( 'load-themes.php', 'wpcom_themes_remove_wpcom_actions' );

/**
* Adds a CSS file to fix UI issues in the theme browser.
*/
function wpcom_themes_load_ui_fixes() {
wp_enqueue_style(
'wpcom-themes-ui-fixes',
plugins_url( 'css/ui-fixes.css', __FILE__ ),
array(),
Jetpack_Mu_Wpcom::PACKAGE_VERSION
);
}
add_action( 'load-themes.php', 'wpcom_themes_remove_wpcom_actions' );
add_action( 'load-themes.php', 'wpcom_themes_load_ui_fixes' );

0 comments on commit e26f72d

Please sign in to comment.