Skip to content

Commit e9a602c

Browse files
committed
= 1.1.32 = 2022-12-16
* ADDED: Warning message to caution about file editing * FIXED: Snippet including in case of rest api in some cases
1 parent b458f62 commit e9a602c

File tree

5 files changed

+504
-446
lines changed

5 files changed

+504
-446
lines changed

99robots-header-footer-code-manager.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Header Footer Code Manager
44
* Plugin URI: https://draftpress.com/products
55
* Description: Header Footer Code Manager by 99 Robots is a quick and simple way for you to add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, tracking, marketing, or chat functions. For detailed documentation, please visit the plugin's <a href="https://draftpress.com/"> official page</a>.
6-
* Version: 1.1.31
6+
* Version: 1.1.32
77
* Requires at least: 4.9
88
* Requires PHP: 5.6.20
99
* Author: 99robots
@@ -369,6 +369,7 @@ public static function hfcm_static_notices()
369369
public static function hfcm_plugin_notice_dismissed()
370370
{
371371
$user_id = get_current_user_id();
372+
372373
// Checking if user clicked on the Dismiss button
373374
if ( isset( $_GET['hfcm-admin-notice-dismissed'] ) ) {
374375
add_user_meta( $user_id, 'hfcm_plugin_notice_dismissed', 'true', true );
@@ -377,6 +378,11 @@ public static function hfcm_plugin_notice_dismissed()
377378
wp_redirect( $current_url );
378379
exit;
379380
}
381+
382+
// Checking if user clicked on the 'I understand' button
383+
if ( isset( $_GET['hfcm-file-edit-notice-dismissed'] ) ) {
384+
add_user_meta( $user_id, 'hfcm_file_edit_plugin_notice_dismissed', 'true', true );
385+
}
380386
}
381387

382388
/*
@@ -595,7 +601,7 @@ public static function hfcm_footer_scripts()
595601
*/
596602
public static function hfcm_content_scripts( $content )
597603
{
598-
if ( !is_feed() ) {
604+
if ( !is_feed() && !(defined( 'REST_REQUEST' ) && REST_REQUEST) ) {
599605
return self::hfcm_add_snippets( false, $content );
600606
} else {
601607
return $content;

0 commit comments

Comments
 (0)