Version Description
28 Nov 2018
- Removes the metabox from post types which are not public.
Download this release
Release Info
Developer | joerhoney |
Plugin | AddFunc Head & Footer Code |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2 to 2.1
- addfunc-head-footer-code.php +5 -3
- readme.txt +7 -2
addfunc-head-footer-code.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/*
|
3 |
Plugin Name: AddFunc Head & Footer Code
|
4 |
Plugin URI:
|
5 |
-
Description: Allows
|
6 |
-
Version: 2
|
7 |
Author: AddFunc
|
8 |
Author URI: http://profiles.wordpress.org/addfunc
|
9 |
License: Public Domain
|
@@ -135,7 +135,9 @@ add_action('add_meta_boxes','aFhfc_add');
|
|
135 |
function aFhfc_add()
|
136 |
{
|
137 |
if(current_user_can('manage_options')){
|
138 |
-
|
|
|
|
|
139 |
}
|
140 |
}
|
141 |
function aFhfc_mtbx($post)
|
2 |
/*
|
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.1
|
7 |
Author: AddFunc
|
8 |
Author URI: http://profiles.wordpress.org/addfunc
|
9 |
License: Public Domain
|
135 |
function aFhfc_add()
|
136 |
{
|
137 |
if(current_user_can('manage_options')){
|
138 |
+
$args = array('public'=>true);
|
139 |
+
$post_types = get_post_types($args);
|
140 |
+
add_meta_box('aFhfcMetaBox','Head & Footer Code','aFhfc_mtbx',$post_types,'normal','low');
|
141 |
}
|
142 |
}
|
143 |
function aFhfc_mtbx($post)
|
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:
|
9 |
-
Stable tag: 2
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -64,6 +64,11 @@ Yes. [addfunc.com](http://addfunc.com/)
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
= 2 =
|
68 |
19 Sep 2018
|
69 |
|
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.0
|
9 |
+
Stable tag: 2.1
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 2.1 =
|
68 |
+
28 Nov 2018
|
69 |
+
|
70 |
+
* Removes the metabox from post types which are not public.
|
71 |
+
|
72 |
= 2 =
|
73 |
19 Sep 2018
|
74 |
|