Header Footer Code Manager - Version 1.1.6

Version Description

2019-09-22 * FIXED: Specific Pages targeting Blog index page, even when it is not selected.

Download this release

Release Info

Developer 99robots
Plugin Icon 128x128 Header Footer Code Manager
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5 to 1.1.6

99robots-header-footer-code-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Header Footer Code Manager
4
  * Plugin URI: https://99robots.com/products
5
  * 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://99robots.com/"> official page</a>.
6
- * Version: 1.1.5
7
  * Author: 99robots
8
  * Author URI: https://99robots.com/
9
  * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -372,8 +372,17 @@ function hfcm_add_snippets( $location = '', $content = '' ) {
372
  }
373
  break;
374
  case 's_pages':
375
- if ( hfcm_not_empty( $scriptdata, 's_pages' ) && is_page( json_decode( $scriptdata->s_pages ) ) || (!is_front_page() && is_home())) {
376
- $out = hfcm_render_snippet( $scriptdata );
 
 
 
 
 
 
 
 
 
377
  }
378
  break;
379
  case 's_tags':
3
  * Plugin Name: Header Footer Code Manager
4
  * Plugin URI: https://99robots.com/products
5
  * 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://99robots.com/"> official page</a>.
6
+ * Version: 1.1.6
7
  * Author: 99robots
8
  * Author URI: https://99robots.com/
9
  * Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
372
  }
373
  break;
374
  case 's_pages':
375
+ if ( hfcm_not_empty( $scriptdata, 's_pages' ) ) {
376
+ // Gets the page ID of the blog page
377
+ $blog_page = get_option('page_for_posts');
378
+ // Checks if the blog page is present in the array of selected pages
379
+ if (in_array($blog_page, json_decode($scriptdata->s_pages))){
380
+ if( is_page(json_decode($scriptdata->s_pages)) || (!is_front_page() && is_home()) ){
381
+ $out = hfcm_render_snippet( $scriptdata );
382
+ }
383
+ }elseif(is_page(json_decode($scriptdata->s_pages))) {
384
+ $out = hfcm_render_snippet( $scriptdata );
385
+ }
386
  }
387
  break;
388
  case 's_tags':
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: 99robots, charliepatel
3
  Tags: header, footer, code manager, snippet, functions.php, tracking, google analytics, adsense, verification, pixel
4
  Requires at least: 4.0
5
- Tested up to: 5.2.2
6
- Stable tag: 1.1.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: https://99robots.com
@@ -110,6 +110,9 @@ A. If your script is not supported, just let us know and we'll look into it imme
110
 
111
  == Changelog ==
112
 
 
 
 
113
  = 1.1.5 = 2019-08-29
114
  * FIXED: Unable to target Blog index page
115
 
2
  Contributors: 99robots, charliepatel
3
  Tags: header, footer, code manager, snippet, functions.php, tracking, google analytics, adsense, verification, pixel
4
  Requires at least: 4.0
5
+ Tested up to: 5.2.3
6
+ Stable tag: 1.1.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: https://99robots.com
110
 
111
  == Changelog ==
112
 
113
+ = 1.1.6 = 2019-09-22
114
+ * FIXED: Specific Pages targeting Blog index page, even when it is not selected.
115
+
116
  = 1.1.5 = 2019-08-29
117
  * FIXED: Unable to target Blog index page
118