Version Description
23 May 2019
- Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON. (I think I actually got it this time.)
Download this release
Release Info
Developer | joerhoney |
Plugin | AddFunc Head & Footer Code |
Version | 2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2 to 2.3
- addfunc-head-footer-code.php +3 -4
- readme.txt +8 -3
addfunc-head-footer-code.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: AddFunc Head & Footer Code
|
4 |
Plugin URI:
|
5 |
Description: Allows administrators to add code to the <head> and/or <footer> of an individual post and/or site-wide. Ideal for scripts such as Google Analytics conversion tracking codes and any other general or page-specific JavaScript.
|
6 |
-
Version: 2.
|
7 |
Author: AddFunc
|
8 |
Author URI: http://profiles.wordpress.org/addfunc
|
9 |
License: Public Domain
|
@@ -106,12 +106,11 @@ if(!class_exists('aFHFCClass')) :
|
|
106 |
add_action('wp_head','aFHFCBuffRec');
|
107 |
function aFHFCBuffPlay(){
|
108 |
$body_code = new aFHFCClass;
|
109 |
-
$tape = ob_get_clean();
|
110 |
$pattern = '/<[bB][oO][dD][yY]\s[A-Za-z]{2,5}[A-Za-z0-9 "_,=%*\'\/():;\[\]\-\.]+>|<body>/';
|
111 |
$queue = array();
|
|
|
112 |
preg_match($pattern,$tape,$queue);
|
113 |
-
$q = $queue[0];
|
114 |
-
$q = $q.$body_code->output_body_code();
|
115 |
echo preg_replace($pattern,$q,$tape);
|
116 |
}
|
117 |
add_action('wp_print_footer_scripts','aFHFCBuffPlay');
|
3 |
Plugin Name: AddFunc Head & Footer Code
|
4 |
Plugin URI:
|
5 |
Description: Allows administrators to add code to the <head> and/or <footer> of an individual post and/or site-wide. Ideal for scripts such as Google Analytics conversion tracking codes and any other general or page-specific JavaScript.
|
6 |
+
Version: 2.3
|
7 |
Author: AddFunc
|
8 |
Author URI: http://profiles.wordpress.org/addfunc
|
9 |
License: Public Domain
|
106 |
add_action('wp_head','aFHFCBuffRec');
|
107 |
function aFHFCBuffPlay(){
|
108 |
$body_code = new aFHFCClass;
|
|
|
109 |
$pattern = '/<[bB][oO][dD][yY]\s[A-Za-z]{2,5}[A-Za-z0-9 "_,=%*\'\/():;\[\]\-\.]+>|<body>/';
|
110 |
$queue = array();
|
111 |
+
$tape = ob_get_clean();
|
112 |
preg_match($pattern,$tape,$queue);
|
113 |
+
$q = empty($queue[0]) ? '' : $queue[0].$body_code->output_body_code();
|
|
|
114 |
echo preg_replace($pattern,$q,$tape);
|
115 |
}
|
116 |
add_action('wp_print_footer_scripts','aFHFCBuffPlay');
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Contributors: AddFunc,joerhoney
|
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7AF7P3TFKQ2C2
|
6 |
Tags: head code, footer code, add to head, per page, tracking code, Google Analytics, javascript, meta tags, wp_head, wp_footer, body tag code, opening body tag
|
7 |
Requires at least: 3.0.1
|
8 |
-
Tested up to: 5.
|
9 |
-
Stable tag: 2.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -64,10 +64,15 @@ Yes. [addfunc.com](http://addfunc.com/)
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
= 2.2 =
|
68 |
23 Apr 2019
|
69 |
|
70 |
-
* Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON.
|
71 |
|
72 |
= 2.1 =
|
73 |
28 Nov 2018
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7AF7P3TFKQ2C2
|
6 |
Tags: head code, footer code, add to head, per page, tracking code, Google Analytics, javascript, meta tags, wp_head, wp_footer, body tag code, opening body tag
|
7 |
Requires at least: 3.0.1
|
8 |
+
Tested up to: 5.2
|
9 |
+
Stable tag: 2.3
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 2.3 =
|
68 |
+
23 May 2019
|
69 |
+
|
70 |
+
* Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON. (I think I actually got it this time.)
|
71 |
+
|
72 |
= 2.2 =
|
73 |
23 Apr 2019
|
74 |
|
75 |
+
* Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON. Edit: not fixed, just a different error.
|
76 |
|
77 |
= 2.1 =
|
78 |
28 Nov 2018
|