Head, Footer and Post Injections - Version 3.0.1

Version Description

  • Fixed an error on menu
  • Added the subscription box
  • Fixed CSS and JS in admin panel
Download this release

Release Info

Developer satollo
Plugin Icon wp plugin Head, Footer and Post Injections
Version 3.0.1
Comparing to
See all releases

Code changes from version 3.0.0 to 3.0.1

Files changed (4) hide show
  1. admin.css +11 -0
  2. admin.php +4 -12
  3. options.php +18 -8
  4. readme.txt +7 -1
admin.css CHANGED
@@ -24,6 +24,17 @@ h3 {
24
  font-family: Consolas,Monaco,monospace;
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
27
  .CodeMirror {
28
  border: 1px solid #eee;
29
  height: 200px;
24
  font-family: Consolas,Monaco,monospace;
25
  }
26
 
27
+ .notice {
28
+ position: relative;
29
+ }
30
+ .hefo-dismiss {
31
+ position: absolute;
32
+ top: 0px;
33
+ right: 10px;
34
+ text-decoration: none;
35
+ font-size: 20px;
36
+ }
37
+
38
  .CodeMirror {
39
  border: 1px solid #eee;
40
  height: 200px;
admin.php CHANGED
@@ -12,6 +12,9 @@ function hefo_admin_init() {
12
  wp_enqueue_script('media-upload');
13
  wp_enqueue_script('thickbox');
14
  wp_enqueue_style('thickbox');
 
 
 
15
  }
16
 
17
  if (isset($hefo_options['page_add_tags'])) {
@@ -23,22 +26,11 @@ function hefo_admin_init() {
23
  }
24
  }
25
 
26
- add_action('admin_head', 'hefo_admin_head');
27
-
28
- function hefo_admin_head() {
29
- // if (isset($_GET['page']) && strpos($_GET['page'], 'header-footer/') === 0) {
30
- // echo '<link type="text/css" rel="stylesheet" href="' .
31
- // get_option('siteurl') . '/wp-content/plugins/header-footer/admin.css"/>';
32
- // }
33
- }
34
-
35
  add_action('admin_menu', 'hefo_admin_menu');
36
 
37
  function hefo_admin_menu() {
38
  add_options_page('Header and Footer', 'Header and Footer', 'manage_options', 'header-footer/options.php');
39
- add_options_page('HF Index', 'HF Index', 'manage_options', 'header-footer/index.php');
40
- add_submenu_page(null, 'AMP', 'AMP', 'manage_options', 'header-footer/amp.php');
41
- add_submenu_page(null, 'Posts', 'Posts', 'manage_options', 'header-footer/posts.php');
42
  }
43
 
44
  add_action('add_meta_boxes', 'hefo_add_meta_boxes');
12
  wp_enqueue_script('media-upload');
13
  wp_enqueue_script('thickbox');
14
  wp_enqueue_style('thickbox');
15
+ wp_enqueue_style('header-footer', plugins_url('header-footer') . '/admin.css', array(), time());
16
+ wp_enqueue_style('header-footer-tabs', plugins_url('header-footer') . '/lib/easytabs/tabs.css', array(), time());
17
+ wp_enqueue_script('header-footer-tabs', plugins_url('header-footer') . '/lib/easytabs/jquery.easytabs.min.js', array(), time());
18
  }
19
 
20
  if (isset($hefo_options['page_add_tags'])) {
26
  }
27
  }
28
 
 
 
 
 
 
 
 
 
 
29
  add_action('admin_menu', 'hefo_admin_menu');
30
 
31
  function hefo_admin_menu() {
32
  add_options_page('Header and Footer', 'Header and Footer', 'manage_options', 'header-footer/options.php');
33
+
 
 
34
  }
35
 
36
  add_action('add_meta_boxes', 'hefo_add_meta_boxes');
options.php CHANGED
@@ -277,10 +277,6 @@ else {
277
  });
278
  </script>
279
 
280
- <link rel="stylesheet" href="<?php echo plugins_url('header-footer') ?>/lib/easytabs/tabs.css">
281
- <link rel="stylesheet" href="<?php echo plugins_url('header-footer') ?>/admin.css">
282
-
283
- <script src="<?php echo plugins_url('header-footer') ?>/lib/easytabs/jquery.easytabs.min.js"></script>
284
  <script>
285
  var hefo_cm;
286
 
@@ -311,7 +307,7 @@ else {
311
  <div class="notice notice-success"><p>
312
  I never asked before and I'm curious: <a href="http://wordpress.org/extend/plugins/header-footer/" target="_blank"><strong>would you rate this plugin</strong></a>?
313
  (takes only few seconds required - account on WordPress.org, every blog owner should have one...). <strong>Really appreciated, Stefano</strong>.
314
- <a href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=rate&noheader=1') ?>">Dismiss</a>
315
  </p>
316
  </div>
317
  <?php } ?>
