Version Description
- 2021-04-04
- Compatibility : WordPress 5.7
- Compatibility : PHP 8.0
- Enhancement : Code Optimization.
Download this release
Release Info
Developer | WPBrigade |
Plugin | Insert Headers And Footers |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- classes/class-settings-api.php +53 -18
- readme.txt +8 -4
- wp-headers-and-footers.php +2 -2
classes/class-settings-api.php
CHANGED
@@ -145,15 +145,6 @@ if ( ! class_exists( 'WPHeaderAndFooter_Settings_API' ) ) :
|
|
145 |
register_setting( $section['id'], $section['id'], array( $this, 'sanitize_options' ) );
|
146 |
}
|
147 |
}
|
148 |
-
/**
|
149 |
-
* Get Section Description
|
150 |
-
* @param string $desc [description]
|
151 |
-
*
|
152 |
-
* @since 1.1.1
|
153 |
-
*/
|
154 |
-
function get_description( $desc ) {
|
155 |
-
return $desc;
|
156 |
-
}
|
157 |
|
158 |
/**
|
159 |
* Get field description for display
|
@@ -517,7 +508,7 @@ if ( ! class_exists( 'WPHeaderAndFooter_Settings_API' ) ) :
|
|
517 |
<?php
|
518 |
do_action( 'wsa_form_top_' . $form['id'], $form );
|
519 |
settings_fields( $form['id'] );
|
520 |
-
do_settings_sections( $form['id'] );
|
521 |
do_action( 'wsa_form_bottom_' . $form['id'], $form );
|
522 |
if ( isset( $this->settings_fields[ $form['id'] ] ) ) :
|
523 |
?>
|
@@ -534,14 +525,21 @@ if ( ! class_exists( 'WPHeaderAndFooter_Settings_API' ) ) :
|
|
534 |
<h2> <span class="dashicons dashicons-share"></span> <?php esc_html_e( 'Spread the Word', 'wp-header-and-footer' ); ?></h2>
|
535 |
<ul>
|
536 |
<li>
|
537 |
-
<a href="http://twitter.com/share?text=This is Best header and footer code JS and CSS insert plugin without touching theme files;url=https://wordpress.org/plugins/wp-headers-and-footers/" data-count="none" class="button twitter" target="_blank" title="<?php esc_html_e( 'Post to Twitter Now', 'wp-header-and-footer' ); ?>"
|
|
|
|
|
|
|
538 |
</li>
|
539 |
<li>
|
540 |
-
<a href="https://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/plugins/wp-headers-and-footers/" class="button facebook" target="_blank" title="<?php esc_html_e( 'Share with your facebook friends about this awesome plugin', 'wp-header-and-footer' ); ?>"
|
|
|
|
|
541 |
</a>
|
542 |
</li>
|
543 |
<li>
|
544 |
-
<a href="https://wordpress.org/support/plugin/wp-headers-and-footers/reviews/#new-post" class="button wordpress" target="_blank" title="Rate on WordPress.org"
|
|
|
|
|
545 |
</a>
|
546 |
</li>
|
547 |
</ul>
|
@@ -551,20 +549,25 @@ if ( ! class_exists( 'WPHeaderAndFooter_Settings_API' ) ) :
|
|
551 |
<!-- <p>Following are the plugins highly recommend by Team WPBrigade.</p> -->
|
552 |
<ul class="plugins_lists">
|
553 |
<li>
|
554 |
-
<a href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" data-count="none" target="_blank" title="<?php esc_html_e( 'Customize your login screen', 'wp-header-and-footer' ); ?>">
|
|
|
|
|
555 |
</li>
|
556 |
|
557 |
<li>
|
558 |
-
<a href="https://analytify.io/ref/73/?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Share with your facebook friends about this awesome plugin.', 'wp-header-and-footer' ); ?>">
|
|
|
559 |
</a>
|
560 |
</li>
|
561 |
|
562 |
<li>
|
563 |
-
<a href="https://simplesocialbuttons.com?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Socialize your Website', 'wp-header-and-footer' ); ?>">
|
|
|
564 |
</a>
|
565 |
</li>
|
566 |
-
|
567 |
-
<a href="http://wpbrigade.com/recommend/maintenance-mode?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Socialize your Website', 'wp-header-and-footer' ); ?>">
|
|
|
568 |
</a>
|
569 |
</li>
|
570 |
</ul>
|
@@ -668,6 +671,38 @@ if ( ! class_exists( 'WPHeaderAndFooter_Settings_API' ) ) :
|
|
668 |
endif;
|
669 |
}
|
670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
}
|
672 |
|
673 |
endif;
|
145 |
register_setting( $section['id'], $section['id'], array( $this, 'sanitize_options' ) );
|
146 |
}
|
147 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
/**
|
150 |
* Get field description for display
|
508 |
<?php
|
509 |
do_action( 'wsa_form_top_' . $form['id'], $form );
|
510 |
settings_fields( $form['id'] );
|
511 |
+
$this->do_settings_sections( $form['id'] );
|
512 |
do_action( 'wsa_form_bottom_' . $form['id'], $form );
|
513 |
if ( isset( $this->settings_fields[ $form['id'] ] ) ) :
|
514 |
?>
|
525 |
<h2> <span class="dashicons dashicons-share"></span> <?php esc_html_e( 'Spread the Word', 'wp-header-and-footer' ); ?></h2>
|
526 |
<ul>
|
527 |
<li>
|
528 |
+
<a href="http://twitter.com/share?text=This is Best header and footer code JS and CSS insert plugin without touching theme files;url=https://wordpress.org/plugins/wp-headers-and-footers/" data-count="none" class="button twitter" target="_blank" title="<?php esc_html_e( 'Post to Twitter Now', 'wp-header-and-footer' ); ?>">
|
529 |
+
<?php esc_html_e( 'Share on Twitter', 'wp-header-and-footer' ); ?>
|
530 |
+
<span class="dashicons dashicons-twitter"></span>
|
531 |
+
</a>
|
532 |
</li>
|
533 |
<li>
|
534 |
+
<a href="https://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/plugins/wp-headers-and-footers/" class="button facebook" target="_blank" title="<?php esc_html_e( 'Share with your facebook friends about this awesome plugin', 'wp-header-and-footer' ); ?>">
|
535 |
+
<?php esc_html_e( 'Share on Facebook', 'wp-header-and-footer' ); ?>
|
536 |
+
<span class="dashicons dashicons-facebook"></span>
|
537 |
</a>
|
538 |
</li>
|
539 |
<li>
|
540 |
+
<a href="https://wordpress.org/support/plugin/wp-headers-and-footers/reviews/#new-post" class="button wordpress" target="_blank" title="Rate on WordPress.org">
|
541 |
+
<?php esc_html_e( 'Rate on WordPress.org', 'wp-header-and-footer' ); ?>
|
542 |
+
<span class="dashicons dashicons-wordpress"></span>
|
543 |
</a>
|
544 |
</li>
|
545 |
</ul>
|
549 |
<!-- <p>Following are the plugins highly recommend by Team WPBrigade.</p> -->
|
550 |
<ul class="plugins_lists">
|
551 |
<li>
|
552 |
+
<a href="https://wpbrigade.com/wordpress/plugins/loginpress-pro/?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" data-count="none" target="_blank" title="<?php esc_html_e( 'Customize your login screen', 'wp-header-and-footer' ); ?>">
|
553 |
+
<?php esc_html_e( 'LoginPress - Login Customizer', 'wp-header-and-footer' ) ?>
|
554 |
+
</a>
|
555 |
</li>
|
556 |
|
557 |
<li>
|
558 |
+
<a href="https://analytify.io/ref/73/?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Share with your facebook friends about this awesome plugin.', 'wp-header-and-footer' ); ?>">
|
559 |
+
<?php esc_html_e( 'Google Analytics by Analytify', 'wp-header-and-footer' ) ?>
|
560 |
</a>
|
561 |
</li>
|
562 |
|
563 |
<li>
|
564 |
+
<a href="https://simplesocialbuttons.com?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Socialize your Website', 'wp-header-and-footer' ); ?>">
|
565 |
+
<?php esc_html_e( 'Simple Social Buttons', 'wp-header-and-footer' ) ?>
|
566 |
</a>
|
567 |
</li>
|
568 |
+
<li>
|
569 |
+
<a href="http://wpbrigade.com/recommend/maintenance-mode?utm_source=wp-header-and-footer&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Socialize your Website', 'wp-header-and-footer' ); ?>">
|
570 |
+
<?php esc_html_e( 'Under Construction & Maintenance mode', 'wp-header-and-footer' ) ?>
|
571 |
</a>
|
572 |
</li>
|
573 |
</ul>
|
671 |
endif;
|
672 |
}
|
673 |
|
674 |
+
/**
|
675 |
+
* Get Section Description
|
676 |
+
* @param string $desc [description]
|
677 |
+
*
|
678 |
+
* @since 1.2.0
|
679 |
+
*/
|
680 |
+
function get_description( $desc ) {
|
681 |
+
return $desc;
|
682 |
+
}
|
683 |
+
|
684 |
+
/**
|
685 |
+
* Prints out all settings sections added to a particular settings page
|
686 |
+
*
|
687 |
+
* @since 1.2.1
|
688 |
+
*/
|
689 |
+
function do_settings_sections( $page ) {
|
690 |
+
global $wp_settings_sections, $wp_settings_fields;
|
691 |
+
|
692 |
+
if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) )
|
693 |
+
return;
|
694 |
+
|
695 |
+
foreach ( (array) $wp_settings_sections[$page] as $section ) {
|
696 |
+
echo "<h3>{$section['title']}</h3>\n";
|
697 |
+
echo $section['callback'] ;
|
698 |
+
if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) )
|
699 |
+
continue;
|
700 |
+
echo '<table class="form-table">';
|
701 |
+
do_settings_fields($page, $section['id']);
|
702 |
+
echo '</table>';
|
703 |
+
}
|
704 |
+
}
|
705 |
+
|
706 |
}
|
707 |
|
708 |
endif;
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
===
|
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.
|
8 |
-
Stable tag: 1.2.
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -44,6 +44,10 @@ It helps for WordPress users to add a JS/CSS code directly in their site without
|
|
44 |
|
45 |
|
46 |
== Changelog ==
|
|
|
|
|
|
|
|
|
47 |
|
48 |
= 1.2.1 - 2020-12-08 =
|
49 |
* Compatibility : WordPress 5.6
|
@@ -62,5 +66,5 @@ It helps for WordPress users to add a JS/CSS code directly in their site without
|
|
62 |
|
63 |
== Upgrade Notice ==
|
64 |
|
65 |
-
= 1.2.
|
66 |
* Upgrade Immediately.
|
1 |
+
=== Insert Headers and Footers ===
|
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.7
|
8 |
+
Stable tag: 1.2.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
44 |
|
45 |
|
46 |
== Changelog ==
|
47 |
+
= 1.2.2 - 2021-04-04
|
48 |
+
* Compatibility : WordPress 5.7
|
49 |
+
* Compatibility : PHP 8.0
|
50 |
+
* Enhancement : Code Optimization.
|
51 |
|
52 |
= 1.2.1 - 2020-12-08 =
|
53 |
* Compatibility : WordPress 5.6
|
66 |
|
67 |
== Upgrade Notice ==
|
68 |
|
69 |
+
= 1.2.2 =
|
70 |
* 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.
|
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.
|
27 |
|
28 |
/**
|
29 |
* @var The single instance of the class
|
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.2
|
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.2';
|
27 |
|
28 |
/**
|
29 |
* @var The single instance of the class
|