Version Description
- 2021-06-05
- New Feature: Introducing Code Editor for writing scripts.
- Bugfix: Plugin language domain updated to 'wp-headers-and-footers'
- Enhancement: Dashboard design updated.
- Enhancement : Code Optimization.
- Compatibility : WordPress 5.7
Download this release
Release Info
Developer | WPBrigade |
Plugin | Insert Headers And Footers |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.3.0
- asset/css/style.css +66 -51
- asset/js/script.js +7 -0
- classes/class-settings-api.php +15 -15
- classes/class-setup.php +17 -8
- classes/plugin-meta.php +1 -1
- languages/wp-headers-and-footers.pot +149 -0
- readme.txt +47 -9
- wp-headers-and-footers.php +48 -5
asset/css/style.css
CHANGED
@@ -1,72 +1,87 @@
|
|
1 |
-
.wp-
|
2 |
-
|
3 |
}
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
6 |
}
|
7 |
|
8 |
|
9 |
/*--Side bar style--*/
|
|
|
10 |
.header-and-footer-setting {
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
}
|
16 |
|
17 |
-
.wp-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
}
|
23 |
-
|
24 |
-
|
|
|
25 |
}
|
26 |
|
27 |
-
.wp-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
}
|
34 |
-
|
35 |
-
|
|
|
36 |
}
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
}
|
42 |
-
|
43 |
-
|
|
|
44 |
}
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
}
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
53 |
}
|
54 |
-
|
55 |
-
|
|
|
56 |
}
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
62 |
}
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
69 |
}
|
70 |
-
|
71 |
-
|
|
|
72 |
}
|
1 |
+
.wp-headers-and-footers .group h3 {
|
2 |
+
display: none;
|
3 |
}
|
4 |
+
|
5 |
+
.wp-headers-and-footers textarea {
|
6 |
+
width: 35em;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wp_header_textarea .CodeMirror, .wp_body_textarea .CodeMirror, .wp_footer_textarea .CodeMirror {
|
10 |
+
border: 1px solid #ccd0d4;
|
11 |
}
|
12 |
|
13 |
|
14 |
/*--Side bar style--*/
|
15 |
+
|
16 |
.header-and-footer-setting {
|
17 |
+
width: calc( 100% - 325px);
|
18 |
+
float: left;
|
19 |
+
padding-right: 30px;
|
20 |
+
padding-top: 30px;
|
21 |
}
|
22 |
|
23 |
+
.wp-headers-and-footers .wpbr-sidebar {
|
24 |
+
padding-top: 30px;
|
25 |
+
width: 295px;
|
26 |
+
float: right;
|
27 |
+
box-sizing: border-box;
|
28 |
}
|
29 |
+
|
30 |
+
.wp-headers-and-footers .postbox {
|
31 |
+
padding: 0 10px 10px 10px;
|
32 |
}
|
33 |
|
34 |
+
.wp-headers-and-footers .wpbr-sidebar h2 {
|
35 |
+
margin: 0;
|
36 |
+
padding: 10px 10px 10px 30px;
|
37 |
+
border-bottom: 1px solid #000;
|
38 |
+
color: #000;
|
|
|
39 |
}
|
40 |
+
|
41 |
+
.wp-headers-and-footers .wpbr-sidebar ul.plugins_lists li {
|
42 |
+
padding-left: 10px;
|
43 |
}
|
44 |
+
|
45 |
+
.wp-headers-and-footers .wpbr-sidebar ul li a {
|
46 |
+
width: 100%;
|
47 |
+
display: block;
|
48 |
+
position: relative;
|
49 |
}
|
50 |
+
|
51 |
+
.wp-headers-and-footers .wpbr-sidebar ul li a:hover {
|
52 |
+
text-decoration: underline;
|
53 |
}
|
54 |
+
|
55 |
+
.wp-headers-and-footers .wpbr-sidebar .dashicons {
|
56 |
+
position: absolute;
|
57 |
+
right: 10px;
|
58 |
+
margin-top: 3px;
|
59 |
}
|
60 |
+
|
61 |
+
.wp-headers-and-footers .wpbr-sidebar .button {
|
62 |
+
color: #000;
|
63 |
+
border-color: transparent;
|
64 |
}
|
65 |
+
|
66 |
+
.wp-headers-and-footers .wpbr-sidebar .button:hover {
|
67 |
+
border-color: #000;
|
68 |
}
|
69 |
+
|
70 |
+
.wp-headers-and-footers .wpbr-sidebar h2 .dashicons {
|
71 |
+
position: absolute;
|
72 |
+
left: 10px;
|
73 |
+
top: 5px;
|
74 |
+
font-size: 23px;
|
75 |
}
|
76 |
+
|
77 |
+
.wp-headers-and-footers .plugins_lists a {
|
78 |
+
color: #000;
|
79 |
+
font-size: 14px;
|
80 |
+
text-decoration: none;
|
81 |
+
font-weight: 600;
|
82 |
+
margin-bottom: 10px;
|
83 |
}
|
84 |
+
|
85 |
+
.wp-headers-and-footers .plugins_lists a:hover {
|
86 |
+
text-decoration: underline;
|
87 |
}
|
asset/js/script.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
$(window).on('load', function() {
|
3 |
+
wp.codeEditor.initialize($('[id="wpheaderandfooter_basics[wp_header_textarea]"]'));
|
4 |
+
wp.codeEditor.initialize($('[id="wpheaderandfooter_basics[wp_body_textarea]"]'));
|
5 |
+
wp.codeEditor.initialize($('[id="wpheaderandfooter_basics[wp_footer_textarea]"]'));
|
6 |
+
});
|
7 |
+
})(jQuery);
|
classes/class-settings-api.php
CHANGED
@@ -522,52 +522,52 @@ if ( ! class_exists( 'WPHeaderAndFooter_Settings_API' ) ) :
|
|
522 |
</div>
|
523 |
<div class="wpbr-sidebar">
|
524 |
<div class="sidebar postbox">
|
525 |
-
<h2> <span class="dashicons dashicons-share"></span> <?php esc_html_e( 'Spread the Word', 'wp-
|
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-
|
529 |
-
<?php esc_html_e( 'Share on Twitter', 'wp-
|
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-
|
535 |
-
<?php esc_html_e( 'Share on Facebook', 'wp-
|
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-
|
542 |
<span class="dashicons dashicons-wordpress"></span>
|
543 |
</a>
|
544 |
</li>
|
545 |
</ul>
|
546 |
</div>
|
547 |
<div class="sidebar postbox">
|
548 |
-
<h2><span class="dashicons dashicons-share-alt"> </span><?php esc_html_e( 'Recommended Plugins', 'wp-
|
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-
|
553 |
-
<?php esc_html_e( 'LoginPress - Login Customizer', 'wp-
|
554 |
</a>
|
555 |
</li>
|
556 |
|
557 |
<li>
|
558 |
-
<a href="https://analytify.io/ref/73/?utm_source=wp-
|
559 |
-
<?php esc_html_e( 'Google Analytics by Analytify', 'wp-
|
560 |
</a>
|
561 |
</li>
|
562 |
|
563 |
<li>
|
564 |
-
<a href="https://simplesocialbuttons.com?utm_source=wp-
|
565 |
-
<?php esc_html_e( 'Simple Social Buttons', 'wp-
|
566 |
</a>
|
567 |
</li>
|
568 |
<li>
|
569 |
-
<a href="http://wpbrigade.com/recommend/maintenance-mode?utm_source=wp-
|
570 |
-
<?php esc_html_e( 'Under Construction & Maintenance mode', 'wp-
|
571 |
</a>
|
572 |
</li>
|
573 |
</ul>
|
522 |
</div>
|
523 |
<div class="wpbr-sidebar">
|
524 |
<div class="sidebar postbox">
|
525 |
+
<h2> <span class="dashicons dashicons-share"></span> <?php esc_html_e( 'Spread the Word', 'wp-headers-and-footers' ); ?></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-headers-and-footers' ); ?>">
|
529 |
+
<?php esc_html_e( 'Share on Twitter', 'wp-headers-and-footers' ); ?>
|
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-headers-and-footers' ); ?>">
|
535 |
+
<?php esc_html_e( 'Share on Facebook', 'wp-headers-and-footers' ); ?>
|
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-headers-and-footers' ); ?>
|
542 |
<span class="dashicons dashicons-wordpress"></span>
|
543 |
</a>
|
544 |
</li>
|
545 |
</ul>
|
546 |
</div>
|
547 |
<div class="sidebar postbox">
|
548 |
+
<h2><span class="dashicons dashicons-share-alt"> </span><?php esc_html_e( 'Recommended Plugins', 'wp-headers-and-footers' ); ?></h2>
|
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-headers-and-footers&utm_medium=sidebar&utm_campaign=pro-upgrade" data-count="none" target="_blank" title="<?php esc_html_e( 'Customize your login screen', 'wp-headers-and-footers' ); ?>">
|
553 |
+
<?php esc_html_e( 'LoginPress - Login Customizer', 'wp-headers-and-footers' ) ?>
|
554 |
</a>
|
555 |
</li>
|
556 |
|
557 |
<li>
|
558 |
+
<a href="https://analytify.io/ref/73/?utm_source=wp-headers-and-footers&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Share with your facebook friends about this awesome plugin.', 'wp-headers-and-footers' ); ?>">
|
559 |
+
<?php esc_html_e( 'Google Analytics by Analytify', 'wp-headers-and-footers' ) ?>
|
560 |
</a>
|
561 |
</li>
|
562 |
|
563 |
<li>
|
564 |
+
<a href="https://simplesocialbuttons.com?utm_source=wp-headers-and-footers&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Socialize your Website', 'wp-headers-and-footers' ); ?>">
|
565 |
+
<?php esc_html_e( 'Simple Social Buttons', 'wp-headers-and-footers' ) ?>
|
566 |
</a>
|
567 |
</li>
|
568 |
<li>
|
569 |
+
<a href="http://wpbrigade.com/recommend/maintenance-mode?utm_source=wp-headers-and-footers&utm_medium=sidebar&utm_campaign=pro-upgrade" target="_blank" title="<?php esc_html_e( 'Socialize your Website', 'wp-headers-and-footers' ); ?>">
|
570 |
+
<?php esc_html_e( 'Under Construction & Maintenance mode', 'wp-headers-and-footers' ) ?>
|
571 |
</a>
|
572 |
</li>
|
573 |
</ul>
|
classes/class-setup.php
CHANGED
@@ -32,15 +32,15 @@ if ( ! class_exists( 'WPHeaderAndFooter_Setting' ) ) :
|
|
32 |
*/
|
33 |
function register_options_page() {
|
34 |
|
35 |
-
add_submenu_page( 'options-general.php', __( 'WP Headers and Footers', 'wp-
|
36 |
}
|
37 |
|
38 |
function get_settings_sections() {
|
39 |
$sections = array(
|
40 |
array(
|
41 |
'id' => 'wpheaderandfooter_basics',
|
42 |
-
'title' => __( 'Settings', 'wp-
|
43 |
-
'desc' => __( 'WP Headers and Footers.', 'wp-
|
44 |
),
|
45 |
);
|
46 |
return $sections;
|
@@ -49,6 +49,9 @@ if ( ! class_exists( 'WPHeaderAndFooter_Setting' ) ) :
|
|
49 |
/**
|
50 |
* Returns all the settings fields
|
51 |
*
|
|
|
|
|
|
|
52 |
* @return array settings fields
|
53 |
*/
|
54 |
function get_settings_fields() {
|
@@ -56,14 +59,20 @@ if ( ! class_exists( 'WPHeaderAndFooter_Setting' ) ) :
|
|
56 |
'wpheaderandfooter_basics' => array(
|
57 |
array(
|
58 |
'name' => 'wp_header_textarea',
|
59 |
-
'label' => __( 'Scripts in Header', 'wp-
|
60 |
-
'desc' => sprintf( __( 'These scripts will be printed in the %1$s
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
'type' => 'textarea',
|
62 |
),
|
63 |
array(
|
64 |
'name' => 'wp_footer_textarea',
|
65 |
-
'label' => __( 'Scripts in Footer', 'wp-
|
66 |
-
'desc' => sprintf( __( 'These scripts will be printed
|
67 |
'type' => 'textarea',
|
68 |
),
|
69 |
),
|
@@ -73,7 +82,7 @@ if ( ! class_exists( 'WPHeaderAndFooter_Setting' ) ) :
|
|
73 |
}
|
74 |
|
75 |
function wp_header_and_footer_callback() {
|
76 |
-
echo '<div class="wrap wp-
|
77 |
|
78 |
$this->settings_api->show_navigation();
|
79 |
$this->settings_api->show_forms();
|
32 |
*/
|
33 |
function register_options_page() {
|
34 |
|
35 |
+
add_submenu_page( 'options-general.php', __( 'WP Headers and Footers', 'wp-headers-and-footers' ), __( 'WP Headers and Footers', 'wp-headers-and-footers' ), 'manage_options', 'wp-headers-and-footers', array( $this, 'wp_header_and_footer_callback' ) );
|
36 |
}
|
37 |
|
38 |
function get_settings_sections() {
|
39 |
$sections = array(
|
40 |
array(
|
41 |
'id' => 'wpheaderandfooter_basics',
|
42 |
+
'title' => __( 'Settings', 'wp-headers-and-footers' ),
|
43 |
+
'desc' => __( 'WP Headers and Footers.', 'wp-headers-and-footers' ),
|
44 |
),
|
45 |
);
|
46 |
return $sections;
|
49 |
/**
|
50 |
* Returns all the settings fields
|
51 |
*
|
52 |
+
* @since 1.0.0
|
53 |
+
* @version 1.2.3
|
54 |
+
*
|
55 |
* @return array settings fields
|
56 |
*/
|
57 |
function get_settings_fields() {
|
59 |
'wpheaderandfooter_basics' => array(
|
60 |
array(
|
61 |
'name' => 'wp_header_textarea',
|
62 |
+
'label' => __( 'Scripts in Header', 'wp-headers-and-footers' ),
|
63 |
+
'desc' => sprintf( __( 'These scripts will be printed in the %1$s section.', 'wp-headers-and-footers' ), '<head>' ),
|
64 |
+
'type' => 'textarea',
|
65 |
+
),
|
66 |
+
array(
|
67 |
+
'name' => 'wp_body_textarea',
|
68 |
+
'label' => __( 'Scripts in Body', 'wp-headers-and-footers' ),
|
69 |
+
'desc' => sprintf( __( 'These scripts will be printed below the %1$s tag.', 'wp-headers-and-footers' ), '<body>' ),
|
70 |
'type' => 'textarea',
|
71 |
),
|
72 |
array(
|
73 |
'name' => 'wp_footer_textarea',
|
74 |
+
'label' => __( 'Scripts in Footer', 'wp-headers-and-footers' ),
|
75 |
+
'desc' => sprintf( __( 'These scripts will be printed below the %1$s tag.', 'wp-headers-and-footers' ), '<footer>' ),
|
76 |
'type' => 'textarea',
|
77 |
),
|
78 |
),
|
82 |
}
|
83 |
|
84 |
function wp_header_and_footer_callback() {
|
85 |
+
echo '<div class="wrap wp-headers-and-footers">';
|
86 |
|
87 |
$this->settings_api->show_navigation();
|
88 |
$this->settings_api->show_forms();
|
classes/plugin-meta.php
CHANGED
@@ -63,7 +63,7 @@ if ( ! class_exists( 'WPHeaderAndFooter_Plugin_Meta' ) ) :
|
|
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-
|
67 |
|
68 |
array_unshift( $links, $settings_link );
|
69 |
|
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-headers-and-footers' ) . '">', '</a>' );
|
67 |
|
68 |
array_unshift( $links, $settings_link );
|
69 |
|
languages/wp-headers-and-footers.pot
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#, fuzzy
|
2 |
+
msgid ""
|
3 |
+
msgstr ""
|
4 |
+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
5 |
+
"Project-Id-Version: WP Headers and Footers\n"
|
6 |
+
"POT-Creation-Date: 2021-06-01 10:54+0500\n"
|
7 |
+
"PO-Revision-Date: 2021-06-01 10:54+0500\n"
|
8 |
+
"Last-Translator: \n"
|
9 |
+
"Language-Team: \n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.4.2\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
+
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
+
"X-Poedit-WPHeader: wp-headers-and-footers.php\n"
|
17 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
19 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
20 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
21 |
+
"X-Poedit-SearchPath-0: .\n"
|
22 |
+
"X-Poedit-SearchPathExcluded-0: *.min.js\n"
|
23 |
+
|
24 |
+
#: classes/class-settings-api.php:362
|
25 |
+
msgid "Choose File"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: classes/class-settings-api.php:525
|
29 |
+
msgid "Spread the Word"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: classes/class-settings-api.php:528
|
33 |
+
msgid "Post to Twitter Now"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: classes/class-settings-api.php:529
|
37 |
+
msgid "Share on Twitter"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: classes/class-settings-api.php:534
|
41 |
+
msgid "Share with your facebook friends about this awesome plugin"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: classes/class-settings-api.php:535
|
45 |
+
msgid "Share on Facebook"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: classes/class-settings-api.php:541
|
49 |
+
msgid "Rate on WordPress.org"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: classes/class-settings-api.php:548
|
53 |
+
msgid "Recommended Plugins"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: classes/class-settings-api.php:552
|
57 |
+
msgid "Customize your login screen"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: classes/class-settings-api.php:553
|
61 |
+
msgid "LoginPress - Login Customizer"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: classes/class-settings-api.php:558
|
65 |
+
msgid "Share with your facebook friends about this awesome plugin."
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: classes/class-settings-api.php:559
|
69 |
+
msgid "Google Analytics by Analytify"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: classes/class-settings-api.php:564 classes/class-settings-api.php:569
|
73 |
+
msgid "Socialize your Website"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: classes/class-settings-api.php:565
|
77 |
+
msgid "Simple Social Buttons"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: classes/class-settings-api.php:570
|
81 |
+
msgid "Under Construction & Maintenance mode"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#. Plugin Name of the plugin/theme
|
85 |
+
#: classes/class-setup.php:35
|
86 |
+
msgid "WP Headers and Footers"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: classes/class-setup.php:42
|
90 |
+
msgid "Settings"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: classes/class-setup.php:43
|
94 |
+
msgid "WP Headers and Footers."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: classes/class-setup.php:62
|
98 |
+
msgid "Scripts in Header"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: classes/class-setup.php:63
|
102 |
+
#, php-format
|
103 |
+
msgid "These scripts will be printed in the %1$s section."
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
#: classes/class-setup.php:68
|
107 |
+
msgid "Scripts in Body"
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: classes/class-setup.php:69 classes/class-setup.php:75
|
111 |
+
#, php-format
|
112 |
+
msgid "These scripts will be printed below the %1$s tag."
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: classes/class-setup.php:74
|
116 |
+
msgid "Scripts in Footer"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: classes/plugin-meta.php:42
|
120 |
+
msgid "Vote!"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: classes/plugin-meta.php:45
|
124 |
+
msgid "Rate"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: classes/plugin-meta.php:66
|
128 |
+
#, php-format
|
129 |
+
msgid "%1$s Settings %2$s"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#. Plugin URI of the plugin/theme
|
133 |
+
msgid "https://www.WPBrigade.com/wordpress/plugins/wp-headers-and-footers/"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#. Description of the plugin/theme
|
137 |
+
msgid ""
|
138 |
+
"Allows you to insert code or text in the header or footer of your WordPress "
|
139 |
+
"site."
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#. Author of the plugin/theme
|
143 |
+
msgid "WPBrigade"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#. Author URI of the plugin/theme
|
147 |
+
msgid ""
|
148 |
+
"https://wpbrigade.com/?utm_source=plugin-meta&utm_medium=author-uri-link"
|
149 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
=== Insert Headers
|
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,
|
6 |
Requires at least: 5.0
|
7 |
Tested up to: 5.7
|
8 |
-
Stable tag: 1.
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -13,9 +13,31 @@ Include inline javascript, stylesheets, CSS code or anything you want in Header
|
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
== Installation ==
|
21 |
|
@@ -34,16 +56,32 @@ This section describes how to install the WP Headers and Footers plugin and get
|
|
34 |
== Frequently Asked Questions ==
|
35 |
|
36 |
|
37 |
-
= Why this plugin is needed
|
38 |
-
It helps for WordPress users to add a JS/CSS code directly in their site without touching their themes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
|
41 |
== Screenshots ==
|
42 |
|
43 |
-
1. Add
|
|
|
|
|
44 |
|
45 |
|
46 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
= 1.2.2 - 2021-04-04
|
48 |
* Compatibility : WordPress 5.7
|
49 |
* Compatibility : PHP 8.0
|
@@ -66,5 +104,5 @@ It helps for WordPress users to add a JS/CSS code directly in their site without
|
|
66 |
|
67 |
== Upgrade Notice ==
|
68 |
|
69 |
-
= 1.
|
70 |
* 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, Google Analytics, custom css, Facebook Pixel
|
6 |
Requires at least: 5.0
|
7 |
Tested up to: 5.7
|
8 |
+
Stable tag: 1.3.0
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
+
WP Headers and Footers plugin helps you to insert code to your WordPress website headers and footers section like Google Analytics tracking code, Facebook Pixels code, Google Optimize code for A/B testing, Custom CSS code, and more. You don’t need to edit the theme files to insert the code.
|
17 |
|
18 |
+
The simple interface of this plugin allows you to add code and different scripts from one place to your WordPress website (**Headers, Footers, and Body section**).
|
19 |
+
|
20 |
+
**Features**
|
21 |
+
|
22 |
+
|
23 |
+
* Insert code to your WordPress headers & Footers
|
24 |
+
* Insert Google Analytics Code to any WordPress theme
|
25 |
+
* Insert Facebook Pixels Code
|
26 |
+
* Add Google Optimize Code for A/B testing ( Ab Testing )
|
27 |
+
* Add Google search console authentication code to any theme for verification
|
28 |
+
* Add Custom CSS, any script, and HTML to your website
|
29 |
+
Google Tag Manager code/script insertion
|
30 |
+
* You can also insert code to your website body section
|
31 |
+
Can add Bing webmaster tool code for website verification
|
32 |
+
Add Google AdSense code
|
33 |
+
|
34 |
+
`If you find our plugin useful, please leave a good rating/review and check our other plugins.`
|
35 |
+
|
36 |
+
* [Analytify - Google Analytics Plugin](https://analytify.io/ref/73/?utm_source=wp-headers-and-footers&utm_medium=readme&utm_campaign=pro-upgrade)
|
37 |
+
* [LoginPress](https://loginpress.pro/) - For Custom login page and login page security
|
38 |
+
* [Simple Social Buttons](https://simplesocialbuttons.com?utm_source=wp-headers-and-footers&utm_medium=readme&utm_campaign=pro-upgrade) - Plugin for Social share buttons and social icons
|
39 |
+
* [Related Posts Thumbnails Plugin](https://wordpress.org/plugins/related-posts-thumbnails/) - For related posts/products
|
40 |
+
* [Under Construction, Coming Soon & Maintenance Mode](http://wpbrigade.com/recommend/maintenance-mode?utm_source=wp-headers-and-footers&utm_medium=readme&utm_campaign=pro-upgrade) - Plugin for Under construction & Coming soon page
|
41 |
|
42 |
== Installation ==
|
43 |
|
56 |
== Frequently Asked Questions ==
|
57 |
|
58 |
|
59 |
+
= Why this plugin is needed? =
|
60 |
+
It helps for WordPress users to add a JS/CSS code directly in their site without touching their themes or plugins.
|
61 |
+
= Can we use this Headers and Footers plugin to setup Google Analytics on a WordPress site? =
|
62 |
+
Yes, you can insert Google Analytics tracking code to your website with this Headers and Footers plugin.
|
63 |
+
= Can we use this Headers and Footers plugin to verify our website on different platforms? =
|
64 |
+
Yes, you can use Headers and Footers plugin to verify your website on different platforms like Google Search Console, Bing Webmaster Tool, and Pinterest website verification by adding the verification code in the header section.
|
65 |
+
= How many sections we can insert the code in this plugin? =
|
66 |
+
You can insert code in Header, Body and Footer areas of any WordPress site.
|
67 |
+
|
68 |
|
69 |
|
70 |
== Screenshots ==
|
71 |
|
72 |
+
1. Add Header Scripts in Settings Panel.
|
73 |
+
1. Add Body Scripts in Settings Panel.
|
74 |
+
1. Add Footer Scripts in Settings Panel.
|
75 |
|
76 |
|
77 |
== Changelog ==
|
78 |
+
= 1.3.0 - 2021-06-05
|
79 |
+
* New Feature: Introducing Code Editor for writing scripts.
|
80 |
+
* Bugfix: Plugin language domain updated to 'wp-headers-and-footers'
|
81 |
+
* Enhancement: Dashboard design updated.
|
82 |
+
* Enhancement : Code Optimization.
|
83 |
+
* Compatibility : WordPress 5.7
|
84 |
+
|
85 |
= 1.2.2 - 2021-04-04
|
86 |
* Compatibility : WordPress 5.7
|
87 |
* Compatibility : PHP 8.0
|
104 |
|
105 |
== Upgrade Notice ==
|
106 |
|
107 |
+
= 1.3.0 =
|
108 |
* Upgrade Immediately.
|
wp-headers-and-footers.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Plugin Name: WP Headers
|
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.
|
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.
|
27 |
|
28 |
/**
|
29 |
* @var The single instance of the class
|
@@ -58,12 +58,21 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
|
|
58 |
* Hook into actions and filters
|
59 |
*
|
60 |
* @since 1.0.0
|
|
|
|
|
|
|
61 |
*/
|
62 |
private function _hooks() {
|
63 |
|
64 |
add_action( 'plugins_loaded', array( $this, 'textdomain' ) );
|
65 |
add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
|
|
|
66 |
add_action( 'wp_head', array( $this, 'frontendHeader' ) );
|
|
|
|
|
|
|
|
|
|
|
67 |
add_action( 'wp_footer', array( $this, 'frontendFooter' ) );
|
68 |
}
|
69 |
|
@@ -82,8 +91,26 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
|
|
82 |
|
83 |
function _admin_scripts( $page ) {
|
84 |
|
85 |
-
if ( 'settings_page_wp-
|
|
|
86 |
wp_enqueue_style( 'wpheaderandfooter_stlye', plugins_url( 'asset/css/style.css', __FILE__ ), array(), WPHEADERANDFOOTER_VERSION );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
}
|
88 |
}
|
89 |
|
@@ -128,13 +155,29 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
|
|
128 |
|
129 |
/**
|
130 |
* Outputs script / CSS to the header
|
|
|
|
|
|
|
131 |
*/
|
132 |
function frontendHeader() {
|
133 |
$this->_output( 'wp_header_textarea' );
|
134 |
}
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
/**
|
137 |
* Outputs script / CSS to the footer
|
|
|
|
|
|
|
138 |
*/
|
139 |
function frontendFooter() {
|
140 |
$this->_output( 'wp_footer_textarea' );
|
@@ -162,7 +205,7 @@ if ( ! class_exists( 'WPHeaderAndFooter' ) ) :
|
|
162 |
endif;
|
163 |
|
164 |
// Output
|
165 |
-
echo wp_unslash( $meta );
|
166 |
|
167 |
}
|
168 |
|
1 |
<?php
|
2 |
/**
|
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.3.0
|
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.3.0';
|
27 |
|
28 |
/**
|
29 |
* @var The single instance of the class
|
58 |
* Hook into actions and filters
|
59 |
*
|
60 |
* @since 1.0.0
|
61 |
+
*
|
62 |
+
* @version 1.2.3
|
63 |
+
*
|
64 |
*/
|
65 |
private function _hooks() {
|
66 |
|
67 |
add_action( 'plugins_loaded', array( $this, 'textdomain' ) );
|
68 |
add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
|
69 |
+
add_action( 'wp_print_scripts', array( $this, '_admin_scripts' ) );
|
70 |
add_action( 'wp_head', array( $this, 'frontendHeader' ) );
|
71 |
+
|
72 |
+
if( function_exists( 'wp_body_open' ) && version_compare( get_bloginfo( 'version' ), '5.2', '>=' ) ) {
|
73 |
+
add_action( 'wp_body_open', array( $this, 'frontendBody' ) );
|
74 |
+
}
|
75 |
+
|
76 |
add_action( 'wp_footer', array( $this, 'frontendFooter' ) );
|
77 |
}
|
78 |
|
91 |
|
92 |
function _admin_scripts( $page ) {
|
93 |
|
94 |
+
if ( 'settings_page_wp-headers-and-footers' === $page ) {
|
95 |
+
|
96 |
wp_enqueue_style( 'wpheaderandfooter_stlye', plugins_url( 'asset/css/style.css', __FILE__ ), array(), WPHEADERANDFOOTER_VERSION );
|
97 |
+
|
98 |
+
$editor_args = array( 'type' => 'text/html' );
|
99 |
+
|
100 |
+
if ( ! current_user_can( 'unfiltered_html' ) || ! current_user_can( 'manage_options' ) ) {
|
101 |
+
$editor_args['codemirror']['readOnly'] = true;
|
102 |
+
}
|
103 |
+
|
104 |
+
// Enqueue code editor and settings for manipulating HTML.
|
105 |
+
$settings = wp_enqueue_code_editor( $editor_args );
|
106 |
+
|
107 |
+
// Bail if user disabled CodeMirror.
|
108 |
+
if ( false === $settings ) {
|
109 |
+
return;
|
110 |
+
}
|
111 |
+
|
112 |
+
wp_enqueue_script( 'wpheaderandfooter_script', plugins_url( 'asset/js/script.js', __FILE__ ), array( 'jquery' ), WPHEADERANDFOOTER_VERSION );
|
113 |
+
|
114 |
}
|
115 |
}
|
116 |
|
155 |
|
156 |
/**
|
157 |
* Outputs script / CSS to the header
|
158 |
+
* @since 1.0.0
|
159 |
+
*
|
160 |
+
* @version 1.2.3
|
161 |
*/
|
162 |
function frontendHeader() {
|
163 |
$this->_output( 'wp_header_textarea' );
|
164 |
}
|
165 |
|
166 |
+
/**
|
167 |
+
* Outputs script / CSS to the frontend below opening body
|
168 |
+
* @since 1.0.0
|
169 |
+
*
|
170 |
+
* @version 1.2.3
|
171 |
+
*/
|
172 |
+
function frontendBody() {
|
173 |
+
$this->_output( 'wp_body_textarea' );
|
174 |
+
}
|
175 |
+
|
176 |
/**
|
177 |
* Outputs script / CSS to the footer
|
178 |
+
* @since 1.0.0
|
179 |
+
*
|
180 |
+
* @version 1.0.0
|
181 |
*/
|
182 |
function frontendFooter() {
|
183 |
$this->_output( 'wp_footer_textarea' );
|
205 |
endif;
|
206 |
|
207 |
// Output
|
208 |
+
echo wp_unslash( $meta ) . PHP_EOL;
|
209 |
|
210 |
}
|
211 |
|