Insert Headers And Footers - Version 1.2.1

Version Description

  • 2020-12-08
Download this release

Release Info

Developer WPBrigade
Plugin Icon wp plugin Insert Headers And Footers
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2.0 to 1.2.1

classes/plugin-meta.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WordPress Header and Footer plugins meta
4
+ * @since 1.2.1
5
+ */
6
+
7
+ if ( ! class_exists( 'WPHeaderAndFooter_Plugin_Meta' ) ) :
8
+
9
+ class WPHeaderAndFooter_Plugin_Meta {
10
+
11
+ function __construct() {
12
+
13
+ add_filter( 'plugin_row_meta', array( $this, '_row_meta'), 10, 2 );
14
+ add_action( 'plugin_action_links', array( $this, '_action_links' ), 10, 2 );
15
+ }
16
+
17
+ /**
18
+ * Add rating icon on plugins page.
19
+ *
20
+ * @since 1.2.1
21
+ */
22
+
23
+ public function _row_meta( $meta_fields, $file ) {
24
+
25
+ if ( $file != 'wp-headers-and-footers/wp-headers-and-footers.php' ) {
26
+
27
+ return $meta_fields;
28
+ }
29
+
30
+ echo "<style>.wp-headers-and-footers-rate-stars { display: inline-block; color: #ffb900; position: relative; top: 3px; }.wp-headers-and-footers-rate-stars svg{ fill:#ffb900; } .wp-headers-and-footers-rate-stars svg:hover{ fill:#ffb900 } .wp-headers-and-footers-rate-stars svg:hover ~ svg{ fill:none; } </style>";
31
+
32
+ $plugin_rate = "https://wordpress.org/support/plugin/wp-headers-and-footers/reviews/?rate=5#new-post";
33
+ $plugin_filter = "https://wordpress.org/support/plugin/wp-headers-and-footers/reviews/?filter=5";
34
+ $svg_xmlns = "https://www.w3.org/2000/svg";
35
+ $svg_icon = '';
36
+
37
+ for ( $i = 0; $i < 5; $i++ ) {
38
+ $svg_icon .= "<svg xmlns='" . esc_url( $svg_xmlns ) . "' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-star'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>";
39
+ }
40
+
41
+ // Set icon for thumbsup.
42
+ $meta_fields[] = '<a href="' . esc_url( $plugin_filter ) . '" target="_blank"><span class="dashicons dashicons-thumbs-up"></span>' . __( 'Vote!', 'wp-headers-and-footers' ) . '</a>';
43
+
44
+ // Set icon for 5-star reviews. v1.1.22
45
+ $meta_fields[] = "<a href='" . esc_url( $plugin_rate ) . "' target='_blank' title='" . esc_html__( 'Rate', 'wp-headers-and-footers' ) . "'><i class='wp-headers-and-footers-rate-stars'>" . $svg_icon . "</i></a>";
46
+
47
+ return $meta_fields;
48
+ }
49
+
50
+ /**
51
+ * Add a link to the settings page to the plugins list
52
+ *
53
+ * @since 1.2.1
54
+ */
55
+ public function _action_links( $links, $file ) {
56
+
57
+ static $this_plugin;
58
+
59
+ if ( empty( $this_plugin ) ) {
60
+
61
+ $this_plugin = 'wp-headers-and-footers/wp-headers-and-footers.php';
62
+ }
63
+
64
+ if ( $file == $this_plugin ) {
65
+
66
+ $settings_link = sprintf( esc_html__( '%1$s Settings %2$s', 'wp-headers-and-footers' ), '<a href="' . admin_url( 'options-general.php?page=wp-header-and-footer' ) . '">', '</a>' );
67
+
68
+ array_unshift( $links, $settings_link );
69
+
70
+ }
71
+
72
+ return $links;
73
+ }
74
+ }
75
+ endif;
76
+
77
+ new WPHeaderAndFooter_Plugin_Meta();
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
  Contributors: WPBrigade, hiddenpearls, desideveloper
3
  Author URI: https://wpbrigade.com/?utm_source=wphf-org&utm_medium=author-url-link
4
  Donate link: Author URI: https://wpbrigade.com/?utm_source=wphf-org&utm_medium=donate-url-link
5
- Tags: header script, add footer script, insert header code, add script headers and footers,
6
  Requires at least: 5.0
7
  Tested up to: 5.6
8
- Stable tag: 1.2.0
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -13,9 +13,9 @@ Include inline javascript, stylesheets, CSS code or anything you want in Header
13
 
14
  == Description ==
15
 
