Version Description
- Removed obsolete code
- Escaped added to fixed and translated strings
Download this release
Release Info
Developer | satollo |
Plugin | Head, Footer and Post Injections |
Version | 3.2.5 |
Comparing to | |
See all releases |
Code changes from version 3.2.4 to 3.2.5
- admin/admin.php +2 -2
- admin/controls.php +44 -92
- admin/options.php +31 -39
- plugin.php +1 -1
- readme.txt +9 -4
admin/admin.php
CHANGED
@@ -50,12 +50,12 @@ function hefo_meta_boxes_callback($post) {
|
|
50 |
$after = get_post_meta($post->ID, 'hefo_after', true);
|
51 |
echo '<label>';
|
52 |
echo '<input type="checkbox" id="hefo_before" name="hefo_before" ' . (empty($before) ? "" : "checked") . '> ';
|
53 |
-
|
54 |
echo '</label> ';
|
55 |
echo '<br>';
|
56 |
echo '<label>';
|
57 |
echo '<input type="checkbox" id="hefo_after" name="hefo_after]" ' . (empty($after) ? "" : "checked") . '> ';
|
58 |
-
|
59 |
echo '</label> ';
|
60 |
}
|
61 |
|
50 |
$after = get_post_meta($post->ID, 'hefo_after', true);
|
51 |
echo '<label>';
|
52 |
echo '<input type="checkbox" id="hefo_before" name="hefo_before" ' . (empty($before) ? "" : "checked") . '> ';
|
53 |
+
esc_html_e("Disable top injection", 'header-footer');
|
54 |
echo '</label> ';
|
55 |
echo '<br>';
|
56 |
echo '<label>';
|
57 |
echo '<input type="checkbox" id="hefo_after" name="hefo_after]" ' . (empty($after) ? "" : "checked") . '> ';
|
58 |
+
esc_html_e("Disable bottom injection", 'header-footer');
|
59 |
echo '</label> ';
|
60 |
}
|
61 |
|
admin/controls.php
CHANGED
@@ -2,51 +2,43 @@
|
|
2 |
defined('ABSPATH') || exit;
|
3 |
|
4 |
function hefo_request($name, $default = null) {
|
5 |
-
if (!isset($_REQUEST[$name]))
|
6 |
return $default;
|
|
|
7 |
return stripslashes_deep($_REQUEST[$name]);
|
8 |
}
|
9 |
|
10 |
-
function hefo_field_checkbox($name, $label = '', $tips = '', $attrs = '') {
|
11 |
-
global $options;
|
12 |
-
echo '<th scope="row">';
|
13 |
-
echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
|
14 |
-
echo '<td><input type="checkbox" ' . $attrs . ' name="options[' . $name . ']" value="1" ' .
|
15 |
-
(isset($options[$name]) ? 'checked' : '') . '/>';
|
16 |
-
echo ' ' . $tips;
|
17 |
-
echo '</td>';
|
18 |
-
}
|
19 |
-
|
20 |
function hefo_base_checkbox($name, $label = '') {
|
21 |
global $options;
|
22 |
echo '<label>';
|
23 |
-
echo '<input type="checkbox" name="options[' . $name . ']" value="1" ' .
|
24 |
(isset($options[$name]) ? 'checked' : '') . '>';
|
25 |
-
echo $label;
|
26 |
echo '</label>';
|
27 |
}
|
28 |
|
29 |
function hefo_field_checkbox_only($name, $tips = '', $attrs = '', $link = null) {
|
30 |
global $options;
|
31 |
-
echo '<td><input type="checkbox"
|
32 |
(isset($options[$name]) ? 'checked' : '') . '/>';
|
33 |
echo ' ' . $tips;
|
34 |
if ($link) {
|
35 |
-
echo '<br><a href="' . $link . '" target="_blank">Read more</a>.';
|
36 |
}
|
37 |
echo '</td>';
|
38 |
}
|
39 |
|
40 |
-
function hefo_field_text($name, $label = '', $tips = ''
|
41 |
global $options;
|
42 |
|
43 |
-
if (!isset($options[$name]))
|
44 |
$options[$name] = '';
|
|
|
45 |
|
46 |
echo '<th scope="row">';
|
47 |
-
echo '<label
|
48 |
-
echo '<td><input type="text" name="options[' . $name . ']" value="' .
|
49 |
-
|
50 |
echo '<br /> ' . $tips;
|
51 |
echo '</td>';
|
52 |
}
|
@@ -58,108 +50,68 @@ function hefo_base_text($name) {
|
|
58 |
$options[$name] = '';
|
59 |
}
|
60 |
|
61 |
-
echo '<input type="text" name="options[' . $name . ']" value="' .
|
62 |
esc_attr($options[$name]) . '" size="30">';
|
63 |
}
|
64 |
|
65 |
-
function hefo_field_textarea($name, $label = '', $tips = ''
|
66 |
global $options;
|
67 |
|
68 |
-
if (!isset($options[$name]))
|
69 |
-
$options[$name] = '';
|
70 |
-
|
71 |
-
if (is_array($options[$name]))
|
72 |
-
$options[$name] = implode("\n", $options[$name]);
|
73 |
-
|
74 |
-
if (strpos($attrs, 'cols') === false)
|
75 |
-
$attrs .= 'cols="70"';
|
76 |
-
if (strpos($attrs, 'rows') === false)
|
77 |
-
$attrs .= 'rows="5"';
|
78 |
-
|
79 |
-
echo '<th scope="row">';
|
80 |
-
echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
|
81 |
-
echo '<td><textarea style="width: 100%; height: 100px" wrap="off" name="options[' . $name . ']">' .
|
82 |
-
htmlspecialchars($options[$name]) . '</textarea>';
|
83 |
-
echo '<p class="description">' . $tips . '</p>';
|
84 |
-
echo '</td>';
|
85 |
-
}
|
86 |
-
|
87 |
-
function hefo_field_textarea_cm($name, $label = '', $tips = '', $attrs = '') {
|
88 |
-
global $options;
|
89 |
-
|
90 |
-
if (!isset($options[$name]))
|
91 |
$options[$name] = '';
|
|
|
92 |
|
93 |
-
if (is_array($options[$name]))
|
94 |
$options[$name] = implode("\n", $options[$name]);
|
95 |
-
|
96 |
-
if (strpos($attrs, 'cols') === false)
|
97 |
-
$attrs .= 'cols="70"';
|
98 |
-
if (strpos($attrs, 'rows') === false)
|
99 |
-
$attrs .= 'rows="5"';
|
100 |
|
101 |
echo '<th scope="row">';
|
102 |
-
echo '<label
|
103 |
-
echo '<td><textarea style="width: 100%; height: 100px" wrap="off" name="options[' . $name . ']"
|
104 |
-
|
105 |
-
echo '<p class="description">' . $tips . '</p>';
|
106 |
echo '</td>';
|
107 |
}
|
108 |
|
109 |
function hefo_base_textarea_cm($name, $type = '', $tips = '') {
|
110 |
global $options;
|
111 |
|
112 |
-
if (!empty($type))
|
113 |
$type = '-' . $type;
|
114 |
-
|
|
|
|
|
115 |
$options[$name] = '';
|
|
|
116 |
|
117 |
-
if (is_array($options[$name]))
|
118 |
$options[$name] = implode("\n", $options[$name]);
|
|
|
119 |
|
120 |
-
echo '<textarea class="hefo-cm' . $type . '" name="options[' . $name . ']" onfocus="hefo_cm_on(this)">';
|
121 |
-
echo
|
122 |
echo '</textarea>';
|
123 |
echo '<p class="description">' . $tips . '</p>';
|
124 |
}
|
125 |
|
126 |
-
function hefo_field_textarea_enable($name, $label = '', $tips = '', $attrs = '') {
|
127 |
-
global $options;
|
128 |
-
|
129 |
-
if (!isset($options[$name]))
|
130 |
-
$options[$name] = '';
|
131 |
-
|
132 |
-
if (is_array($options[$name]))
|
133 |
-
$options[$name] = implode("\n", $options[$name]);
|
134 |
-
|
135 |
-
if (strpos($attrs, 'cols') === false)
|
136 |
-
$attrs .= 'cols="70"';
|
137 |
-
if (strpos($attrs, 'rows') === false)
|
138 |
-
$attrs .= 'rows="5"';
|
139 |
-
|
140 |
-
echo '<th scope="row">';
|
141 |
-
echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
|
142 |
-
echo '<td>';
|
143 |
-
echo '<input type="checkbox" ' . $attrs . ' name="options[' . $name . '_enabled]" value="1" ' .
|
144 |
-
(isset($options[$name . '_enabled']) ? 'checked' : '') . '> Enable<br>';
|
145 |
-
echo '<textarea style="width: 100%; height: 100px" wrap="off" name="options[' . $name . ']">' .
|
146 |
-
htmlspecialchars($options[$name]) . '</textarea>';
|
147 |
-
echo '<p class="description">' . $tips . '</p>';
|
148 |
-
echo '</td>';
|
149 |
-
}
|
150 |
-
|
151 |
function hefo_rule($number) {
|
152 |
global $options;
|
153 |
-
|
|
|
154 |
$options['inner_pos_' . $number] = 'after';
|
155 |
-
|
|
|
|
|
156 |
$options['inner_skip_' . $number] = 0;
|
157 |
-
|
|
|
|
|
158 |
$options['inner_tag_' . $number] = '';
|
|
|
159 |
|
160 |
echo '<div class="rules">';
|
161 |
echo '<div style="float: left">Inject</div>';
|
162 |
-
echo '<select style="float: left" name="options[inner_pos_' . $number . ']">';
|
163 |
echo '<option value="after"';
|
164 |
echo $options['inner_pos_' . $number] == 'after' ? ' selected' : '';
|
165 |
echo '>after</option>';
|
@@ -167,15 +119,15 @@ function hefo_rule($number) {
|
|
167 |
echo $options['inner_pos_' . $number] == 'before' ? ' selected' : '';
|
168 |
echo '>before</option>';
|
169 |
echo '</select>';
|
170 |
-
echo '<input style="float: left" type="text" placeholder="marker" name="options[inner_tag_' . $number . ']" value="';
|
171 |
echo esc_attr($options['inner_tag_' . $number]);
|
172 |
echo '">';
|
173 |
echo '<div style="float: left">skipping</div>';
|
174 |
-
echo '<input style="float: left" type="text" size="5" name="options[inner_skip_' . $number . ']" value="';
|
175 |
echo esc_attr($options['inner_skip_' . $number]);
|
176 |
echo '">';
|
177 |
echo '<div style="float: left">chars, on failure inject</div>';
|
178 |
-
echo '<select style="float: left" name="options[inner_alt_' . $number . ']">';
|
179 |
echo '<option value=""';
|
180 |
echo $options['inner_alt_' . $number] == 'after' ? ' selected' : '';
|
181 |
echo '>nowhere</option>';
|
2 |
defined('ABSPATH') || exit;
|
3 |
|
4 |
function hefo_request($name, $default = null) {
|
5 |
+
if (!isset($_REQUEST[$name])) {
|
6 |
return $default;
|
7 |
+
}
|
8 |
return stripslashes_deep($_REQUEST[$name]);
|
9 |
}
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
function hefo_base_checkbox($name, $label = '') {
|
12 |
global $options;
|
13 |
echo '<label>';
|
14 |
+
echo '<input type="checkbox" name="options[' . esc_attr($name) . ']" value="1" ' .
|
15 |
(isset($options[$name]) ? 'checked' : '') . '>';
|
16 |
+
echo esc_html($label);
|
17 |
echo '</label>';
|
18 |
}
|
19 |
|
20 |
function hefo_field_checkbox_only($name, $tips = '', $attrs = '', $link = null) {
|
21 |
global $options;
|
22 |
+
echo '<td><input type="checkbox" name="options[' . esc_attr($name) . ']" value="1" ' .
|
23 |
(isset($options[$name]) ? 'checked' : '') . '/>';
|
24 |
echo ' ' . $tips;
|
25 |
if ($link) {
|
26 |
+
echo '<br><a href="' . esc_attr($link) . '" target="_blank">Read more</a>.';
|
27 |
}
|
28 |
echo '</td>';
|
29 |
}
|
30 |
|
31 |
+
function hefo_field_text($name, $label = '', $tips = '') {
|
32 |
global $options;
|
33 |
|
34 |
+
if (!isset($options[$name])) {
|
35 |
$options[$name] = '';
|
36 |
+
}
|
37 |
|
38 |
echo '<th scope="row">';
|
39 |
+
echo '<label>' . esc_html($label) . '</label></th>';
|
40 |
+
echo '<td><input type="text" name="options[' . esc_attr($name) . ']" value="' .
|
41 |
+
esc_attr($options[$name]) . '" size="50"/>';
|
42 |
echo '<br /> ' . $tips;
|
43 |
echo '</td>';
|
44 |
}
|
50 |
$options[$name] = '';
|
51 |
}
|
52 |
|
53 |
+
echo '<input type="text" name="options[' . esc_attr($name) . ']" value="' .
|
54 |
esc_attr($options[$name]) . '" size="30">';
|
55 |
}
|
56 |
|
57 |
+
function hefo_field_textarea($name, $label = '', $tips = '') {
|
58 |
global $options;
|
59 |
|
60 |
+
if (!isset($options[$name])) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
$options[$name] = '';
|
62 |
+
}
|
63 |
|
64 |
+
if (is_array($options[$name])) {
|
65 |
$options[$name] = implode("\n", $options[$name]);
|
66 |
+
}
|
|
|
|
|
|
|
|
|
67 |
|
68 |
echo '<th scope="row">';
|
69 |
+
echo '<label>' . esc_html($label) . '</label></th>';
|
70 |
+
echo '<td><textarea style="width: 100%; height: 100px" wrap="off" name="options[' . esc_attr($name) . ']">' .
|
71 |
+
esc_html($options[$name]) . '</textarea>';
|
72 |
+
echo '<p class="description">' . esc_html($tips) . '</p>';
|
73 |
echo '</td>';
|
74 |
}
|
75 |
|
76 |
function hefo_base_textarea_cm($name, $type = '', $tips = '') {
|
77 |
global $options;
|
78 |
|
79 |
+
if (!empty($type)) {
|
80 |
$type = '-' . $type;
|
81 |
+
}
|
82 |
+
|
83 |
+
if (!isset($options[$name])) {
|
84 |
$options[$name] = '';
|
85 |
+
}
|
86 |
|
87 |
+
if (is_array($options[$name])) {
|
88 |
$options[$name] = implode("\n", $options[$name]);
|
89 |
+
}
|
90 |
|
91 |
+
echo '<textarea class="hefo-cm' . esc_attr($type) . '" name="options[' . esc_attr($name) . ']" onfocus="hefo_cm_on(this)">';
|
92 |
+
echo esc_html($options[$name]);
|
93 |
echo '</textarea>';
|
94 |
echo '<p class="description">' . $tips . '</p>';
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
function hefo_rule($number) {
|
98 |
global $options;
|
99 |
+
|
100 |
+
if (!isset($options['inner_pos_' . $number])) {
|
101 |
$options['inner_pos_' . $number] = 'after';
|
102 |
+
}
|
103 |
+
|
104 |
+
if (!isset($options['inner_skip_' . $number])) {
|
105 |
$options['inner_skip_' . $number] = 0;
|
106 |
+
}
|
107 |
+
|
108 |
+
if (!isset($options['inner_tag_' . $number])) {
|
109 |
$options['inner_tag_' . $number] = '';
|
110 |
+
}
|
111 |
|
112 |
echo '<div class="rules">';
|
113 |
echo '<div style="float: left">Inject</div>';
|
114 |
+
echo '<select style="float: left" name="options[inner_pos_' . esc_attr($number) . ']">';
|
115 |
echo '<option value="after"';
|
116 |
echo $options['inner_pos_' . $number] == 'after' ? ' selected' : '';
|
117 |
echo '>after</option>';
|
119 |
echo $options['inner_pos_' . $number] == 'before' ? ' selected' : '';
|
120 |
echo '>before</option>';
|
121 |
echo '</select>';
|
122 |
+
echo '<input style="float: left" type="text" placeholder="marker" name="options[inner_tag_' . esc_attr($number) . ']" value="';
|
123 |
echo esc_attr($options['inner_tag_' . $number]);
|
124 |
echo '">';
|
125 |
echo '<div style="float: left">skipping</div>';
|
126 |
+
echo '<input style="float: left" type="text" size="5" name="options[inner_skip_' . esc_attr($number) . ']" value="';
|
127 |
echo esc_attr($options['inner_skip_' . $number]);
|
128 |
echo '">';
|
129 |
echo '<div style="float: left">chars, on failure inject</div>';
|
130 |
+
echo '<select style="float: left" name="options[inner_alt_' . esc_attr($number) . ']">';
|
131 |
echo '<option value=""';
|
132 |
echo $options['inner_alt_' . $number] == 'after' ? ' selected' : '';
|
133 |
echo '>nowhere</option>';
|
admin/options.php
CHANGED
@@ -95,15 +95,15 @@ if (isset($_POST['save'])) {
|
|
95 |
<div style="padding: 15px; background-color: #fff; border: 1px solid #eee; font-size: 16px; line-height: 22px">
|
96 |
<?php
|
97 |
if (apply_filters('hefo_php_exec', true)) {
|
98 |
-
|
99 |
} else {
|
100 |
-
|
101 |
}
|
102 |
?>
|
103 |
<br>
|
104 |
|
105 |
-
<?php
|
106 |
-
<a href="https://www.satollo.net/plugins/header-footer" target="_blank" class="readmore"><?php
|
107 |
|
108 |
</div>
|
109 |
|
@@ -112,21 +112,21 @@ if (isset($_POST['save'])) {
|
|
112 |
<?php wp_nonce_field('save') ?>
|
113 |
|
114 |
<p>
|
115 |
-
<input type="submit" class="button-primary" name="save" value="<?php
|
116 |
</p>
|
117 |
|
118 |
<div id="hefo-tabs">
|
119 |
<ul>
|
120 |
-
<li><a href="#tabs-first"><?php
|
121 |
-
<li><a href="#tabs-post"><?php
|
122 |
-
<li><a href="#tabs-post-inner"><?php
|
123 |
-
<li><a href="#tabs-page"><?php
|
124 |
-
<li><a href="#tabs-excerpt"><?php
|
125 |
-
<li><a href="#tabs-5"><?php
|
126 |
-
<li><a href="#tabs-amp"><?php
|
127 |
-
<li><a href="#tabs-generics"><?php
|
128 |
-
<li><a href="#tabs-8"><?php
|
129 |
-
<li><a href="#tabs-7"><?php
|
130 |
</ul>
|
131 |
|
132 |
|
@@ -149,7 +149,7 @@ if (isset($_POST['save'])) {
|
|
149 |
<div class="row">
|
150 |
|
151 |
<div class="col-2">
|
152 |
-
<label><?php
|
153 |
<?php hefo_base_textarea_cm('body'); ?>
|
154 |
</div>
|
155 |
<div class="col-2">
|
@@ -161,7 +161,7 @@ if (isset($_POST['save'])) {
|
|
161 |
<h3><?php esc_html_e('Before the </BODY> closing tag (footer)', 'header-footer') ?></h3>
|
162 |
<div class="row">
|
163 |
<div class="col-2">
|
164 |
-
<label><?php
|
165 |
<?php hefo_base_textarea_cm('footer'); ?>
|
166 |
</div>
|
167 |
<div class="col-2">
|
@@ -181,7 +181,7 @@ if (isset($_POST['save'])) {
|
|
181 |
<p>Inject before the <?php hefo_base_text('generic_tag_' . $i); ?> marker</p>
|
182 |
<div class="row">
|
183 |
<div class="col-2">
|
184 |
-
<label><?php
|
185 |
<?php hefo_base_textarea_cm('generic_' . $i); ?>
|
186 |
</div>
|
187 |
<div class="col-2">
|
@@ -206,7 +206,7 @@ if (isset($_POST['save'])) {
|
|
206 |
<div class="row">
|
207 |
|
208 |
<div class="col-2">
|
209 |
-
<label><?php
|
210 |
<?php hefo_base_textarea_cm('before'); ?>
|
211 |
</div>
|
212 |
<div class="col-2">
|
@@ -221,7 +221,7 @@ if (isset($_POST['save'])) {
|
|
221 |
<div class="row">
|
222 |
|
223 |
<div class="col-2">
|
224 |
-
<label><?php
|
225 |
<?php hefo_base_textarea_cm('after'); ?>
|
226 |
</div>
|
227 |
<div class="col-2">
|
@@ -230,14 +230,6 @@ if (isset($_POST['save'])) {
|
|
230 |
</div>
|
231 |
</div>
|
232 |
|
233 |
-
<!--<h3>Posts and pages</h3>-->
|
234 |
-
<table class="form-table">
|
235 |
-
<!--<tr valign="top"><?php hefo_field_checkbox('category', __('Enable injection on category pages', 'header-footer')); ?></tr>-->
|
236 |
-
<tr valign="top"><?php //hefo_field_textarea('before', __('Code to be inserted before each post', 'header-footer'), '', 'rows="10"'); ?></tr>
|
237 |
-
<tr valign="top"><?php //hefo_field_textarea('after', __('Code to be inserted after each post', 'header-footer'), '', 'rows="10"'); ?></tr>
|
238 |
-
</table>
|
239 |
-
|
240 |
-
|
241 |
<div class="clearfix"></div>
|
242 |
</div>
|
243 |
|
@@ -249,7 +241,7 @@ if (isset($_POST['save'])) {
|
|
249 |
<?php hefo_rule($i); ?>
|
250 |
<div class="row">
|
251 |
<div class="col-2">
|
252 |
-
<label><?php
|
253 |
<?php hefo_base_textarea_cm('inner_' . $i); ?>
|
254 |
</div>
|
255 |
<div class="col-2">
|
@@ -268,7 +260,7 @@ if (isset($_POST['save'])) {
|
|
268 |
<?php hefo_base_checkbox('page_add_tags', __('Let pages to have tags', 'header-footer')); ?><br>
|
269 |
<?php hefo_base_checkbox('page_add_categories', __('Let pages to have categories', 'header-footer')); ?>
|
270 |
|
271 |
-
<h3><?php
|
272 |
<div class="row">
|
273 |
|
274 |
<div class="col-2">
|
@@ -302,10 +294,10 @@ if (isset($_POST['save'])) {
|
|
302 |
|
303 |
<div id="tabs-excerpt">
|
304 |
|
305 |
-
<p><?php
|
306 |
<table class="form-table">
|
307 |
-
<tr valign="top"><?php hefo_field_textarea('excerpt_before', __('Code to be inserted before each post excerpt', 'header-footer'), ''
|
308 |
-
<tr valign="top"><?php hefo_field_textarea('excerpt_after', __('Code to be inserted after each post excerpt', 'header-footer'), ''
|
309 |
</table>
|
310 |
</div>
|
311 |
|
@@ -382,13 +374,13 @@ if (isset($_POST['save'])) {
|
|
382 |
|
383 |
<div id="tabs-5">
|
384 |
<p>
|
385 |
-
<?php
|
386 |
from 1 to 5. Snippets are inserted before PHP evaluation.', 'header-footer'); ?><br />
|
387 |
-
<?php
|
388 |
</p>
|
389 |
<table class="form-table">
|
390 |
<? for ($i=1; $i<=5; $i++) { ?>
|
391 |
-
<tr valign="top"><?php hefo_field_textarea('snippet_' . $i, __('Snippet ' . $i, 'header-footer'), ''
|
392 |
<? } ?>
|
393 |
</table>
|
394 |
<div class="clearfix"></div>
|
@@ -400,7 +392,7 @@ if (isset($_POST['save'])) {
|
|
400 |
<?php
|
401 |
hefo_field_textarea('mobile_user_agents', __('Mobile user agent strings', 'header-footer'), 'For coders: a regular expression is built with those values and the resulting code will be<br>'
|
402 |
. '<code>preg_match(\'/' . $options['mobile_user_agents_parsed'] . '/\', ...);</code><br>' .
|
403 |
-
'<a href="http://www.satollo.net/plugins/header-footer" target="_blank">Read this page</a> for more.'
|
404 |
?>
|
405 |
|
406 |
</tr>
|
@@ -447,7 +439,7 @@ if (isset($_POST['save'])) {
|
|
447 |
|
448 |
<div id="tabs-7">
|
449 |
<table class="form-table">
|
450 |
-
<tr valign="top"><?php hefo_field_textarea('notes', __('Notes and parked codes', 'header-footer'), ''
|
451 |
</table>
|
452 |
<div class="clearfix"></div>
|
453 |
</div>
|
@@ -457,7 +449,7 @@ if (isset($_POST['save'])) {
|
|
457 |
|
458 |
</div>
|
459 |
<p>* if no mobile alternative is activated</p>
|
460 |
-
<p class="submit"><input type="submit" class="button-primary" name="save" value="<?php
|
461 |
|
462 |
</form>
|
463 |
</div>
|
95 |
<div style="padding: 15px; background-color: #fff; border: 1px solid #eee; font-size: 16px; line-height: 22px">
|
96 |
<?php
|
97 |
if (apply_filters('hefo_php_exec', true)) {
|
98 |
+
esc_html_e('PHP is allowed in your code.','header-footer');
|
99 |
} else {
|
100 |
+
esc_html_e('PHP is NOT allowed in your code (disabled by your theme or a plugin)', 'header-footer');
|
101 |
}
|
102 |
?>
|
103 |
<br>
|
104 |
|
105 |
+
<?php esc_html_e('Mobile configuration is <strong>now deprecated</strong>', 'header-footer'); ?>.
|
106 |
+
<a href="https://www.satollo.net/plugins/header-footer" target="_blank" class="readmore"><?php esc_html_e('Read more', 'header-footer'); ?></a>
|
107 |
|
108 |
</div>
|
109 |
|
112 |
<?php wp_nonce_field('save') ?>
|
113 |
|
114 |
<p>
|
115 |
+
<input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('save', 'header-footer'); ?>">
|
116 |
</p>
|
117 |
|
118 |
<div id="hefo-tabs">
|
119 |
<ul>
|
120 |
+
<li><a href="#tabs-first"><?php esc_html_e('Head and footer', 'header-footer'); ?></a></li>
|
121 |
+
<li><a href="#tabs-post"><?php esc_html_e('Posts', 'header-footer'); ?></a></li>
|
122 |
+
<li><a href="#tabs-post-inner"><?php esc_html_e('Inside posts', 'header-footer'); ?></a></li>
|
123 |
+
<li><a href="#tabs-page"><?php esc_html_e('Pages', 'header-footer'); ?></a></li>
|
124 |
+
<li><a href="#tabs-excerpt"><?php esc_html_e('Excerpts', 'header-footer'); ?></a></li>
|
125 |
+
<li><a href="#tabs-5"><?php esc_html_e('Snippets', 'header-footer'); ?></a></li>
|
126 |
+
<li><a href="#tabs-amp"><?php esc_html_e('AMP', 'header-footer'); ?></a></li>
|
127 |
+
<li><a href="#tabs-generics"><?php esc_html_e('Generics', 'header-footer'); ?></a></li>
|
128 |
+
<li><a href="#tabs-8"><?php esc_html_e('Advanced', 'header-footer'); ?></a></li>
|
129 |
+
<li><a href="#tabs-7"><?php esc_html_e('Notes and...', 'header-footer'); ?></a></li>
|
130 |
</ul>
|
131 |
|
132 |
|
149 |
<div class="row">
|
150 |
|
151 |
<div class="col-2">
|
152 |
+
<label><?php esc_html_e('Desktop', 'header-footer') ?>*</label>
|
153 |
<?php hefo_base_textarea_cm('body'); ?>
|
154 |
</div>
|
155 |
<div class="col-2">
|
161 |
<h3><?php esc_html_e('Before the </BODY> closing tag (footer)', 'header-footer') ?></h3>
|
162 |
<div class="row">
|
163 |
<div class="col-2">
|
164 |
+
<label><?php esc_html_e('Desktop', 'header-footer') ?>*</label>
|
165 |
<?php hefo_base_textarea_cm('footer'); ?>
|
166 |
</div>
|
167 |
<div class="col-2">
|
181 |
<p>Inject before the <?php hefo_base_text('generic_tag_' . $i); ?> marker</p>
|
182 |
<div class="row">
|
183 |
<div class="col-2">
|
184 |
+
<label><?php esc_html_e('Desktop', 'header-footer') ?>*</label>
|
185 |
<?php hefo_base_textarea_cm('generic_' . $i); ?>
|
186 |
</div>
|
187 |
<div class="col-2">
|
206 |
<div class="row">
|
207 |
|
208 |
<div class="col-2">
|
209 |
+
<label><?php esc_html_e('Desktop', 'header-footer') ?>*</label>
|
210 |
<?php hefo_base_textarea_cm('before'); ?>
|
211 |
</div>
|
212 |
<div class="col-2">
|
221 |
<div class="row">
|
222 |
|
223 |
<div class="col-2">
|
224 |
+
<label><?php esc_html_e('Desktop', 'header-footer') ?>*</label>
|
225 |
<?php hefo_base_textarea_cm('after'); ?>
|
226 |
</div>
|
227 |
<div class="col-2">
|
230 |
</div>
|
231 |
</div>
|
232 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
<div class="clearfix"></div>
|
234 |
</div>
|
235 |
|
241 |
<?php hefo_rule($i); ?>
|
242 |
<div class="row">
|
243 |
<div class="col-2">
|
244 |
+
<label><?php esc_html_e('Desktop', 'header-footer') ?>*</label>
|
245 |
<?php hefo_base_textarea_cm('inner_' . $i); ?>
|
246 |
</div>
|
247 |
<div class="col-2">
|
260 |
<?php hefo_base_checkbox('page_add_tags', __('Let pages to have tags', 'header-footer')); ?><br>
|
261 |
<?php hefo_base_checkbox('page_add_categories', __('Let pages to have categories', 'header-footer')); ?>
|
262 |
|
263 |
+
<h3><?php esc_html_e('Before the page content', 'header-footer') ?></h3>
|
264 |
<div class="row">
|
265 |
|
266 |
<div class="col-2">
|
294 |
|
295 |
<div id="tabs-excerpt">
|
296 |
|
297 |
+
<p><?php esc_html_e('It works only on category and tag pages.', 'header-footer'); ?></p>
|
298 |
<table class="form-table">
|
299 |
+
<tr valign="top"><?php hefo_field_textarea('excerpt_before', __('Code to be inserted before each post excerpt', 'header-footer'), ''); ?></tr>
|
300 |
+
<tr valign="top"><?php hefo_field_textarea('excerpt_after', __('Code to be inserted after each post excerpt', 'header-footer'), ''); ?></tr>
|
301 |
</table>
|
302 |
</div>
|
303 |
|
374 |
|
375 |
<div id="tabs-5">
|
376 |
<p>
|
377 |
+
<?php esc_html_e('Common snippets that can be used in any header or footer area referring them as [snippet_N] where N is the snippet number
|
378 |
from 1 to 5. Snippets are inserted before PHP evaluation.', 'header-footer'); ?><br />
|
379 |
+
<?php esc_html_e('Useful for social button to be placed before and after the post or in posts and pages.', 'header-footer'); ?>
|
380 |
</p>
|
381 |
<table class="form-table">
|
382 |
<? for ($i=1; $i<=5; $i++) { ?>
|
383 |
+
<tr valign="top"><?php hefo_field_textarea('snippet_' . $i, __('Snippet ' . $i, 'header-footer'), ''); ?></tr>
|
384 |
<? } ?>
|
385 |
</table>
|
386 |
<div class="clearfix"></div>
|
392 |
<?php
|
393 |
hefo_field_textarea('mobile_user_agents', __('Mobile user agent strings', 'header-footer'), 'For coders: a regular expression is built with those values and the resulting code will be<br>'
|
394 |
. '<code>preg_match(\'/' . $options['mobile_user_agents_parsed'] . '/\', ...);</code><br>' .
|
395 |
+
'<a href="http://www.satollo.net/plugins/header-footer" target="_blank">Read this page</a> for more.');
|
396 |
?>
|
397 |
|
398 |
</tr>
|
439 |
|
440 |
<div id="tabs-7">
|
441 |
<table class="form-table">
|
442 |
+
<tr valign="top"><?php hefo_field_textarea('notes', __('Notes and parked codes', 'header-footer'), ''); ?></tr>
|
443 |
</table>
|
444 |
<div class="clearfix"></div>
|
445 |
</div>
|
449 |
|
450 |
</div>
|
451 |
<p>* if no mobile alternative is activated</p>
|
452 |
+
<p class="submit"><input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('save', 'header-footer'); ?>"></p>
|
453 |
|
454 |
</form>
|
455 |
</div>
|
plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Head, Footer and Post Injections
|
5 |
Plugin URI: https://www.satollo.net/plugins/header-footer
|
6 |
Description: Header and Footer lets to add html/javascript code to the head and footer and posts of your blog. Some examples are provided on the <a href="http://www.satollo.net/plugins/header-footer">official page</a>.
|
7 |
-
Version: 3.2.
|
8 |
Requires PHP: 5.6
|
9 |
Requires at least: 4.6
|
10 |
Author: Stefano Lissa
|
4 |
Plugin Name: Head, Footer and Post Injections
|
5 |
Plugin URI: https://www.satollo.net/plugins/header-footer
|
6 |
Description: Header and Footer lets to add html/javascript code to the head and footer and posts of your blog. Some examples are provided on the <a href="http://www.satollo.net/plugins/header-footer">official page</a>.
|
7 |
+
Version: 3.2.5
|
8 |
Requires PHP: 5.6
|
9 |
Requires at least: 4.6
|
10 |
Author: Stefano Lissa
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== Head, Footer and Post Injections ===
|
2 |
Tags: header, footer, ads, analytics, facebook pixel, amp
|
3 |
Tested up to: 6.0
|
4 |
-
Stable tag: 3.2.
|
5 |
-
Donate link:
|
6 |
Contributors: satollo
|
7 |
|
8 |
|
@@ -12,7 +12,7 @@ Header and Footer plugin let you to add html code to the head and footer section
|
|
12 |
|
13 |
About WordPress SEO and Facebook Open Graph: I was very unpleased by Yoast invitation to
|
14 |
remove my plugin, and it's not the case.
|
15 |
-
[Read more here](
|
16 |
|
17 |
= Head and Footer Codes =
|
18 |
|
@@ -89,9 +89,14 @@ FAQs are answered on [Header and Footer](http://www.satollo.net/plugins/header-f
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
|
|
|
|
92 |
= 3.2.4 =
|
93 |
|
94 |
-
*
|
95 |
|
96 |
= 3.2.3 =
|
97 |
|
1 |
=== Head, Footer and Post Injections ===
|
2 |
Tags: header, footer, ads, analytics, facebook pixel, amp
|
3 |
Tested up to: 6.0
|
4 |
+
Stable tag: 3.2.5
|
5 |
+
Donate link: https://www.satollo.net/donations
|
6 |
Contributors: satollo
|
7 |
|
8 |
|
12 |
|
13 |
About WordPress SEO and Facebook Open Graph: I was very unpleased by Yoast invitation to
|
14 |
remove my plugin, and it's not the case.
|
15 |
+
[Read more here](https://www.satollo.net/yoast-and-wordpress-seo-this-is-too-much-conflict-with-header-and-footer).
|
16 |
|
17 |
= Head and Footer Codes =
|
18 |
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 3.2.5 =
|
93 |
+
|
94 |
+
* Removed obsolete code
|
95 |
+
* Escaped added to fixed and translated strings
|
96 |
+
|
97 |
= 3.2.4 =
|
98 |
|
99 |
+
* Possible security fix
|
100 |
|
101 |
= 3.2.3 =
|
102 |
|