Skip to content

Commit

Permalink
update admin condition for clear critical images on URL
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Apr 16, 2024
1 parent 38775e5 commit 3b8f3c0
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions inc/Engine/Saas/Admin/AdminBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,13 @@ public function add_clean_saas_menu_item( $wp_admin_bar ) {
* @return void
*/
public function add_clean_url_menu_item( WP_Admin_Bar $wp_admin_bar ) {
global $pagenow, $post;
global $post;

if ( 'local' === wp_get_environment_type() ) {
return;
}

if (
is_admin()
&&
(
! $post
||
'post.php' !== $pagenow
||
! isset( $_GET['action'], $_GET['post'] ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
)
) {
if ( is_admin() ) {
return;
}

Expand Down

0 comments on commit 3b8f3c0

Please sign in to comment.