Header and Footer Scripts - Version 1.3.4

Version Description

  • Fixed variable undefined notice
Download this release

Release Info

Developer BlogSynthesis
Plugin Icon 128x128 Header and Footer Scripts
Version 1.3.4
Comparing to
See all releases

Code changes from version 1.3.2 to 1.3.4

Files changed (2) hide show
  1. readme.txt +84 -82
  2. shfs.php +21 -19
readme.txt CHANGED
@@ -1,83 +1,85 @@
1
- === Header and Footer Scripts ===
2
-
3
- Contributors: BlogSynthesis, anand_kumar
4
- Tags: head, header, footer, scripts, post, admin
5
- Requires at least: 3.4.1
6
- Tested up to: 4.1
7
- Stable tag: 1.3.2
8
- License: GPLv2 or later
9
- Donate link: http://www.blogsynthesis.com/#donate
10
-
11
- Header and Footer Scripts plugin enables you to add scripts to WordPress header and footer.
12
-
13
- == Description ==
14
-
15
- Many WordPress Themes do not have any options to insert header and footer scripts in your site `<head>` or `<footer>`. It helps you to keep yourself from theme lock. But, sometimes it also causes some pain for many. like where should I insert Google Analytics code (or any other web-analytics codes). This plugin is one stop and lightweight solution for that. With this "Header and Footer Script" plugin will be able to inject HTML tags, JS and CSS codes to `<head>` and `<footer>` easily.
16
-
17
- =Benefits of the plugin:=
18
- * You will be able to [insert Google Analytics][1] or other Web-analytics code, meta-informations, CSS and JS codes to `<head>`
19
- * You will be able to insert html and/or JavaScript codes to footer of your site. Good place for [Clicky Web Analytics][2], Twitter, Facebook or any other social media script.
20
- * Easily insert codes to single post and page headers, in addition to default codes.
21
-
22
- Please note, Not all themes need this plugin and Not all themes supports this plugin. Check `wp_head` and `wp_footer` if this plugin do not works for you. **[more information here][3]**
23
-
24
- = Important Links =
25
- * **[Latest FAQs and Help Article][4]**
26
- * **[Support][5]**
27
- * **[Donate][6]**
28
-
29
- PS: For any troubleshooting ask your question in the [BlogSynthesis Forums][7]. I will not be able to provide regular support here.
30
-
31
- [1]: http://www.blogsynthesis.com/google-analytics-to-wordpress/#utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
32
- [2]: http://bit.ly/ClickyWebAnalytics
33
- [3]: http://www.blogsynthesis.com/plugins/header-and-footer-scripts/#FAQs
34
- [4]: http://www.blogsynthesis.com/plugins/header-and-footer-scripts/#utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
35
- [5]: http://my.blogsynthesis.com/forums/#utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
36
- [6]: http://www.blogsynthesis.com/donate/
37
- [7]: http://my.blogsynthesis.com/forums/#utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
38
-
39
- == Installation ==
40
-
41
- Upload the plugin to `/wp-content/plugins` and activate. OR Search "Header and Footer Scripts" from `WP Dashbard --> Plugins --> Add New` then hit Install
42
-
43
- == Screenshots ==
44
- 1. Access this page from `Dashboard --> Settings --> Header and Footer Scripts`
45
- 2. This box will appear below somewhere below on compose window on posts and pages.
46
-
47
- == Frequently Asked Questions ==
48
-
49
- **Q. I need plugin support. Where should I ask questions?**
50
-
51
- A. You may ask support related questions at [BlogSynthesis Forums](http://my.blogsynthesis.com/forums/#utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs). Meanwhile, you should take a look on [this FAQ](http://www.blogsynthesis.com/plugins/header-and-footer-scripts/#utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs) This page will have most latest FAQs (that depends upon what user asks.) Read that article before asking any questions. It may solve your questions and save time.
52
-
53
- **How do I disable the site-wide header and footer injection or the post specific header injection?**
54
-
55
- A. To keep this plugin simple we have not added any such options. You may try another plugin for more or less functionality.
56
-
57
- **Q: I need more functionality. What should I do?**
58
-
59
- A. If you want more functionality then check [Enhanced Header/Footer Scripts](http://bit.ly/wp-ehfi).
60
-
61
- **Q: I need less functionality. What should I do?**
62
-
63
- A. If you are looking for less functionality then check [Insert Header and Footers](http://bit.ly/wpb-ihf) plugin.
64
-
65
- **Q: Is there any paid version of the plugin available?**
66
-
67
- A. No, There is no paid version of this plugin is available.
68
-
69
- == Changelog ==
70
-
71
- = 1.3.2 =
72
- * Fixed https issue
73
-
74
- = 1.1.0 =
75
- * Made for official WordPress Repo.
76
- * Added Single post Header script metabox
77
- * Minor Bug Fixes
78
-
79
- = 1.0.0 =
80
- * Initial Public Release
81
-
82
- == Upgrade Notice ==
 
 
83
  Upgrade for more functionality and bug fixes.
1
+ === Header and Footer Scripts ===
2
+
3
+ Contributors: digitalliberation, anand_kumar, BlogSynthesis
4
+ Donate link: https://digitalliberation.org
5
+ Tags: head, header, footer, scripts, post, admin
6
+ Requires at least: 4.0
7
+ Tested up to: 4.9.1
8
+ Stable tag: 1.3.4
9
+ Requires PHP: 5.2.4
10
+ License: GPLv2 or later
11
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
+
13
+ Header and Footer Scripts plugin enables you to add scripts to WordPress header and footer.
14
+
15
+ == Description ==
16
+
17
+ Many WordPress Themes do not have any options to insert header and footer scripts in your site `<head>` or `<footer>`. It helps you to keep yourself from theme lock. But, sometimes it also causes some pain for many. like where should I insert Google Analytics code (or any other web-analytics codes). This plugin is one stop and lightweight solution for that. With this "Header and Footer Script" plugin will be able to inject HTML tags, JS and CSS codes to `<head>` and `<footer>` easily.
18
+
19
+ = Benefits of the plugin: =
20
+ * You will be able to insert [Google Analytics][1] or other Web-analytics code, meta-informations, CSS and JS codes to `<head>`
21
+ * You will be able to insert html and/or JavaScript codes to footer of your site. Good place for Clicky Web Analytics, Twitter, Facebook or any other social media script.
22
+ * Easily insert codes to single post and page headers, in addition to default codes.
23
+
24
+ Please note, If the plugin is not working check for `wp_head` and `wp_footer` hooks. [more information][3] or [ask for support][7].
25
+
26
+ = Important Links =
27
+ * **[Latest FAQs and Help Article][4]**
28
+ * **[GitHub Repo][8]**
29
+ * **[Support][5]**
30
+ * [Donate][6]
31
+
32
+ PS: For any troubleshooting ask your question in the BlogSynthesis Forums. I can't check WordPress forums regularly.
33
+
34
+ [1]: http://www.blogsynthesis.com/google-analytics-to-wordpress/?utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
35
+ [2]: http://bit.ly/ClickyWebAnalytics
36
+ [3]: http://www.blogsynthesis.com/plugins/header-and-footer-scripts/#FAQs
37
+ [4]: http://www.blogsynthesis.com/plugins/header-and-footer-scripts/?utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
38
+ [5]: https://digitalliberation.org
39
+ [6]: http://www.blogsynthesis.com/donate/
40
+ [7]: https://digitalliberation.org/?utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs
41
+ [8]: https://github.com/anandkumar/header-and-footer-scripts
42
+
43
+ == Installation ==
44
+
45
+ Upload the plugin to `/wp-content/plugins` and activate. OR Search "Header and Footer Scripts" from `WP Dashbard --> Plugins --> Add New` then hit Install
46
+
47
+ == Screenshots ==
48
+ 1. Access this page from `Dashboard --> Settings --> Header and Footer Scripts`
49
+ 2. This box will appear below somewhere below on compose window on posts and pages.
50
+
51
+ == Frequently Asked Questions ==
52
+
53
+ **Q. I need plugin support. Where should I ask questions?**
54
+
55
+ A. You may ask support related questions at [Digital Liberation](https://digitalliberation.org). Meanwhile, you should take a look on [this FAQ](http://www.blogsynthesis.com/plugins/header-and-footer-scripts/?utm_source=wporg&utm_medium=wppluginpage&utm_campaign=wpshfs) This page will have most latest FAQs (that depends upon what user asks.) Read that article before asking any questions. It may solve your questions and save time.
56
+
57
+ **How do I disable the site-wide header and footer injection or the post specific header injection?**
58
+
59
+ A. To keep this plugin simple we have not added any such options. You may try another plugin for more or less functionality.
60
+
61
+ **Q: Is there any paid version of the plugin available?**
62
+
63
+ A. No, There is no paid version of this plugin is available.
64
+
65
+ == Changelog ==
66
+
67
+ = 1.3.4 =
68
+ * Fixed variable undefined notice
69
+
70
+ = 1.3.3 =
71
+ * Started using PHP5 style construct
72
+
73
+ = 1.3.2 =
74
+ * Fixed https issue
75
+
76
+ = 1.1.0 =
77
+ * Made for official WordPress Repo.
78
+ * Added Single post Header script metabox
79
+ * Minor Bug Fixes
80
+
81
+ = 1.0.0 =
82
+ * Initial Public Release
83
+
84
+ == Upgrade Notice ==
85
  Upgrade for more functionality and bug fixes.
shfs.php CHANGED
@@ -3,28 +3,30 @@
3
  Plugin Name: Header and Footer Scripts
4
  Plugin URI: http://www.blogsynthesis.com/plugins/header-and-footer-scripts/
5
  Description: Allows you to insert code or text in the header or footer of your WordPress blog
6
- Version: 1.3.2
7
  Author: Anand Kumar
8
  Author URI: http://www.blogsynthesis.com
9
  License: GPLv2 or later
10
- */
11
 
12
- /* Copyright 2014 Anand Kumar (email : anand@anandkumar.net)
 
 
13
 
14
- This program is free software; you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License, version 2, as
16
- published by the Free Software Foundation.
 
17
 
18
- This program is distributed in the hope that it will be useful,
19
- but WITHOUT ANY WARRANTY; without even the implied warranty of
20
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
- GNU General Public License for more details.
22
 
23
- You should have received a copy of the GNU General Public License
24
- along with this program; if not, write to the Free Software
25
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
 
27
- Credits: WPBeginner (http://bit.ly/wpb-ihf) and Farinspace (http://bit.ly/1m9NzM9)
28
  */
29
 
30
  define('SHFS_PLUGIN_DIR',str_replace('\\','/',dirname(__FILE__)));
@@ -33,7 +35,7 @@ if ( !class_exists( 'HeaderAndFooterScripts' ) ) {
33
 
34
  class HeaderAndFooterScripts {
35
 
36
- function HeaderAndFooterScripts() {
37
 
38
  add_action( 'init', array( &$this, 'init' ) );
39
  add_action( 'admin_init', array( &$this, 'admin_init' ) );
@@ -158,8 +160,7 @@ if ( !class_exists( 'HeaderAndFooterScripts' ) ) {
158
  </div>
159
  <div class="shfs-support" style="padding: 1rem; background: rgba(0, 0, 0, .02);">
160
  <h2>Need Support?</h2>
161
- <p>For any help visit our Support Forums</p>
162
- <p><strong><a href="http://my.blogsynthesis.com/forums/" target="_blank">Support Forums</a></strong></p>
163
  </div>
164
  <div class="shfs-donate" style="padding: 1rem; background: rgba(0, 0, 0, .02);">
165
  <h3>Contribute or Donate!</h3>
@@ -235,8 +236,9 @@ if ( !class_exists( 'HeaderAndFooterScripts' ) ) {
235
  // authentication checks
236
 
237
  // make sure data came from our meta box
238
- if (!wp_verify_nonce($_POST['shfs_post_meta_noncename'],__FILE__)) return $post_id;
239
-
 
240
  // check user permissions
241
  if ($_POST['post_type'] == 'page')
242
  {
3
  Plugin Name: Header and Footer Scripts
4
  Plugin URI: http://www.blogsynthesis.com/plugins/header-and-footer-scripts/
5
  Description: Allows you to insert code or text in the header or footer of your WordPress blog
6
+ Version: 1.3.4
7
  Author: Anand Kumar
8
  Author URI: http://www.blogsynthesis.com
9
  License: GPLv2 or later
 
10
 
11
+ jQuery Smooth Scroll
12
+ Copyright (C) 2013-16, Anand Kumar <anand@anandkumar.net>
13
+ */
14
 
15
+ /*
16
+ This program is free software; you can redistribute it and/or modify
17
+ it under the terms of the GNU General Public License, version 2, as
18
+ published by the Free Software Foundation.
19
 
20
+ This program is distributed in the hope that it will be useful,
21
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
+ GNU General Public License for more details.
24
 
25
+ You should have received a copy of the GNU General Public License
26
+ along with this program; if not, write to the Free Software
27
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
 
29
+ Credits: WPBeginner (http://bit.ly/wpb-ihf) and Farinspace (http://bit.ly/1m9NzM9)
30
  */
31
 
32
  define('SHFS_PLUGIN_DIR',str_replace('\\','/',dirname(__FILE__)));
35
 
36
  class HeaderAndFooterScripts {
37
 
38
+ function __construct() {
39
 
40
  add_action( 'init', array( &$this, 'init' ) );
41
  add_action( 'admin_init', array( &$this, 'admin_init' ) );
160
  </div>
161
  <div class="shfs-support" style="padding: 1rem; background: rgba(0, 0, 0, .02);">
162
  <h2>Need Support?</h2>
163
+ <p>For any help visit our <br /><strong><a href="http://www.blogsynthesis.com/plugins/header-and-footer-scripts/" target="_blank">Plugin Page</a></strong> or<br /><strong><a href="http://www.blogsynthesis.com/support/" target="_blank">Support Page</a></strong></p>
 
164
  </div>
165
  <div class="shfs-donate" style="padding: 1rem; background: rgba(0, 0, 0, .02);">
166
  <h3>Contribute or Donate!</h3>
236
  // authentication checks
237
 
238
  // make sure data came from our meta box
239
+ if ( ! isset( $_POST['shfs_post_meta_noncename'] )
240
+ || !wp_verify_nonce($_POST['shfs_post_meta_noncename'],__FILE__)) return $post_id;
241
+
242
  // check user permissions
243
  if ($_POST['post_type'] == 'page')
244
  {