Version Description
23-Jun-2015
- Corrects the generated path to options.php, so that the settings page can be found even on installs where the plugins directory is not at the standard /wp-content/plugins location.
Download this release
Release Info
Developer | joerhoney |
Plugin | AddFunc Head & Footer Code |
Version | 1.3 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.3
- addfunc-head-footer-code.php +3 -3
- readme.txt +28 -25
addfunc-head-footer-code.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/*
|
3 |
Plugin Name: AddFunc Head & Footer Code
|
4 |
Plugin URI:
|
5 |
-
Description: Allows admins 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
|
6 |
-
Version: 1.
|
7 |
Author: AddFunc
|
8 |
Author URI: http://profiles.wordpress.org/addfunc
|
9 |
License: Public Domain
|
@@ -31,7 +31,7 @@ define('AFHDFTRCD_NICK', 'Head & Footer Code');
|
|
31 |
{
|
32 |
public static function file_path($file)
|
33 |
{
|
34 |
-
return
|
35 |
}
|
36 |
public static function register()
|
37 |
{
|
2 |
/*
|
3 |
Plugin Name: AddFunc Head & Footer Code
|
4 |
Plugin URI:
|
5 |
+
Description: Allows admins 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: 1.3
|
7 |
Author: AddFunc
|
8 |
Author URI: http://profiles.wordpress.org/addfunc
|
9 |
License: Public Domain
|
31 |
{
|
32 |
public static function file_path($file)
|
33 |
{
|
34 |
+
return plugin_dir_path(__FILE__).$file;
|
35 |
}
|
36 |
public static function register()
|
37 |
{
|
readme.txt
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
|
4 |
Contributors: AddFunc,average.technology,joerhoney
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7AF7P3TFKQ2C2
|
6 |
-
Tags: head code, footer code,
|
7 |
Requires at least: 3.0.1
|
8 |
-
Tested up to: 4.
|
9 |
-
Stable tag: 1.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -14,22 +14,28 @@ Easily add code to your head and/or footer, site-wide and/or on any individual p
|
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
-
Allows
|
18 |
-
|
19 |
-
**Custom support tickets are available**
|
20 |
-
|
21 |
-
See [Other Notes][1] tab for details.
|
22 |
-
|
23 |
-
[1]: http://wordpress.org/plugins/addfunc-head-footer-code/other_notes/
|
24 |
|
25 |
== Installation ==
|
26 |
|
27 |
1. Upload the entire `/addfunc-head-footer-code` folder to the `/wp-content/plugins/` directory
|
28 |
2. Activate the plugin through the *Plugins* menu in WordPress
|
29 |
-
3. Add code site-wide in *Settings>Head & Footer Code* or on individual
|
30 |
|
31 |
== Frequently Asked Questions ==
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
= Where does the head code output? =
|
34 |
|
35 |
Wherever `wp_head()` is located in your theme.
|
@@ -38,13 +44,17 @@ Wherever `wp_head()` is located in your theme.
|
|
38 |
|
39 |
Wherever `wp_footer()` is located in your theme.
|
40 |
|
|
|
|
|
|
|
|
|
41 |
= Does it really require WordPress 3.0.1 or later? =
|
42 |
|
43 |
-
I have not tested it on earlier versions
|
44 |
|
45 |
= Does AddFunc have a website? =
|
46 |
|
47 |
-
|
48 |
|
49 |
== Screenshots ==
|
50 |
|
@@ -54,6 +64,11 @@ The cobbler has no shoes. ...we're working on it.
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
|
|
57 |
= 1.2 =
|
58 |
19-Jun-2015
|
59 |
|
@@ -103,16 +118,4 @@ The cobbler has no shoes. ...we're working on it.
|
|
103 |
* Saves Head & Footer Code entry to the database as custom fields
|
104 |
* Outputs code to the website in `wp_head()` and `wp_footer()`
|
105 |
|
106 |
-
== Custom Support ==
|
107 |
-
|
108 |
-
If you have a custom support need, [please purchase your support ticket here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7AF7P3TFKQ2C2). Support tickets are responded to within 24 hours, but we answer them as soon as possible.
|
109 |
-
|
110 |
-
**How it works**
|
111 |
-
|
112 |
-
1. [Purchase a support ticket via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7AF7P3TFKQ2C2)
|
113 |
-
2. You get a chance to provide the best way to contact you and a description of your need
|
114 |
-
3. I contact you as soon as I can (no less than 24 hours) and help resolve your issue
|
115 |
-
|
116 |
-
**Note:** This is for custom needs for help, not problems with the plugin, or instructions that should already be explain in the description. If you feel there are important details omitted from the description, installation steps, etc. of the plugin, please report them in the Support forum. Thanks!
|
117 |
-
|
118 |
== Upgrade Notice ==
|
3 |
|
4 |
Contributors: AddFunc,average.technology,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, script, tracking code, Google Analytics, javascript, meta tags, insert code, wp_head, wp_footer
|
7 |
Requires at least: 3.0.1
|
8 |
+
Tested up to: 4.5.3
|
9 |
+
Stable tag: 1.3
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
+
Allows administrators to add code to the `<head>` and/or footer of an individual post (or page or other content) and/or site-wide. Ideal for scripts such as Google Analytics conversion tracking code and any other general or page-specific JavaScript. A very simple, reliable and lightweight plugin.
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
== Installation ==
|
20 |
|
21 |
1. Upload the entire `/addfunc-head-footer-code` folder to the `/wp-content/plugins/` directory
|
22 |
2. Activate the plugin through the *Plugins* menu in WordPress
|
23 |
+
3. Add code site-wide in *Settings>Head & Footer Code* or on individual Pages/Posts using the Head & Footer Code meta box when in edit mode in a page (or any post type)
|
24 |
|
25 |
== Frequently Asked Questions ==
|
26 |
|
27 |
+
= Can I add Google Analytics or other tracking code snippets to the ⟨head⟩ tag of my website? =
|
28 |
+
|
29 |
+
Yep! That's what AddFunc Head & Footer Code is made for.
|
30 |
+
|
31 |
+
= Can I add code snippets to the ⟨head⟩ tag or footer of a specific Post or Page? =
|
32 |
+
|
33 |
+
Yep! That's what this plugin is made for.
|
34 |
+
|
35 |
+
= Does AddFunc Head & Footer Code work on custom content types, the same as they do on Posts and Pages? =
|
36 |
+
|
37 |
+
For the site wide code yes, as long as the theme is set up properly with the `wp_head()` and `wp_footer()` functions. For individual custom content type "entries" (as we'll call them) it will work as long as the custom content type (or custom post type more precisely) is set up in the standard way, so that WordPress will recognize that it needs to add all the usual meta boxes to it. Basically, it will work in a standard setup.
|
38 |
+
|
39 |
= Where does the head code output? =
|
40 |
|
41 |
Wherever `wp_head()` is located in your theme.
|
44 |
|
45 |
Wherever `wp_footer()` is located in your theme.
|
46 |
|
47 |
+
= Will AddFunc Head & Footer Code work if there is no `wp_head()` or `wp_footer()` in my theme? =
|
48 |
+
|
49 |
+
Wherever one of those functions is missing, your code will not be output there. But omitting one of them does not stop the other one from working. AddFunc Head & Footer Code will also save your code regardless. It just can't output your code without the presence of those functions in the theme.
|
50 |
+
|
51 |
= Does it really require WordPress 3.0.1 or later? =
|
52 |
|
53 |
+
I have not tested it on earlier versions, but I believe `wp_head()` and `wp_footer()` have been a part of WordPress since the very beginning, so it should work on any version. Feel free to try it out and let us know if it works! :)
|
54 |
|
55 |
= Does AddFunc have a website? =
|
56 |
|
57 |
+
Yes. [addfunc.com](http://addfunc.com/)
|
58 |
|
59 |
== Screenshots ==
|
60 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 1.3 =
|
68 |
+
23-Jun-2015
|
69 |
+
|
70 |
+
* Corrects the generated path to options.php, so that the settings page can be found even on installs where the plugins directory is not at the standard /wp-content/plugins location.
|
71 |
+
|
72 |
= 1.2 =
|
73 |
19-Jun-2015
|
74 |
|
118 |
* Saves Head & Footer Code entry to the database as custom fields
|
119 |
* Outputs code to the website in `wp_head()` and `wp_footer()`
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
== Upgrade Notice ==
|