Insert Headers and Footers - Version 1.4.3

Version Description

  • Update FAQs
  • Introduce three new filters: disable_ihaf, disable_ihaf_footer, disable_ihaf_header
Download this release

Release Info

Developer deb255
Plugin Icon 128x128 Insert Headers and Footers
Version 1.4.3
Comparing to
See all releases

Code changes from version 1.4.2 to 1.4.3

Files changed (3) hide show
  1. ihaf.php +16 -1
  2. readme.txt +14 -4
  3. views/sidebar.php +0 -12
ihaf.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Insert Headers and Footers
4
  * Plugin URI: http://www.wpbeginner.com/
5
- * Version: 1.4.2
6
  * Author: WPBeginner
7
  * Author URI: http://www.wpbeginner.com/
8
  * Description: Allows you to insert code or text in the header or footer of your WordPress blog
@@ -207,6 +207,21 @@ class InsertHeadersAndFooters {
207
  return;
208
  }
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  // Get meta
211
  $meta = get_option( $setting );
212
  if ( empty( $meta ) ) {
2
  /**
3
  * Plugin Name: Insert Headers and Footers
4
  * Plugin URI: http://www.wpbeginner.com/
5
+ * Version: 1.4.3
6
  * Author: WPBeginner
7
  * Author URI: http://www.wpbeginner.com/
8
  * Description: Allows you to insert code or text in the header or footer of your WordPress blog
207
  return;
208
  }
209
 
210
+ // provide the opportunity to Ignore IHAF - both headers and footers via filters
211
+ if ( apply_filters( 'disable_ihaf', false ) ) {
212
+ return;
213
+ }
214
+
215
+ // provide the opportunity to Ignore IHAF - footer only via filters
216
+ if ( 'ihaf_insert_footer' == $setting && apply_filters( 'disable_ihaf_footer', false ) ) {
217
+ return;
218
+ }
219
+
220
+ // provide the opportunity to Ignore IHAF - header only via filters
221
+ if ( 'ihaf_insert_header' == $setting && apply_filters( 'disable_ihaf_header', false ) ) {
222
+ return;
223
+ }
224
+
225
  // Get meta
226
  $meta = get_option( $setting );
227
  if ( empty( $meta ) ) {
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: WPbeginner, smub, deb255
3
  Tags: code, content, css, facebook pixel, footer, footer code, footer scripts, footers, google analytics, head, header, header code, header scripts, headers, insert, insert code, insert scripts, js, meta, meta tags, scripts, wpmu
4
  Requires at least: 3.6
5
- Tested up to: 4.8
6
- Stable tag: 1.4.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -37,8 +37,6 @@ If you find this plugin useful to insert header and footer scripts, please leave
37
 
38
  * <a href="http://optinmonster.com/" rel="friend" title="OptinMonster">OptinMonster</a> - Get More Email Subscribers
39
  * <a href="http://wpforms.com/" rel="friend" title="WPForms">WPForms</a> - Best Contact Form Builder Plugin
40
- * <a href="http://soliloquywp.com/" rel="friend" title="Soliloquy">Soliloquy</a> - Best WordPress Slider Plugin
41
- * <a href="http://enviragallery.com/" rel="friend" title="Envira Gallery">Envira Gallery</a> - Best WordPress Gallery Plugin
42
  * <a href="http://monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - Best Google Analytics Plugin
43
 
44
  To learn more about WordPress, you can also visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> for tutorials on topics like:
@@ -67,6 +65,14 @@ To learn more about WordPress, you can also visit <a href="http://www.wpbeginner
67
 
68
  Yes, you can insert your Google Analytics code in the `Scripts in Header` field.
69
 
 
 
 
 
 
 
 
 
70
  == Notes ==
71
  Insert Headers and Footers is the easiest way to insert code in your WordPress headers and footers.
72
 
@@ -79,6 +85,10 @@ Syed Balkhi
79
 
80
  == Changelog ==
81
 
 
 
 
 
82
  = 1.4.2 =
83
  * Code cleanups
84
 
2
  Contributors: WPbeginner, smub, deb255
3
  Tags: code, content, css, facebook pixel, footer, footer code, footer scripts, footers, google analytics, head, header, header code, header scripts, headers, insert, insert code, insert scripts, js, meta, meta tags, scripts, wpmu
4
  Requires at least: 3.6
5
+ Tested up to: 4.9.6
6
+ Stable tag: 1.4.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
37
 
38
  * <a href="http://optinmonster.com/" rel="friend" title="OptinMonster">OptinMonster</a> - Get More Email Subscribers
39
  * <a href="http://wpforms.com/" rel="friend" title="WPForms">WPForms</a> - Best Contact Form Builder Plugin
 
 
40
  * <a href="http://monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - Best Google Analytics Plugin
41
 
42
  To learn more about WordPress, you can also visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> for tutorials on topics like:
65
 
66
  Yes, you can insert your Google Analytics code in the `Scripts in Header` field.
67
 
68
+ = Can I use Insert Headers and Footers for Google AdSense? =
69
+
70
+ Yes, to verify your account or to tag your page for Auto ads, paste the code AdSense gives you, into the Scripts in Header field.
71
+
72
+ = How to disable Insert Headers and Footers on a specific page? =
73
+
74
+ You can use one of the three available boolean filters: disable_ihaf, disable_ihaf_footer, disable_ihaf_header and return true value in order to disable printing either on the entire page or specifically in the header or footer of a given page.
75
+
76
  == Notes ==
77
  Insert Headers and Footers is the easiest way to insert code in your WordPress headers and footers.
78
 
85
 
86
  == Changelog ==
87
 
88
+ = 1.4.3 =
89
+ * Update FAQs
90
+ * Introduce three new filters: disable_ihaf, disable_ihaf_footer, disable_ihaf_header
91
+
92
  = 1.4.2 =
93
  * Code cleanups
94
 
views/sidebar.php CHANGED
@@ -50,24 +50,12 @@
50
  </a>
51
  <?php _e( ' - Drag & Drop WordPress Form Builder', $this->plugin->name ); ?>
52
  </p>
53
- <p>
54
- <a href="https://wordpress.org/plugins/envira-gallery-lite/" target="_blank">
55
- <?php _e( 'Envira Gallery', $this->plugin->name ); ?>
56
- </a>
57
- <?php _e( ' - Responsive WordPress Gallery plugin', $this->plugin->name ); ?>
58
- </p>
59
  <p>
60
  <a href="https://wordpress.org/plugins/google-analytics-for-wordpress/" target="_blank">
61
  <?php _e( 'MonsterInsights', $this->plugin->name ); ?>
62
  </a>
63
  <?php _e( ' - Google Analytics Made Easy for WordPress', $this->plugin->name ); ?>
64
  </p>
65
- <p>
66
- <a href="https://wordpress.org/plugins/soliloquy-lite/" target="_blank">
67
- <?php _e( 'Soliloquy', $this->plugin->name ); ?>
68
- </a>
69
- <?php _e( ' - Responsive WordPress Slider Plugin', $this->plugin->name ); ?>
70
- </p>
71
  <p>
72
  <a href="http://optinmonster.com/" target="_blank">
73
  <?php _e( 'OptinMonster', $this->plugin->name ); ?>
50
  </a>
51
  <?php _e( ' - Drag & Drop WordPress Form Builder', $this->plugin->name ); ?>
52
  </p>
 
 
 
 
 
 
53
  <p>
54
  <a href="https://wordpress.org/plugins/google-analytics-for-wordpress/" target="_blank">
55
  <?php _e( 'MonsterInsights', $this->plugin->name ); ?>
56
  </a>
57
  <?php _e( ' - Google Analytics Made Easy for WordPress', $this->plugin->name ); ?>
58
  </p>
 
 
 
 
 
 
59
  <p>
60
  <a href="http://optinmonster.com/" target="_blank">
61
  <?php _e( 'OptinMonster', $this->plugin->name ); ?>