Version Description
- Removed the Facebook setting (move to a specialized plugin to have the Facebook Open Graph Meta)
- Removed bbPress setting (please use bbpress ads)
- Label fix
- Removed notices
- 5 post injections and 5 generic injections
Download this release
Release Info
Developer | satollo |
Plugin | Head, Footer and Post Injections |
Version | 3.1.0 |
Comparing to | |
See all releases |
Code changes from version 3.0.7 to 3.1.0
- admin.css +6 -0
- options.php +33 -240
- plugin.php +8 -7
- readme.txt +9 -1
admin.css
CHANGED
@@ -126,4 +126,10 @@ h3 {
|
|
126 |
|
127 |
.hf-index-entry:hover {
|
128 |
border-color: #ddd;
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
}
|
126 |
|
127 |
.hf-index-entry:hover {
|
128 |
border-color: #ddd;
|
129 |
+
}
|
130 |
+
|
131 |
+
.col-2 label {
|
132 |
+
font-size: 12px;
|
133 |
+
text-transform: uppercase;
|
134 |
+
display: block;
|
135 |
}
|
options.php
CHANGED
@@ -312,24 +312,6 @@ else {
|
|
312 |
</div>
|
313 |
<?php } ?>
|
314 |
|
315 |
-
<?php if (!isset($dismissed['og'])) { ?>
|
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') ?>">×</a>
|
320 |
-
</p>
|
321 |
-
</div>
|
322 |
-
<?php } ?>
|
323 |
-
|
324 |
-
<?php if (!isset($dismissed['bbpress'])) { ?>
|
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') ?>">×</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>
|
@@ -362,17 +344,12 @@ else {
|
|
362 |
<a href="http://www.satollo.net/plugins/ads-bbpress?utm_source=header-footer&utm_medium=link&utm_campaign=ads-bbpress" target="_blank">Ads for bbPress</a>.
|
363 |
</p>
|
364 |
|
365 |
-
<p>
|
366 |
-
|
367 |
-
</p>
|
368 |
-
|
369 |
-
|
370 |
<p>
|
371 |
<?php
|
372 |
if (apply_filters('hefo_php_exec', true)) {
|
373 |
_e('PHP is allowed in your code.');
|
374 |
} else {
|
375 |
-
_e('PHP is NOT allowed in your code (
|
376 |
}
|
377 |
?>
|
378 |
</p>
|
@@ -383,20 +360,12 @@ else {
|
|
383 |
<div id="tab-container" class="tab-container">
|
384 |
<ul class="etabs">
|
385 |
<li class='tab'><a href="#tabs-first"><?php _e('Head and footer', 'header-footer'); ?></a></li>
|
386 |
-
<li class='tab'><a href="#tabs-generics"><?php _e('Generics', 'header-footer'); ?></a></li>
|
387 |
<li class='tab'><a href="#tabs-post"><?php _e('Posts', 'header-footer'); ?></a></li>
|
388 |
<li class='tab'><a href="#tabs-post-inner"><?php _e('Inside posts', 'header-footer'); ?></a></li>
|
389 |
-
<!--<li class='tab'><a href="#tabs-post-mobile"><?php _e('Post content (mobile)', 'header-footer'); ?></a></li>-->
|
390 |
<li class='tab'><a href="#tabs-page"><?php _e('Pages', 'header-footer'); ?></a></li>
|
391 |
-
<!--<li class='tab'><a href="#tabs-page-mobile"><?php _e('Page content (mobile)', 'header-footer'); ?></a></li>-->
|
392 |
-
<li class='tab'><a href="#tabs-4"><?php _e('Facebook', 'header-footer'); ?></a></li>
|
393 |
-
<li class='tab'><a href="#tabs-9"><?php _e('SEO', 'header-footer'); ?></a></li>
|
394 |
<li class='tab'><a href="#tabs-5"><?php _e('Snippets', 'header-footer'); ?></a></li>
|
395 |
-
<li class='tab'><a href="#tabs-6"><?php _e('BBPress', 'header-footer'); ?></a></li>
|
396 |
-
<!--
|
397 |
-
<li><a href="#tabs-6a"><?php _e('Other post types', 'header-footer'); ?></a></li>
|
398 |
-
-->
|
399 |
<li class='tab'><a href="#tabs-amp"><?php _e('AMP', 'header-footer'); ?></a></li>
|
|
|
400 |
<li class='tab'><a href="#tabs-8"><?php _e('Advanced', 'header-footer'); ?></a></li>
|
401 |
<li class='tab'><a href="#tabs-7"><?php _e('Notes and...', 'header-footer'); ?></a></li>
|
402 |
<li class='tab'><a href="#tabs-thankyou"><?php _e('Thank you', 'header-footer'); ?></a></li>
|
@@ -406,40 +375,40 @@ else {
|
|
406 |
|
407 |
<div id="tabs-first">
|
408 |
|
409 |
-
<h3
|
410 |
<div class="row">
|
411 |
|
412 |
<div class="col-2">
|
413 |
-
|
414 |
<?php hefo_base_textarea_cm('head'); ?>
|
415 |
</div>
|
416 |
<div class="col-2">
|
417 |
-
Only home page
|
418 |
<?php hefo_base_textarea_cm('head_home'); ?>
|
419 |
</div>
|
420 |
</div>
|
421 |
|
422 |
-
<h3
|
423 |
<div class="row">
|
424 |
|
425 |
<div class="col-2">
|
426 |
-
|
427 |
<?php hefo_base_textarea_cm('body'); ?>
|
428 |
</div>
|
429 |
<div class="col-2">
|
430 |
-
<?php hefo_base_checkbox('mobile_body_enabled', __('Mobile', 'header-footer'));
|
431 |
<?php hefo_base_textarea_cm('mobile_body'); ?>
|
432 |
</div>
|
433 |
|
434 |
</div>
|
435 |
-
<h3
|
436 |
<div class="row">
|
437 |
<div class="col-2">
|
438 |
-
|
439 |
<?php hefo_base_textarea_cm('footer'); ?>
|
440 |
</div>
|
441 |
<div class="col-2">
|
442 |
-
<?php hefo_base_checkbox('mobile_footer_enabled', __('Mobile', 'header-footer'));
|
443 |
<?php hefo_base_textarea_cm('mobile_footer'); ?>
|
444 |
</div>
|
445 |
</div>
|
@@ -450,16 +419,16 @@ else {
|
|
450 |
|
451 |
<div id="tabs-generics">
|
452 |
|
453 |
-
<?php for ($i = 1; $i
|
454 |
<h3>Generic injection <?php echo $i; ?></h3>
|
455 |
<p>Inject before the <?php hefo_base_text('generic_tag_' . $i); ?> marker</p>
|
456 |
<div class="row">
|
457 |
<div class="col-2">
|
458 |
-
|
459 |
<?php hefo_base_textarea_cm('generic_' . $i); ?>
|
460 |
</div>
|
461 |
<div class="col-2">
|
462 |
-
<?php hefo_base_checkbox('mobile_generic_enabled_' . $i, __('Mobile', 'header-footer'));
|
463 |
<?php hefo_base_textarea_cm('mobile_generic_' . $i); ?>
|
464 |
</div>
|
465 |
</div>
|
@@ -476,30 +445,30 @@ else {
|
|
476 |
See the "advanced tab" to configure the mobile device detection.
|
477 |
</p>
|
478 |
|
479 |
-
<h3
|
480 |
<div class="row">
|
481 |
|
482 |
<div class="col-2">
|
483 |
-
Desktop
|
484 |
<?php hefo_base_textarea_cm('before'); ?>
|
485 |
</div>
|
486 |
<div class="col-2">
|
487 |
-
<?php hefo_base_checkbox('mobile_before_enabled', __('Mobile', 'header-footer'));
|
488 |
<?php hefo_base_textarea_cm('mobile_before'); ?>
|
489 |
</div>
|
490 |
</div>
|
491 |
|
492 |
<div class="clearfix"></div>
|
493 |
|
494 |
-
<h3
|
495 |
<div class="row">
|
496 |
|
497 |
<div class="col-2">
|
498 |
-
Desktop
|
499 |
<?php hefo_base_textarea_cm('after'); ?>
|
500 |
</div>
|
501 |
<div class="col-2">
|
502 |
-
<?php hefo_base_checkbox('mobile_after_enabled', __('Mobile', 'header-footer'));
|
503 |
<?php hefo_base_textarea_cm('mobile_after'); ?>
|
504 |
</div>
|
505 |
</div>
|
@@ -523,16 +492,16 @@ else {
|
|
523 |
|
524 |
<div id="tabs-post-inner">
|
525 |
|
526 |
-
<?php for ($i = 1; $i
|
527 |
<h3>Inner post injection <?php echo $i; ?></h3>
|
528 |
<?php hefo_rule($i); ?>
|
529 |
<div class="row">
|
530 |
<div class="col-2">
|
531 |
-
|
532 |
<?php hefo_base_textarea_cm('inner_' . $i); ?>
|
533 |
</div>
|
534 |
<div class="col-2">
|
535 |
-
<?php hefo_base_checkbox('mobile_inner_enabled_' . $i, __('Mobile', 'header-footer'));
|
536 |
<?php hefo_base_textarea_cm('mobile_inner_' . $i); ?>
|
537 |
</div>
|
538 |
</div>
|
@@ -547,11 +516,11 @@ else {
|
|
547 |
<?php hefo_base_checkbox('page_add_tags', __('Let pages to have tags', 'header-footer')); ?><br>
|
548 |
<?php hefo_base_checkbox('page_add_categories', __('Let pages to have categories', 'header-footer')); ?>
|
549 |
|
550 |
-
<h3
|
551 |
<div class="row">
|
552 |
|
553 |
<div class="col-2">
|
554 |
-
|
555 |
<?php hefo_base_textarea_cm('page_before'); ?>
|
556 |
</div>
|
557 |
<div class="col-2">
|
@@ -562,11 +531,11 @@ else {
|
|
562 |
|
563 |
<div class="clearfix"></div>
|
564 |
|
565 |
-
<h3
|
566 |
<div class="row">
|
567 |
|
568 |
<div class="col-2">
|
569 |
-
Desktop
|
570 |
<?php hefo_base_textarea_cm('page_after'); ?>
|
571 |
</div>
|
572 |
<div class="col-2">
|
@@ -580,72 +549,6 @@ else {
|
|
580 |
</div>
|
581 |
|
582 |
|
583 |
-
<div id="tabs-4">
|
584 |
-
<p>
|
585 |
-
<strong>This panel is no more active. Please use a specialized plugin for Facebook Open Graph.</strong>
|
586 |
-
</p>
|
587 |
-
|
588 |
-
<p>
|
589 |
-
<?php _e('If you use WordPress SEO or other plugin which already add the OpenGraph meta tag, leave these options disabled.') ?>
|
590 |
-
</p>
|
591 |
-
<table class="form-table">
|
592 |
-
<tr valign="top"><?php hefo_field_checkbox('og_enabled', __('Enable the OG metatag', 'header-footer'), __('Enable the Facebook Open Graph metatag', 'header-footer')); ?></tr>
|
593 |
-
|
594 |
-
<tr valign="top"><?php hefo_field_text('fb_app_id', __('Facebook application id', 'header-footer'), __('', 'header-footer')); ?></tr>
|
595 |
-
<tr valign="top"><?php hefo_field_text('og_type', __('Facebook page type for the generic web page', 'header-footer'), __('Usually "article" is the right choice, if empty will be skipped', 'header-footer')); ?></tr>
|
596 |
-
<tr valign="top"><?php hefo_field_text('og_type_home', __('Facebook page type for the home', 'header-footer'), __('Usually "blog" is a good choice, if empty will be used the generic type', 'header-footer')); ?></tr>
|
597 |
-
<tr valign="top"><?php hefo_field_checkbox('og_image', __('Facebook Open Graph Image', 'header-footer'), __('Adds the Facebook Open Graph metatag with a reference to the first post image', 'header-footer')); ?></tr>
|
598 |
-
<tr valign="top">
|
599 |
-
<th scope="row">
|
600 |
-
<label for="options[' . $name . ']"><?php _e('Facebook Open Graph default image'); ?></label>
|
601 |
-
</th>
|
602 |
-
<td>
|
603 |
-
<input type="text" id="og_image_default" name="options[og_image_default]" value="<?php echo htmlspecialchars($options['og_image_default']); ?>" size="50"/>
|
604 |
-
<input type="button" id="upload-image" value="Select/Upload an image"/>
|
605 |
-
<br />
|
606 |
-
<?php _e('If no image can be extracted from a post, that image URL will be used (if present).'); ?><br />
|
607 |
-
<?php _e('<strong>Warning.</strong> On some versions of WordPress after the image selection button is pressed the tabs above does not change anymore. Just save so
|
608 |
-
this page is reloaded (<a href="http://wordpress.org/support/topic/wp-32-thickbox-jquery-ui-tabs-conflict" target="_blank">reference</a>).'); ?>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
</table>
|
612 |
-
<div class="clearfix"></div>
|
613 |
-
</div>
|
614 |
-
|
615 |
-
|
616 |
-
<div id="tabs-9">
|
617 |
-
<p>
|
618 |
-
<?php _e('Please, see the <a href="http://www.satollo.net/plugins/header-footer" target="_blank">Header and Footer</strong></a> page before to use those options.'); ?>
|
619 |
-
</p>
|
620 |
-
<p>
|
621 |
-
<?php _e('Note: most of these options are now available on SEO plugins.'); ?>
|
622 |
-
</p>
|
623 |
-
|
624 |
-
<!--<h3>SEO</h3>-->
|
625 |
-
<table class="form-table">
|
626 |
-
<tr valign="top">
|
627 |
-
<th scope="row">
|
628 |
-
Home
|
629 |
-
</th>
|
630 |
-
<?php hefo_field_checkbox_only('seo_home_paged_noindex', __('Add noindex for page 2 and up', 'header-footer')); ?>
|
631 |
-
</tr>
|
632 |
-
<tr valign="top">
|
633 |
-
<th scope="row">
|
634 |
-
Search results
|
635 |
-
</th>
|
636 |
-
<?php hefo_field_checkbox_only('seo_search_noindex', __('Add noindex for search result pages', 'header-footer')); ?>
|
637 |
-
</tr>
|
638 |
-
<tr valign="top">
|
639 |
-
<th scope="row">
|
640 |
-
Canonical on home
|
641 |
-
</th>
|
642 |
-
<?php hefo_field_checkbox_only('seo_home_canonical', __('Add canonical to home page', 'header-footer')); ?>
|
643 |
-
</tr>
|
644 |
-
</table>
|
645 |
-
<div class="clearfix"></div>
|
646 |
-
</div>
|
647 |
-
|
648 |
-
|
649 |
<!-- AMP -->
|
650 |
|
651 |
<div id="tabs-amp">
|
@@ -654,7 +557,7 @@ else {
|
|
654 |
in the near future.
|
655 |
</p>
|
656 |
|
657 |
-
<h3
|
658 |
<div class="row">
|
659 |
<div class="col-1">
|
660 |
<?php hefo_base_textarea_cm('amp_head'); ?>
|
@@ -663,7 +566,7 @@ else {
|
|
663 |
|
664 |
<div class="clearfix"></div>
|
665 |
|
666 |
-
<h3
|
667 |
<div class="row">
|
668 |
<div class="col-1">
|
669 |
<?php hefo_base_textarea_cm('amp_css', 'css'); ?>
|
@@ -672,7 +575,7 @@ else {
|
|
672 |
|
673 |
<div class="clearfix"></div>
|
674 |
|
675 |
-
<h3
|
676 |
<div class="row">
|
677 |
<div class="col-1">
|
678 |
|
@@ -682,7 +585,7 @@ else {
|
|
682 |
|
683 |
<div class="clearfix"></div>
|
684 |
|
685 |
-
<h3
|
686 |
<div class="row">
|
687 |
|
688 |
<div class="col-1">
|
@@ -693,7 +596,7 @@ else {
|
|
693 |
</div>
|
694 |
<div class="clearfix"></div>
|
695 |
|
696 |
-
<h3
|
697 |
<div class="row">
|
698 |
|
699 |
<div class="col-1">
|
@@ -721,89 +624,6 @@ else {
|
|
721 |
<div class="clearfix"></div>
|
722 |
</div>
|
723 |
|
724 |
-
<div id="tabs-6">
|
725 |
-
<p>
|
726 |
-
<strong>Please, use the new <a href="https://wordpress.org/plugins/ads-bbpress/" target="_blank">Ads for bbPress</a> plugin to inject code on bbPress pages.</strong>
|
727 |
-
</p>
|
728 |
-
<p>
|
729 |
-
Injection points on bbPress default theme structure are not always clear to me, so consider this feature experimental.
|
730 |
-
</p>
|
731 |
-
<h3>Before a single forum</h3>
|
732 |
-
<div class="row">
|
733 |
-
<div class="col-2">
|
734 |
-
Desktop<br>
|
735 |
-
<?php hefo_base_textarea_cm('bbp_template_before_single_forum'); ?>
|
736 |
-
</div>
|
737 |
-
<div class="col-2">
|
738 |
-
<?php hefo_base_checkbox('mobile_bbp_template_before_single_forum_enabled', __('Mobile', 'header-footer')); ?><br>
|
739 |
-
<?php hefo_base_textarea_cm('mobile_bbp_template_before_single_forum'); ?>
|
740 |
-
</div>
|
741 |
-
</div>
|
742 |
-
|
743 |
-
<h3>Before a single topic</h3>
|
744 |
-
<div class="row">
|
745 |
-
<div class="col-2">
|
746 |
-
Desktop<br>
|
747 |
-
<?php hefo_base_textarea_cm('bbp_template_before_single_topic'); ?>
|
748 |
-
</div>
|
749 |
-
<div class="col-2">
|
750 |
-
<?php hefo_base_checkbox('mobile_bbp_template_before_single_topic_enabled', __('Mobile', 'header-footer')); ?><br>
|
751 |
-
<?php hefo_base_textarea_cm('mobile_bbp_template_before_single_topic'); ?>
|
752 |
-
</div>
|
753 |
-
</div>
|
754 |
-
|
755 |
-
<h3>After a single topic</h3>
|
756 |
-
<div class="row">
|
757 |
-
<div class="col-2">
|
758 |
-
Desktop<br>
|
759 |
-
<?php hefo_base_textarea_cm('bbp_template_after_single_topic'); ?>
|
760 |
-
</div>
|
761 |
-
<div class="col-2">
|
762 |
-
<?php hefo_base_checkbox('mobile_bbp_template_after_single_topic_enabled', __('Mobile', 'header-footer')); ?><br>
|
763 |
-
<?php hefo_base_textarea_cm('mobile_bbp_template_after_single_topic'); ?>
|
764 |
-
</div>
|
765 |
-
</div>
|
766 |
-
|
767 |
-
<h3>Before a single reply</h3>
|
768 |
-
<div class="row">
|
769 |
-
<div class="col-2">
|
770 |
-
Desktop<br>
|
771 |
-
<?php hefo_base_textarea_cm('bbp_theme_before_reply_content'); ?>
|
772 |
-
</div>
|
773 |
-
<div class="col-2">
|
774 |
-
<?php hefo_base_checkbox('mobile_bbp_theme_before_reply_content_enabled', __('Mobile', 'header-footer')); ?><br>
|
775 |
-
<?php hefo_base_textarea_cm('mobile_bbp_theme_before_reply_content'); ?>
|
776 |
-
</div>
|
777 |
-
</div>
|
778 |
-
|
779 |
-
<h3>After a single reply</h3>
|
780 |
-
<div class="row">
|
781 |
-
<div class="col-2">
|
782 |
-
Desktop<br>
|
783 |
-
<?php hefo_base_textarea_cm('bbp_theme_after_reply_content'); ?>
|
784 |
-
</div>
|
785 |
-
<div class="col-2">
|
786 |
-
<?php hefo_base_checkbox('mobile_bbp_theme_after_reply_content_enabled', __('Mobile', 'header-footer')); ?><br>
|
787 |
-
<?php hefo_base_textarea_cm('mobile_bbp_theme_after_reply_content'); ?>
|
788 |
-
</div>
|
789 |
-
</div>
|
790 |
-
<div class="clearfix"></div>
|
791 |
-
</div>
|
792 |
-
<!--
|
793 |
-
<div id="tabs-6s">
|
794 |
-
<p>
|
795 |
-
</p>
|
796 |
-
<?php $post_types = get_post_types(array('public' => true, '_builtin' => false), 'objects'); ?>
|
797 |
-
<?php foreach ($post_types as $post_type) { ?>
|
798 |
-
<h3><?php echo esc_html($post_type->label) ?> (<?php echo esc_html($post_type->name) ?>)</h3>
|
799 |
-
<table class="form-table">
|
800 |
-
<tr><?php hefo_field_textarea($post_type->name . '_before', __('Before the content', 'header-footer'), '', 'rows="10"'); ?></tr>
|
801 |
-
<tr><?php hefo_field_textarea($post_type->name . '_after', __('After the content', 'header-footer'), '', 'rows="10"'); ?></tr>
|
802 |
-
</table>
|
803 |
-
<?php } ?>
|
804 |
-
</div>
|
805 |
-
-->
|
806 |
-
|
807 |
<div id="tabs-8">
|
808 |
<table class="form-table">
|
809 |
<tr valign="top">
|
@@ -816,34 +636,6 @@ else {
|
|
816 |
</tr>
|
817 |
</table>
|
818 |
|
819 |
-
<?php /*
|
820 |
-
<h3>Web performance</h3>
|
821 |
-
<p>
|
822 |
-
Some JavaScript can be marked to be loaded asynchronously, for example the comment-reply.js of WordPress.
|
823 |
-
Not always asynchronous load work, for example jQuery cannot usually loaded in this way. Since WordPress does
|
824 |
-
not support this feature natively, here you can force thise feature on specific scripts.<br>
|
825 |
-
Usually you can add comment-reply, akismet-form, admin-bar.<br>
|
826 |
-
You can read more on <a href="http://www.satollo.net/javascript-asyn-load-for-wordpress-enqueued-scripts" target="_blank">this article</a>
|
827 |
-
and/or ask on my <a href="http://www.satollo.net/forums" target="_blank">forum area</a>.
|
828 |
-
</p>
|
829 |
-
|
830 |
-
<table class="form-table">
|
831 |
-
|
832 |
-
<tr valign="top">
|
833 |
-
<th scope="row">
|
834 |
-
Script handle debug
|
835 |
-
</th>
|
836 |
-
<?php hefo_field_checkbox_only('script_handle_debug', __('Activate in page debug info: see the source page to find the handles', 'header-footer')); ?>
|
837 |
-
|
838 |
-
</tr>
|
839 |
-
<tr valign="top">
|
840 |
-
<?php
|
841 |
-
hefo_field_textarea('script_async_handles', __('Script handles to load asynchronously', 'header-footer'), 'One per line', 'rows="10"');
|
842 |
-
?>
|
843 |
-
</tr>
|
844 |
-
</table>
|
845 |
-
*/ ?>
|
846 |
-
|
847 |
<h3>Head meta links</h3>
|
848 |
<p>
|
849 |
WordPress automatically add some meta link on the head of the page, for example the RSS links, the previous and next
|
@@ -900,6 +692,7 @@ else {
|
|
900 |
</div>
|
901 |
|
902 |
</div>
|
|
|
903 |
<p class="submit"><input type="submit" class="button" name="save" value="<?php _e('save', 'header-footer'); ?>"></p>
|
904 |
|
905 |
</form>
|
312 |
</div>
|
313 |
<?php } ?>
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
<?php if (!isset($dismissed['newsletter'])) { ?>
|
316 |
<div class="notice notice-success"><p>
|
317 |
If you want to be informed of important updated of this plugin, you may want to subscribe to my (rare) newsletter<br>
|
344 |
<a href="http://www.satollo.net/plugins/ads-bbpress?utm_source=header-footer&utm_medium=link&utm_campaign=ads-bbpress" target="_blank">Ads for bbPress</a>.
|
345 |
</p>
|
346 |
|
|
|
|
|
|
|
|
|
|
|
347 |
<p>
|
348 |
<?php
|
349 |
if (apply_filters('hefo_php_exec', true)) {
|
350 |
_e('PHP is allowed in your code.');
|
351 |
} else {
|
352 |
+
_e('PHP is NOT allowed in your code (disabled by your theme or a plugin)');
|
353 |
}
|
354 |
?>
|
355 |
</p>
|
360 |
<div id="tab-container" class="tab-container">
|
361 |
<ul class="etabs">
|
362 |
<li class='tab'><a href="#tabs-first"><?php _e('Head and footer', 'header-footer'); ?></a></li>
|
|
|
363 |
<li class='tab'><a href="#tabs-post"><?php _e('Posts', 'header-footer'); ?></a></li>
|
364 |
<li class='tab'><a href="#tabs-post-inner"><?php _e('Inside posts', 'header-footer'); ?></a></li>
|
|
|
365 |
<li class='tab'><a href="#tabs-page"><?php _e('Pages', 'header-footer'); ?></a></li>
|
|
|
|
|
|
|
366 |
<li class='tab'><a href="#tabs-5"><?php _e('Snippets', 'header-footer'); ?></a></li>
|
|
|
|
|
|
|
|
|
367 |
<li class='tab'><a href="#tabs-amp"><?php _e('AMP', 'header-footer'); ?></a></li>
|
368 |
+
<li class='tab'><a href="#tabs-generics"><?php _e('Generics', 'header-footer'); ?></a></li>
|
369 |
<li class='tab'><a href="#tabs-8"><?php _e('Advanced', 'header-footer'); ?></a></li>
|
370 |
<li class='tab'><a href="#tabs-7"><?php _e('Notes and...', 'header-footer'); ?></a></li>
|
371 |
<li class='tab'><a href="#tabs-thankyou"><?php _e('Thank you', 'header-footer'); ?></a></li>
|
375 |
|
376 |
<div id="tabs-first">
|
377 |
|
378 |
+
<h3><?php esc_html_e('<HEAD> page section injection', 'header-footer')?></h3>
|
379 |
<div class="row">
|
380 |
|
381 |
<div class="col-2">
|
382 |
+
<label><?php esc_html_e('On every page', 'header-footer')?></label>
|
383 |
<?php hefo_base_textarea_cm('head'); ?>
|
384 |
</div>
|
385 |
<div class="col-2">
|
386 |
+
<label><?php esc_html_e('Only on the home page', 'header-footer')?></label>
|
387 |
<?php hefo_base_textarea_cm('head_home'); ?>
|
388 |
</div>
|
389 |
</div>
|
390 |
|
391 |
+
<h3><?php esc_html_e('After the <BODY> tag', 'header-footer')?></h3>
|
392 |
<div class="row">
|
393 |
|
394 |
<div class="col-2">
|
395 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
396 |
<?php hefo_base_textarea_cm('body'); ?>
|
397 |
</div>
|
398 |
<div class="col-2">
|
399 |
+
<?php hefo_base_checkbox('mobile_body_enabled', __('Mobile', 'header-footer')); ?>
|
400 |
<?php hefo_base_textarea_cm('mobile_body'); ?>
|
401 |
</div>
|
402 |
|
403 |
</div>
|
404 |
+
<h3><?php esc_html_e('Before the </BODY> closing tag (footer)', 'header-footer')?></h3>
|
405 |
<div class="row">
|
406 |
<div class="col-2">
|
407 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
408 |
<?php hefo_base_textarea_cm('footer'); ?>
|
409 |
</div>
|
410 |
<div class="col-2">
|
411 |
+
<?php hefo_base_checkbox('mobile_footer_enabled', __('Mobile', 'header-footer')); ?>
|
412 |
<?php hefo_base_textarea_cm('mobile_footer'); ?>
|
413 |
</div>
|
414 |
</div>
|
419 |
|
420 |
<div id="tabs-generics">
|
421 |
|
422 |
+
<?php for ($i = 1; $i <= 5; $i++) { ?>
|
423 |
<h3>Generic injection <?php echo $i; ?></h3>
|
424 |
<p>Inject before the <?php hefo_base_text('generic_tag_' . $i); ?> marker</p>
|
425 |
<div class="row">
|
426 |
<div class="col-2">
|
427 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
428 |
<?php hefo_base_textarea_cm('generic_' . $i); ?>
|
429 |
</div>
|
430 |
<div class="col-2">
|
431 |
+
<?php hefo_base_checkbox('mobile_generic_enabled_' . $i, __('Mobile', 'header-footer')); ?>
|
432 |
<?php hefo_base_textarea_cm('mobile_generic_' . $i); ?>
|
433 |
</div>
|
434 |
</div>
|
445 |
See the "advanced tab" to configure the mobile device detection.
|
446 |
</p>
|
447 |
|
448 |
+
<h3><?php esc_html_e('Before the post content', 'header-footer'); ?></h3>
|
449 |
<div class="row">
|
450 |
|
451 |
<div class="col-2">
|
452 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
453 |
<?php hefo_base_textarea_cm('before'); ?>
|
454 |
</div>
|
455 |
<div class="col-2">
|
456 |
+
<?php hefo_base_checkbox('mobile_before_enabled', __('Mobile', 'header-footer')); ?>
|
457 |
<?php hefo_base_textarea_cm('mobile_before'); ?>
|
458 |
</div>
|
459 |
</div>
|
460 |
|
461 |
<div class="clearfix"></div>
|
462 |
|
463 |
+
<h3><?php esc_html_e('After the post content', 'header-footer'); ?></h3>
|
464 |
<div class="row">
|
465 |
|
466 |
<div class="col-2">
|
467 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
468 |
<?php hefo_base_textarea_cm('after'); ?>
|
469 |
</div>
|
470 |
<div class="col-2">
|
471 |
+
<?php hefo_base_checkbox('mobile_after_enabled', __('Mobile', 'header-footer')); ?>
|
472 |
<?php hefo_base_textarea_cm('mobile_after'); ?>
|
473 |
</div>
|
474 |
</div>
|
492 |
|
493 |
<div id="tabs-post-inner">
|
494 |
|
495 |
+
<?php for ($i = 1; $i <= 5; $i++) { ?>
|
496 |
<h3>Inner post injection <?php echo $i; ?></h3>
|
497 |
<?php hefo_rule($i); ?>
|
498 |
<div class="row">
|
499 |
<div class="col-2">
|
500 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
501 |
<?php hefo_base_textarea_cm('inner_' . $i); ?>
|
502 |
</div>
|
503 |
<div class="col-2">
|
504 |
+
<?php hefo_base_checkbox('mobile_inner_enabled_' . $i, __('Mobile', 'header-footer')); ?>
|
505 |
<?php hefo_base_textarea_cm('mobile_inner_' . $i); ?>
|
506 |
</div>
|
507 |
</div>
|
516 |
<?php hefo_base_checkbox('page_add_tags', __('Let pages to have tags', 'header-footer')); ?><br>
|
517 |
<?php hefo_base_checkbox('page_add_categories', __('Let pages to have categories', 'header-footer')); ?>
|
518 |
|
519 |
+
<h3><?php _e('Before the page content', 'header-footer') ?></h3>
|
520 |
<div class="row">
|
521 |
|
522 |
<div class="col-2">
|
523 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
524 |
<?php hefo_base_textarea_cm('page_before'); ?>
|
525 |
</div>
|
526 |
<div class="col-2">
|
531 |
|
532 |
<div class="clearfix"></div>
|
533 |
|
534 |
+
<h3><?php _e('After the page content', 'header-footer') ?></h3>
|
535 |
<div class="row">
|
536 |
|
537 |
<div class="col-2">
|
538 |
+
<label><?php _e('Desktop', 'header-footer') ?>*</label>
|
539 |
<?php hefo_base_textarea_cm('page_after'); ?>
|
540 |
</div>
|
541 |
<div class="col-2">
|
549 |
</div>
|
550 |
|
551 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
<!-- AMP -->
|
553 |
|
554 |
<div id="tabs-amp">
|
557 |
in the near future.
|
558 |
</p>
|
559 |
|
560 |
+
<h3><?php esc_html_e('<HEAD> page section', 'header-footer')?></h3>
|
561 |
<div class="row">
|
562 |
<div class="col-1">
|
563 |
<?php hefo_base_textarea_cm('amp_head'); ?>
|
566 |
|
567 |
<div class="clearfix"></div>
|
568 |
|
569 |
+
<h3><?php esc_html_e('Extra CSS', 'header-footer')?></h3>
|
570 |
<div class="row">
|
571 |
<div class="col-1">
|
572 |
<?php hefo_base_textarea_cm('amp_css', 'css'); ?>
|
575 |
|
576 |
<div class="clearfix"></div>
|
577 |
|
578 |
+
<h3><?php esc_html_e('Before the post content', 'header-footer')?></h3>
|
579 |
<div class="row">
|
580 |
<div class="col-1">
|
581 |
|
585 |
|
586 |
<div class="clearfix"></div>
|
587 |
|
588 |
+
<h3><?php esc_html_e('After the post content', 'header-footer')?></h3>
|
589 |
<div class="row">
|
590 |
|
591 |
<div class="col-1">
|
596 |
</div>
|
597 |
<div class="clearfix"></div>
|
598 |
|
599 |
+
<h3><?php esc_html_e('Footer', 'header-footer')?></h3>
|
600 |
<div class="row">
|
601 |
|
602 |
<div class="col-1">
|
624 |
<div class="clearfix"></div>
|
625 |
</div>
|
626 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
627 |
<div id="tabs-8">
|
628 |
<table class="form-table">
|
629 |
<tr valign="top">
|
636 |
</tr>
|
637 |
</table>
|
638 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
639 |
<h3>Head meta links</h3>
|
640 |
<p>
|
641 |
WordPress automatically add some meta link on the head of the page, for example the RSS links, the previous and next
|
692 |
</div>
|
693 |
|
694 |
</div>
|
695 |
+
<p>* if no mobile alternative is activated</p>
|
696 |
<p class="submit"><input type="submit" class="button" name="save" value="<?php _e('save', 'header-footer'); ?>"></p>
|
697 |
|
698 |
</form>
|
plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Head, Footer and Post Injections
|
5 |
Plugin URI: http://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.0
|
8 |
Author: Stefano Lissa
|
9 |
Author URI: http://www.satollo.net
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -70,7 +70,7 @@ function hefo_template_redirect() {
|
|
70 |
} else {
|
71 |
$hefo_body_block = hefo_execute($hefo_options['body']);
|
72 |
}
|
73 |
-
for ($i = 1; $i
|
74 |
if ($hefo_is_mobile && isset($hefo_options['mobile_generic_enabled_' . $i])) {
|
75 |
if (isset($hefo_options['mobile_generic_' . $i]))
|
76 |
$hefo_generic_block[$i] = hefo_execute($hefo_options['mobile_generic_' . $i]);
|
@@ -85,7 +85,7 @@ function hefo_template_redirect() {
|
|
85 |
function hefo_callback($buffer) {
|
86 |
global $hefo_body_block, $hefo_generic_block, $hefo_options, $hefo_is_mobile;
|
87 |
|
88 |
-
for ($i = 1; $i
|
89 |
if (isset($hefo_options['generic_tag_' . $i]))
|
90 |
hefo_insert_before($buffer, $hefo_generic_block[$i], $hefo_options['generic_tag_' . $i]);
|
91 |
}
|
@@ -347,7 +347,7 @@ function hefo_the_content($content) {
|
|
347 |
|
348 |
|
349 |
|
350 |
-
for ($i = 1; $i
|
351 |
if (empty($hefo_options['inner_tag_' . $i])) {
|
352 |
continue;
|
353 |
}
|
@@ -356,9 +356,9 @@ function hefo_the_content($content) {
|
|
356 |
$prefix = 'mobile_';
|
357 |
}
|
358 |
$skip = trim($hefo_options['inner_skip_' . $i]);
|
359 |
-
if (empty($skip))
|
360 |
$skip = 0;
|
361 |
-
else if (substr($skip, -1) == '%') {
|
362 |
$skip = (intval($skip) * strlen($content) / 100);
|
363 |
}
|
364 |
|
@@ -444,8 +444,9 @@ function hefo_replace($buffer) {
|
|
444 |
}
|
445 |
|
446 |
for ($i = 1; $i <= 5; $i++) {
|
447 |
-
if (!isset($hefo_options['snippet_' . $i]))
|
448 |
$hefo_options['snippet_' . $i] = '';
|
|
|
449 |
$buffer = str_replace('[snippet_' . $i . ']', $hefo_options['snippet_' . $i], $buffer);
|
450 |
}
|
451 |
|
4 |
Plugin Name: Head, Footer and Post Injections
|
5 |
Plugin URI: http://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.1.0
|
8 |
Author: Stefano Lissa
|
9 |
Author URI: http://www.satollo.net
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
70 |
} else {
|
71 |
$hefo_body_block = hefo_execute($hefo_options['body']);
|
72 |
}
|
73 |
+
for ($i = 1; $i <= 5; $i++) {
|
74 |
if ($hefo_is_mobile && isset($hefo_options['mobile_generic_enabled_' . $i])) {
|
75 |
if (isset($hefo_options['mobile_generic_' . $i]))
|
76 |
$hefo_generic_block[$i] = hefo_execute($hefo_options['mobile_generic_' . $i]);
|
85 |
function hefo_callback($buffer) {
|
86 |
global $hefo_body_block, $hefo_generic_block, $hefo_options, $hefo_is_mobile;
|
87 |
|
88 |
+
for ($i = 1; $i <= 5; $i++) {
|
89 |
if (isset($hefo_options['generic_tag_' . $i]))
|
90 |
hefo_insert_before($buffer, $hefo_generic_block[$i], $hefo_options['generic_tag_' . $i]);
|
91 |
}
|
347 |
|
348 |
|
349 |
|
350 |
+
for ($i = 1; $i <= 5; $i++) {
|
351 |
if (empty($hefo_options['inner_tag_' . $i])) {
|
352 |
continue;
|
353 |
}
|
356 |
$prefix = 'mobile_';
|
357 |
}
|
358 |
$skip = trim($hefo_options['inner_skip_' . $i]);
|
359 |
+
if (empty($skip)) {
|
360 |
$skip = 0;
|
361 |
+
} else if (substr($skip, -1) == '%') {
|
362 |
$skip = (intval($skip) * strlen($content) / 100);
|
363 |
}
|
364 |
|
444 |
}
|
445 |
|
446 |
for ($i = 1; $i <= 5; $i++) {
|
447 |
+
if (!isset($hefo_options['snippet_' . $i])) {
|
448 |
$hefo_options['snippet_' . $i] = '';
|
449 |
+
}
|
450 |
$buffer = str_replace('[snippet_' . $i . ']', $hefo_options['snippet_' . $i], $buffer);
|
451 |
}
|
452 |
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Head, Footer and Post Injections ===
|
2 |
Tags: header, footer, blog, page, single, post, head, tracking, facebook, og meta tag, open graph, ads, adsense, injections, analytics, amp, pixel
|
3 |
Requires at least: 3.0
|
4 |
-
Tested up to: 4.
|
5 |
Stable tag: 3.0.7
|
6 |
Donate link: http://www.satollo.net/donations
|
7 |
Contributors: satollo
|
@@ -93,6 +93,14 @@ FAQs are answered on [Header and Footer](http://www.satollo.net/plugins/header-f
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
= 3.0.7 =
|
97 |
|
98 |
* Added the filter "hefo_php_exec" to let a third party to disable the PHP execution
|
1 |
=== Head, Footer and Post Injections ===
|
2 |
Tags: header, footer, blog, page, single, post, head, tracking, facebook, og meta tag, open graph, ads, adsense, injections, analytics, amp, pixel
|
3 |
Requires at least: 3.0
|
4 |
+
Tested up to: 4.8.2
|
5 |
Stable tag: 3.0.7
|
6 |
Donate link: http://www.satollo.net/donations
|
7 |
Contributors: satollo
|
93 |
|
94 |
== Changelog ==
|
95 |
|
96 |
+
= 3.1.0 =
|
97 |
+
|
98 |
+
* Removed the Facebook setting (move to a specialized plugin to have the Facebook Open Graph Meta)
|
99 |
+
* Removed bbPress setting (please use bbpress ads)
|
100 |
+
* Label fix
|
101 |
+
* Removed notices
|
102 |
+
* 5 post injections and 5 generic injections
|
103 |
+
|
104 |
= 3.0.7 =
|
105 |
|
106 |
* Added the filter "hefo_php_exec" to let a third party to disable the PHP execution
|