Head & Footer Code - Version 1.0.3

Version Description

  • Change: Make even default WP post types post and page optional for page specific head/footer code
Download this release

Release Info

Developer urkekg
Plugin Icon Head & Footer Code
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

head-footer-code.php CHANGED
@@ -8,7 +8,7 @@
8
  * Plugin Name: Head & Footer Code
9
  * Plugin URI: http://urosevic.net/wordpress/plugins/head-footer-code/
10
  * Description: Easy add site-wide and/or article specific custom code to head and/or footer sections (before the &lt;/head&gt; or &lt;/body&gt;) by hooking to <code>wp_head</code> and <code>wp_footer</code>.
11
- * Version: 1.0.2
12
  * Author: Aleksandar Urosevic
13
  * Author URI: http://urosevic.net
14
  * License: GPL-2.0+
8
  * Plugin Name: Head & Footer Code
9
  * Plugin URI: http://urosevic.net/wordpress/plugins/head-footer-code/
10
  * Description: Easy add site-wide and/or article specific custom code to head and/or footer sections (before the &lt;/head&gt; or &lt;/body&gt;) by hooking to <code>wp_head</code> and <code>wp_footer</code>.
11
+ * Version: 1.0.3
12
  * Author: Aleksandar Urosevic
13
  * Author URI: http://urosevic.net
14
  * License: GPL-2.0+
inc/helpers.php CHANGED
@@ -9,7 +9,7 @@ function auhfc_defaults() {
9
  'head' => '',
10
  'footer' => '',
11
  'priority' => 10,
12
- 'post_types' => array( 'post', 'page' ),
13
  );
14
  $auhfc_settings = get_option( 'auhfc_settings', $defaults );
15
  $auhfc_settings = wp_parse_args( $auhfc_settings, $defaults );
9
  'head' => '',
10
  'footer' => '',
11
  'priority' => 10,
12
+ 'post_types' => '', // array( 'post', 'page' ),
13
  );
14
  $auhfc_settings = get_option( 'auhfc_settings', $defaults );
15
  $auhfc_settings = wp_parse_args( $auhfc_settings, $defaults );
inc/metaboxes.php CHANGED
@@ -18,6 +18,9 @@ function auhfc_add_meta_boxes() {
18
 
19
  $auhfc_defaults = auhfc_defaults();
20
 
 
 
 
21
  foreach ( $auhfc_defaults['post_types'] as $post_type ) {
22
  add_meta_box(
23
  'auhfc-head-footer-code',
18
 
19
  $auhfc_defaults = auhfc_defaults();
20
 
21
+ if ( empty( $auhfc_defaults['post_types'] ) ) {
22
+ return;
23
+ }
24
  foreach ( $auhfc_defaults['post_types'] as $post_type ) {
25
  add_meta_box(
26
  'auhfc-head-footer-code',
inc/settings.php CHANGED
@@ -252,7 +252,6 @@ function auhfc_options_page( ) {
252
 
253
  }
254
 
255
-
256
  /**
257
  * Generate Settings link on Plugins page listing
258
  * @param array $links Array of existing plugin row links.
252
 
253
  }
254
 
 
255
  /**
256
  * Generate Settings link on Plugins page listing
257
  * @param array $links Array of existing plugin row links.
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: urkekg
3
  Donate link: http://urosevic.net/wordpress/donate/?donate_for=head-footer-code
4
  Tags: wp_head, wp_footer, head footer code, custom head script, custom footer script, google analytics, pixel tracking, tracking code, javascript, scripts, site verification, css
5
  Requires at least: 3.9
6
- Tested up to: 4.3
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -36,7 +36,7 @@ It is very hard to continue development and support for this and my other free p
36
  * Choose which post types will have enabled article specific head/footer fields
37
  * Choose should article specific head/footer code be appended to site-wide code, or will replace site-wide code
38
  * Site-wide section located under **Tools** > **Head & Footer Code**
39
- * If you have enabled WP_DEBUG constant in `wp-config.php`, you'll see site-wide and article specific entries in page source code wrapped to commens.
40
 
41
  == Installation ==
42
 
@@ -81,6 +81,9 @@ Initial release of new plugin developed by Aleksandar Urosevic.
81
 
82
  == Changelog ==
83
 
 
 
 
84
  = 1.0.2 =
85
  * Change: Replace PayPal donation links to prevent account limitations if plugin is used on website that violates PayPal's Acceptable Use Policy
86
 
3
  Donate link: http://urosevic.net/wordpress/donate/?donate_for=head-footer-code
4
  Tags: wp_head, wp_footer, head footer code, custom head script, custom footer script, google analytics, pixel tracking, tracking code, javascript, scripts, site verification, css
5
  Requires at least: 3.9
6
+ Tested up to: 4.3.2
7
+ Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
36
  * Choose which post types will have enabled article specific head/footer fields
37
  * Choose should article specific head/footer code be appended to site-wide code, or will replace site-wide code
38
  * Site-wide section located under **Tools** > **Head & Footer Code**
39
+ * If you have enabled WP_DEBUG constant in `wp-config.php`, you'll see site-wide and article specific entries in page source code wrapped to comments.
40
 
41
  == Installation ==
42
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.0.3 =
85
+ * Change: Make even default WP post types `post` and `page` optional for page specific head/footer code
86
+
87
  = 1.0.2 =
88
  * Change: Replace PayPal donation links to prevent account limitations if plugin is used on website that violates PayPal's Acceptable Use Policy
89