| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | foreach ( $snippets as $snippet ) { |
| 22 | 22 | |
| 23 | 23 | if ( $snippet['blocked'] ) { |
| 24 | 24 | // Determine the reason for blocking |
| 25 | - $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : ''; | |
| 25 | + $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : null; | |
| 26 | 26 | $is_settings_page = ( $page === 'mwcode_settings' ); |
| 27 | 27 | $is_rest = MeowKit_MWCODE_Helpers::is_rest(); |
| 28 | 28 | $is_rest_whitelisted = Meow_MWCODE_Core::is_white_listed_rest(); |
| 29 | 29 | |
| @@ -56,12 +56,10 @@ | ||
| 56 | 56 | continue; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | $current_mwcode_snippet = $snippet; |
| 60 | + | |
| 60 | 61 | |
| 61 | - // Remember we ran this global so load_global_snippets() won't run it a second time. | |
| 62 | - $mwcode_core->loaded_global_ids[] = $snippet['id']; | |
| 63 | - | |
| 64 | 62 | ob_start( ); |
| 65 | 63 | |
| 66 | 64 | try { |
| 67 | 65 | $mwcode_core->log( "Executing snippet: " . $snippet['name'] . " (ID: " . $snippet['id'] . ")" ); |
| @@ -185,9 +183,9 @@ | ||
| 185 | 183 | |
| 186 | 184 | $js_code = ''; |
| 187 | 185 | |
| 188 | 186 | if ( is_admin( ) ) { |
| 189 | - $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : ''; | |
| 187 | + $page = isset( $_GET["page"] ) ? sanitize_text_field( $_GET["page"] ) : null; | |
| 190 | 188 | if ( $page === 'mwai_settings' ) { |
| 191 | 189 | $js_code = $mwcode_core->get_js_functions_to_push( ); |
| 192 | 190 | } |
| 193 | 191 | } else { |