16
- This is a simple plugin to add inline javascript, stylesheets, CSS code or anything you want in Header and Footer areas of your WordPress with ease.
17
 
18
- It helps for WordPress users to add a JS/CSS code directly in their site without touching their themes.
19
 
20
  == Installation ==
21
 
@@ -45,19 +45,22 @@ It helps for WordPress users to add a JS/CSS code directly in their site without
45
 
46
  == Changelog ==
47
 
48
- = 1.1.1 - 2020-12-07 = //Schedule
 
 
 
 
49
  * Bugfix: Remove PHP 7 deprecated function.
50
 
51
  = 1.1.0 - 2020-03-21 =
52
  * Compatibility : WordPress 5.4
53
  * Enhancement: Dashboard Design updated.
54
 
55
-
56
  = 1.0.0 =
57
  * Initial Release.
58
 
59
 
60
  == Upgrade Notice ==
61
 
62
- = 1.1.0 =
63
- * Started giving life to this plugin now by making it compatible to 5.4
2
  Contributors: WPBrigade, hiddenpearls, desideveloper
3
  Author URI: https://wpbrigade.com/?utm_source=wphf-org&utm_medium=author-url-link
4
  Donate link: Author URI: https://wpbrigade.com/?utm_source=wphf-org&utm_medium=donate-url-link
5
+ Tags: header, footer, code, css, Facebook Pixel
6
  Requires at least: 5.0
7
  Tested up to: 5.6
8
+ Stable tag: 1.2.1
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
13
 
14
  == Description ==
15
 
16
+ This is a simple plugin to add inline javascript, stylesheets, CSS code, or anything you want in the Header and Footer areas of your WordPress with ease.
17
 
18
+ It helps WordPress users to add JS/CSS code directly to their site without touching their themes.
19
 
20
  == Installation ==
21
 
45
 
46
  == Changelog ==
47
 
48
+ = 1.2.1 - 2020-12-08 =
49
+ * Compatibility : WordPress 5.6
50
+ * Bugfix: PHP Error.
51
+
52
+ = 1.2.0 - 2020-12-08 =
53
  * Bugfix: Remove PHP 7 deprecated function.
54
 
55
  = 1.1.0 - 2020-03-21 =
56
  * Compatibility : WordPress 5.4
57
  * Enhancement: Dashboard Design updated.
58
 
 
59
  = 1.0.0 =
60
  * Initial Release.
61
 
62
 
63
  == Upgrade Notice ==
64
 
65
+ = 1.2.1 =
66
+ * Upgrade Immediately.
wp-headers-and-footers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Headers and Footers
4
  * Plugin URI: https://www.WPBrigade.com/wordpress/plugins/wp-headers-and-footers/
5
  * Description: Allows you to insert code or text in the header or footer of your WordPress site.
6
- * Version: 1.2.0
7
  * Author: WPBrigade
8
  * Author URI: https://wpbrigade.com/?utm_source=plugin-meta&utm_medium=author-uri-link
9
  * License: GPLv3
@@ -23,7 +23,7 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
23
  /**
24
  * @var string
25
  */
26
- public $version = '1.2.0';
27
 
28
  /**
29
  * @var The single instance of the class
@@ -51,6 +51,7 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
51
  public function includes() {
52
 
53
  include_once WPHEADERANDFOOTER_DIR_PATH . 'classes/class-setup.php';
 
54
  }
55
 
56
  /**
@@ -164,6 +165,7 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
164
  echo wp_unslash( $meta );
165
 
166
  }
 
167
  }
168
 
169
  endif;
3
  * Plugin Name: WP Headers and Footers
4
  * Plugin URI: https://www.WPBrigade.com/wordpress/plugins/wp-headers-and-footers/
5
  * Description: Allows you to insert code or text in the header or footer of your WordPress site.
6
+ * Version: 1.2.1
7
  * Author: WPBrigade
8
  * Author URI: https://wpbrigade.com/?utm_source=plugin-meta&utm_medium=author-uri-link
9
  * License: GPLv3
23
  /**
24
  * @var string
25
  */
26
+ public $version = '1.2.1';
27
 
28
  /**
29
  * @var The single instance of the class
51
  public function includes() {
52
 
53
  include_once WPHEADERANDFOOTER_DIR_PATH . 'classes/class-setup.php';
54
+ include_once WPHEADERANDFOOTER_DIR_PATH . 'classes/plugin-meta.php';
55
  }
56
 
57
  /**
165
  echo wp_unslash( $meta );
166
 
167
  }
168
+
169
  }
170
 
171
  endif;