Skip to content

Commit

Permalink
Closes #6668 Display Clear critical images on local environment (#6671)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tabrisrp authored May 31, 2024
1 parent 39b8f18 commit 219639e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions inc/Engine/Saas/Admin/AdminBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ public function add_clean_saas_menu_item( $wp_admin_bar ) {
return;
}

if ( 'local' === wp_get_environment_type() ) {
if (
'local' === wp_get_environment_type()
&&
(bool) $this->options->get( 'remove_unused_css', 0 )
) {
return;
}

Expand Down Expand Up @@ -112,7 +116,11 @@ public function add_clean_saas_menu_item( $wp_admin_bar ) {
public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) {
global $post;

if ( 'local' === wp_get_environment_type() ) {
if (
'local' === wp_get_environment_type()
&&
$this->rucss_url_context->is_allowed()
) {
return;
}

Expand Down Expand Up @@ -183,7 +191,11 @@ public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) {
* @return void
*/
public function display_dashboard_button() {
if ( 'local' === wp_get_environment_type() ) {
if (
'local' === wp_get_environment_type()
&&
$this->rucss_url_context->is_allowed()
) {
return;
}

Expand Down

0 comments on commit 219639e

Please sign in to comment.