@@ -320,7 +316,7 @@ else {
320
  <div class="notice notice-error"><p>
321
  The Facebook open graph metatag are no more supported. Please install a specialized plugin, you can find many on wordpress.org/plugins.
322
  The configuration panel is kept so you can get the original configurations.
323
- <a href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=og&noheader=1') ?>">Dismiss</a>
324
  </p>
325
  </div>
326
  <?php } ?>
@@ -329,10 +325,24 @@ else {
329
  <div class="notice notice-warning"><p>
330
  bbPress injections will be removed on future versions. Please use <a href="https://wordpresss.org/plugins/ads-bbpress" target="_blank">Ads for bbPress</a>
331
  instead, thank you. It's mine, it's free.
332
- <a href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=bbpress&noheader=1') ?>">Dismiss</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  </p>
334
  </div>
335
- <?php } ?>
336
 
337
  <div style="padding: 15px; background-color: #fff; border: 1px solid #eee; font-size: 16px; line-height: 22px">
338
  Did this plugin save you lot of time and troubles?
277
  });
278
  </script>
279
 
 
 
 
 
280
  <script>
281
  var hefo_cm;
282
 
307
  <div class="notice notice-success"><p>
308
  I never asked before and I'm curious: <a href="http://wordpress.org/extend/plugins/header-footer/" target="_blank"><strong>would you rate this plugin</strong></a>?
309
  (takes only few seconds required - account on WordPress.org, every blog owner should have one...). <strong>Really appreciated, Stefano</strong>.
310
+ <a class="hefo-dismiss" href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=rate&noheader=1') ?>">&times;</a>
311
  </p>
312
  </div>
313
  <?php } ?>
316
  <div class="notice notice-error"><p>
317
  The Facebook open graph metatag are no more supported. Please install a specialized plugin, you can find many on wordpress.org/plugins.
318
  The configuration panel is kept so you can get the original configurations.
319
+ <a class="hefo-dismiss" href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=og&noheader=1') ?>">&times;</a>
320
  </p>
321
  </div>
322
  <?php } ?>
325
  <div class="notice notice-warning"><p>
326
  bbPress injections will be removed on future versions. Please use <a href="https://wordpresss.org/plugins/ads-bbpress" target="_blank">Ads for bbPress</a>
327
  instead, thank you. It's mine, it's free.
328
+ <a class="hefo-dismiss" href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=bbpress&noheader=1') ?>">&times;</a>
329
+ </p>
330
+ </div>
331
+ <?php } ?>
332
+
333
+ <?php if (!isset($dismissed['newsletter'])) { ?>
334
+ <div class="notice notice-success"><p>
335
+ If you want to be informed of important updated of this plugin, you may want to subscribe to my (rare) newsletter<br>
336
+ <form action="http://www.satollo.net/?na=s" target="_blank" method="post">
337
+ <input type="hidden" value="header-footer" name="nr">
338
+ <input type="hidden" value="2" name="nl[]">
339
+ <input type="email" name="ne" value="<?php echo esc_attr(get_option('admin_email'))?>">
340
+ <input type="submit" value="Subscribe">
341
+ </form>
342
+ <a class="hefo-dismiss" href="<?php echo wp_nonce_url($_SERVER['REQUEST_URI'] . '&dismiss=newsletter&noheader=1') ?>">&times;</a>
343
  </p>
344
  </div>
345
+ <?php } ?>
346
 
347
  <div style="padding: 15px; background-color: #fff; border: 1px solid #eee; font-size: 16px; line-height: 22px">
348
  Did this plugin save you lot of time and troubles?
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: header, footer, blog, page, single, post, head, tracking, facebook, og meta tag, open graph, ads, adsense, injections, analytics, amp
3
  Requires at least: 3.0
4
  Tested up to: 4.7.2
5
- Stable tag: 3.0.0
6
  Donate link: http://www.satollo.net/donations
7
  Contributors: satollo
8
 
@@ -91,6 +91,12 @@ FAQs are answered on [Header and Footer](http://www.satollo.net/plugins/header-f
91
 
92
  == Changelog ==
93
 
 
 
 
 
 
 
94
  = 3.0.0 =
95
 
96
  * Start adding support for amp and [amp plugin](https://wordpress.org/plugins/amp/)
2
  Tags: header, footer, blog, page, single, post, head, tracking, facebook, og meta tag, open graph, ads, adsense, injections, analytics, amp
3
  Requires at least: 3.0
4
  Tested up to: 4.7.2
5
+ Stable tag: 3.0.1
6
  Donate link: http://www.satollo.net/donations
7
  Contributors: satollo
8
 
91
 
92
  == Changelog ==
93
 
94
+ = 3.0.1 =
95
+
96
+ * Fixed an error on menu
97
+ * Added the subscription box
98
+ * Fixed CSS and JS in admin panel
99
+
100
  = 3.0.0 =
101
 
102
  * Start adding support for amp and [amp plugin](https://wordpress.org/plugins/amp/)