Version Description
Major UI changes for admin settings and compatibility with WP 4.5
Download this release
Release Info
Developer | hiddenpearls |
Plugin | Related Posts Thumbnails Plugin for WordPress |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.5.0
- readme.txt +11 -5
- related-posts-thumbnails.php +683 -312
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
=== Related Posts Thumbnails ===
|
2 |
Contributors: marynixie
|
3 |
Donate link: http://wordpress.shaldybina.com/donate
|
4 |
-
Tags: related, posts,
|
5 |
Requires at least: 2.9
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
-
Customizable plugin, that nicely displays related posts thumbnails under the post.
|
10 |
|
11 |
== Description ==
|
12 |
|
@@ -20,7 +20,7 @@ You can specify number of related posts to display, start date, categories to sh
|
|
20 |
|
21 |
Contributions:
|
22 |
|
23 |
-
* Thanks to <a href="http://adnan.pk/">Adnan</a> for updates to make it compatible with Wordpress 4.4
|
24 |
|
25 |
Translations:
|
26 |
|
@@ -65,6 +65,9 @@ If there are no images of the specified size in the post, or file does not exist
|
|
65 |
|
66 |
== Changelog ==
|
67 |
|
|
|
|
|
|
|
68 |
= 1.4.0
|
69 |
* compatibility with WP 4.4
|
70 |
|
@@ -143,6 +146,9 @@ If there are no images of the specified size in the post, or file does not exist
|
|
143 |
|
144 |
== Upgrade Notice ==
|
145 |
|
|
|
|
|
|
|
146 |
= 1.3 =
|
147 |
Added support of custom types and taxonomies, fixed double quotes and shortcodes
|
148 |
|
1 |
=== Related Posts Thumbnails ===
|
2 |
Contributors: marynixie
|
3 |
Donate link: http://wordpress.shaldybina.com/donate
|
4 |
+
Tags: related, posts, thumbnails, Related Content, related posts, pages, similar posts, shortcodes, widgets
|
5 |
Requires at least: 2.9
|
6 |
+
Tested up to: 4.5.3
|
7 |
+
Stable tag: 1.5.0
|
8 |
|
9 |
+
The Best Customizable plugin, that nicely displays related posts thumbnails under the post.
|
10 |
|
11 |
== Description ==
|
12 |
|
20 |
|
21 |
Contributions:
|
22 |
|
23 |
+
* Thanks to <a href="http://adnan.pk/">Adnan</a> for updates to make it compatible with Wordpress 4.4 and 4.5
|
24 |
|
25 |
Translations:
|
26 |
|
65 |
|
66 |
== Changelog ==
|
67 |
|
68 |
+
= 1.5.0
|
69 |
+
* Major UI changes for admin settings and compatibility with WP 4.5
|
70 |
+
|
71 |
= 1.4.0
|
72 |
* compatibility with WP 4.4
|
73 |
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
149 |
+
= 1.5.0 =
|
150 |
+
Major UI changes for admin settings and compatibility with WP 4.5
|
151 |
+
|
152 |
= 1.3 =
|
153 |
Added support of custom types and taxonomies, fixed double quotes and shortcodes
|
154 |
|
related-posts-thumbnails.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Related Posts Thumbnails
|
4 |
* Plugin URI: http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/
|
5 |
* Description: Showing related posts thumbnails under the post.
|
6 |
-
* Version: 1.
|
7 |
* Author: Maria Shaldybina
|
8 |
* Author URI: http://shaldybina.com/
|
9 |
*/
|
@@ -483,35 +483,138 @@ class RelatedPostsThumbnails {
|
|
483 |
update_option( 'relpoststh_onlywiththumbs', '0' );
|
484 |
}
|
485 |
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
513 |
update_option( 'relpoststh_startdate', $set_date );
|
514 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
echo "<div class='updated fade'><p>" . __( 'Settings updated', 'related-posts-thumbnails' ) .'</p></div>';
|
516 |
} else {
|
517 |
echo "<div class='error fade'><p>" . __( 'Settings update failed', 'related-posts-thumbnails' ) . '. '. $error . '</p></div>';
|
@@ -557,290 +660,558 @@ class RelatedPostsThumbnails {
|
|
557 |
$relation_options['custom'] .= ' '. __( '(This option is available for WP v3+ only)', 'related_posts_thumbnails' );
|
558 |
}
|
559 |
?>
|
560 |
-
<script type="text/javascript">
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
<h2><?php _e( '
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
<
|
823 |
-
|
824 |
-
<?php endif; ?>
|
825 |
-
<div id="custom_taxonomies" style="display: <?php if ( $relpoststh_relation == 'custom' ) { echo 'inline';
|
826 |
-
} else { echo 'none'; }?>;">
|
827 |
-
<?php if ( is_array( $custom_taxonomies ) && count( $custom_taxonomies ) ) : ?>
|
828 |
-
<?php foreach ( $custom_taxonomies as $custom_taxonomy ) : ?>
|
829 |
-
<input type="checkbox" name="relpoststh_custom_taxonomies[]" id="ct_<?php echo $custom_taxonomy; ?>" value="<?php echo $custom_taxonomy; ?>" <?php if ( in_array( $custom_taxonomy, $relpoststh_custom_taxonomies ) ) { echo 'checked="checked"'; } ?>/>
|
830 |
-
<label for="ct_<?php echo $custom_taxonomy; ?>"><?php echo $custom_taxonomy; ?></label>
|
831 |
-
<?php endforeach; ?>
|
832 |
-
<?php endif; ?>
|
833 |
</div>
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
</
|
842 |
-
<
|
843 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
}
|
845 |
|
846 |
function display_categories_list( $categoriesall, $categories, $selected_categories, $all_name, $specific_name ) {
|
3 |
* Plugin Name: Related Posts Thumbnails
|
4 |
* Plugin URI: http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/
|
5 |
* Description: Showing related posts thumbnails under the post.
|
6 |
+
* Version: 1.5.0
|
7 |
* Author: Maria Shaldybina
|
8 |
* Author URI: http://shaldybina.com/
|
9 |
*/
|
483 |
update_option( 'relpoststh_onlywiththumbs', '0' );
|
484 |
}
|
485 |
|
486 |
+
if( isset( $_POST['relpoststh_output_style'] ) ) {
|
487 |
+
update_option( 'relpoststh_output_style', sanitize_text_field( wp_unslash( $_POST['relpoststh_output_style'] ) ) );
|
488 |
+
}
|
489 |
+
|
490 |
+
if( isset( $_POST['relpoststh_cleanhtml'] ) ) {
|
491 |
+
update_option( 'relpoststh_cleanhtml', sanitize_text_field( wp_unslash( $_POST['relpoststh_cleanhtml'] ) ) );
|
492 |
+
} else {
|
493 |
+
update_option( 'relpoststh_cleanhtml', '0' );
|
494 |
+
}
|
495 |
+
|
496 |
+
if( isset( $_POST['relpoststh_auto'] ) ) {
|
497 |
+
update_option( 'relpoststh_auto', sanitize_text_field( wp_unslash( $_POST['relpoststh_auto'] ) ) );
|
498 |
+
} else {
|
499 |
+
update_option( 'relpoststh_auto', '0' );
|
500 |
+
}
|
501 |
+
|
502 |
+
if( isset( $_POST['relpoststh_top_text'] ) ) {
|
503 |
+
update_option( 'relpoststh_top_text', sanitize_text_field( wp_unslash( $_POST['relpoststh_top_text'] ) ) );
|
504 |
+
}
|
505 |
+
|
506 |
+
|
507 |
+
if( isset( $_POST['relpoststh_number'] ) ) {
|
508 |
+
update_option( 'relpoststh_number', absint( $_POST['relpoststh_number'] ) );
|
509 |
+
}
|
510 |
+
|
511 |
+
if( isset( $_POST['relpoststh_relation'] ) ) {
|
512 |
+
update_option( 'relpoststh_relation', sanitize_text_field( wp_unslash( $_POST['relpoststh_relation'] ) ) );
|
513 |
+
}
|
514 |
+
|
515 |
+
if( isset( $_POST['relpoststh_default_image'] ) ) {
|
516 |
+
update_option( 'relpoststh_default_image', sanitize_text_field( wp_unslash( $_POST['relpoststh_default_image'] ) ) );
|
517 |
+
}
|
518 |
+
|
519 |
+
if( isset( $_POST['relpoststh_poststhname'] ) ) {
|
520 |
+
update_option( 'relpoststh_poststhname', sanitize_text_field( wp_unslash( $_POST['relpoststh_poststhname'] ) ) );
|
521 |
+
}
|
522 |
+
|
523 |
+
if( isset( $_POST['relpoststh_background'] ) ) {
|
524 |
+
update_option( 'relpoststh_background', sanitize_text_field( wp_unslash( $_POST['relpoststh_background'] ) ) );
|
525 |
+
}
|
526 |
+
|
527 |
+
if( isset( $_POST['relpoststh_hoverbackground'] ) ) {
|
528 |
+
update_option( 'relpoststh_hoverbackground', sanitize_text_field( wp_unslash( $_POST['relpoststh_hoverbackground'] ) ) );
|
529 |
+
}
|
530 |
+
|
531 |
+
|
532 |
+
if( isset( $_POST['relpoststh_bordercolor'] ) ) {
|
533 |
+
update_option( 'relpoststh_bordercolor', sanitize_text_field( wp_unslash( $_POST['relpoststh_bordercolor'] ) ) );
|
534 |
+
}
|
535 |
+
|
536 |
+
if( isset( $_POST['relpoststh_fontcolor'] ) ) {
|
537 |
+
update_option( 'relpoststh_fontcolor', sanitize_text_field( wp_unslash( $_POST['relpoststh_fontcolor'] ) ) );
|
538 |
+
}
|
539 |
+
|
540 |
+
if( isset( $_POST['relpoststh_fontsize'] ) ) {
|
541 |
+
update_option( 'relpoststh_fontsize', sanitize_text_field( wp_unslash( $_POST['relpoststh_fontsize'] ) ) );
|
542 |
+
}
|
543 |
+
|
544 |
+
if( isset( $_POST['relpoststh_fontfamily'] ) ) {
|
545 |
+
update_option( 'relpoststh_fontfamily', sanitize_text_field( wp_unslash( $_POST['relpoststh_fontfamily'] ) ) );
|
546 |
+
}
|
547 |
+
|
548 |
+
if( isset( $_POST['relpoststh_textlength'] ) ) {
|
549 |
+
update_option( 'relpoststh_textlength', sanitize_text_field( wp_unslash( $_POST['relpoststh_textlength'] ) ) );
|
550 |
+
}
|
551 |
+
|
552 |
+
if( isset( $_POST['relpoststh_excerptlength'] ) ) {
|
553 |
+
update_option( 'relpoststh_excerptlength', sanitize_text_field( wp_unslash( $_POST['relpoststh_excerptlength'] ) ) );
|
554 |
+
}
|
555 |
+
|
556 |
+
if( isset( $_POST['relpoststh_thsource'] ) ) {
|
557 |
+
update_option( 'relpoststh_thsource', sanitize_text_field( wp_unslash( $_POST['relpoststh_thsource'] ) ) );
|
558 |
+
}
|
559 |
+
|
560 |
+
if( isset( $_POST['relpoststh_customfield'] ) ) {
|
561 |
+
update_option( 'relpoststh_customfield', sanitize_text_field( wp_unslash( $_POST['relpoststh_customfield'] ) ) );
|
562 |
+
}
|
563 |
+
|
564 |
+
if( isset( $_POST['relpoststh_theme_resize_url'] ) ) {
|
565 |
+
update_option( 'relpoststh_theme_resize_url', sanitize_text_field( wp_unslash( $_POST['relpoststh_theme_resize_url'] ) ) );
|
566 |
+
}
|
567 |
+
|
568 |
+
if( isset( $_POST['relpoststh_customwidth'] ) ) {
|
569 |
+
update_option( 'relpoststh_customwidth', sanitize_text_field( wp_unslash( $_POST['relpoststh_customwidth'] ) ) );
|
570 |
+
}
|
571 |
+
|
572 |
+
if( isset( $_POST['relpoststh_customheight'] ) ) {
|
573 |
+
update_option( 'relpoststh_customheight', sanitize_text_field( wp_unslash( $_POST['relpoststh_customheight'] ) ) );
|
574 |
+
}
|
575 |
+
|
576 |
+
if( isset( $_POST['relpoststh_textblockheight'] ) ) {
|
577 |
+
update_option( 'relpoststh_textblockheight', sanitize_text_field( wp_unslash( $_POST['relpoststh_textblockheight'] ) ) );
|
578 |
+
}
|
579 |
+
|
580 |
+
if( isset( $_POST['relpoststh_customwidth'] ) ) {
|
581 |
+
update_option( 'relpoststh_customwidth', sanitize_text_field( wp_unslash( $_POST['relpoststh_customwidth'] ) ) );
|
582 |
+
}
|
583 |
+
|
584 |
+
if( isset( $_POST['relpoststh_categories'] ) ) {
|
585 |
+
update_option( 'relpoststh_categories', array_map( 'sanitize_text_field', wp_unslash( $_POST['relpoststh_categories'] ) ) );
|
586 |
+
} else {
|
587 |
+
update_option( 'relpoststh_categories', array() );
|
588 |
+
}
|
589 |
+
|
590 |
+
if( isset( $_POST['relpoststh_categoriesall'] ) ) {
|
591 |
+
update_option( 'relpoststh_categoriesall', sanitize_text_field( wp_unslash( $_POST['relpoststh_categoriesall'] ) ) );
|
592 |
+
}
|
593 |
+
|
594 |
+
if( isset( $_POST['relpoststh_show_categoriesall'] ) ) {
|
595 |
+
update_option( 'relpoststh_show_categoriesall', sanitize_text_field( wp_unslash( $_POST['relpoststh_show_categoriesall'] ) ) );
|
596 |
+
}
|
597 |
+
|
598 |
+
if( isset( $_POST['relpoststh_show_categories'] ) ) {
|
599 |
+
update_option( 'relpoststh_show_categories', array_map( 'sanitize_text_field', wp_unslash( $_POST['relpoststh_show_categories'] ) ) );
|
600 |
+
} else {
|
601 |
+
update_option( 'relpoststh_show_categories', array() );
|
602 |
+
}
|
603 |
+
|
604 |
+
if( isset( $_POST['relpoststh_devmode'] ) ) {
|
605 |
+
update_option( 'relpoststh_devmode', sanitize_text_field( wp_unslash( $_POST['relpoststh_devmode'] ) ) );
|
606 |
+
} else {
|
607 |
+
update_option( 'relpoststh_devmode', '0' );
|
608 |
+
}
|
609 |
+
|
610 |
update_option( 'relpoststh_startdate', $set_date );
|
611 |
+
|
612 |
+
if( isset( $_POST['relpoststh_custom_taxonomies'] ) ) {
|
613 |
+
update_option( 'relpoststh_custom_taxonomies', array_map( 'sanitize_text_field', wp_unslash( $_POST['relpoststh_custom_taxonomies'] ) ) );
|
614 |
+
} else {
|
615 |
+
update_option( 'relpoststh_custom_taxonomies', array() );
|
616 |
+
}
|
617 |
+
|
618 |
echo "<div class='updated fade'><p>" . __( 'Settings updated', 'related-posts-thumbnails' ) .'</p></div>';
|
619 |
} else {
|
620 |
echo "<div class='error fade'><p>" . __( 'Settings update failed', 'related-posts-thumbnails' ) . '. '. $error . '</p></div>';
|
660 |
$relation_options['custom'] .= ' '. __( '(This option is available for WP v3+ only)', 'related_posts_thumbnails' );
|
661 |
}
|
662 |
?>
|
663 |
+
<script type="text/javascript">
|
664 |
+
jQuery(document).ready(function($) {
|
665 |
+
|
666 |
+
$('#wpbr_rpt_relation_options').on('click', function(){
|
667 |
+
|
668 |
+
$('.nav-tab').removeClass('nav-tab-active');
|
669 |
+
$(this).addClass('nav-tab-active');
|
670 |
+
|
671 |
+
$('#content_general_options').hide();
|
672 |
+
$('#content_style_options').hide();
|
673 |
+
$('#content_thumbnail_options').hide();
|
674 |
+
$('#content_relation_options').show();
|
675 |
+
|
676 |
+
});
|
677 |
+
|
678 |
+
$('#wpbr_rpt_general_options').on('click', function(){
|
679 |
+
|
680 |
+
$('.nav-tab').removeClass('nav-tab-active');
|
681 |
+
$(this).addClass('nav-tab-active');
|
682 |
+
|
683 |
+
$('#content_general_options').show();
|
684 |
+
$('#content_style_options').hide();
|
685 |
+
$('#content_thumbnail_options').hide();
|
686 |
+
$('#content_relation_options').hide();
|
687 |
+
|
688 |
+
});
|
689 |
+
|
690 |
+
|
691 |
+
$('#wpbr_rpt_style_options').on('click', function(){
|
692 |
+
|
693 |
+
$('.nav-tab').removeClass('nav-tab-active');
|
694 |
+
$(this).addClass('nav-tab-active');
|
695 |
+
|
696 |
+
$('#content_general_options').hide();
|
697 |
+
$('#content_style_options').show();
|
698 |
+
$('#content_thumbnail_options').hide();
|
699 |
+
$('#content_relation_options').hide();
|
700 |
+
|
701 |
+
});
|
702 |
+
|
703 |
+
|
704 |
+
$('#wpbr_rpt_thumbnails_source').on('click', function(){
|
705 |
+
|
706 |
+
$('.nav-tab').removeClass('nav-tab-active');
|
707 |
+
$(this).addClass('nav-tab-active');
|
708 |
+
|
709 |
+
$('#content_general_options').hide();
|
710 |
+
$('#content_style_options').hide();
|
711 |
+
$('#content_thumbnail_options').show();
|
712 |
+
$('#content_relation_options').hide();
|
713 |
+
|
714 |
+
});
|
715 |
+
|
716 |
+
|
717 |
+
|
718 |
+
|
719 |
+
$(".select_all").click(function(){
|
720 |
+
if (this.checked) {
|
721 |
+
$(this).parent().find("div.select_specific").hide();
|
722 |
+
}
|
723 |
+
else {
|
724 |
+
$(this).parent().find("div.select_specific").show();
|
725 |
+
}
|
726 |
+
});
|
727 |
+
$('#relpoststh_thsource').change(function(){
|
728 |
+
if (this.value == 'post-thumbnails') {
|
729 |
+
$('#relpoststh-post-thumbnails').show();
|
730 |
+
$('#relpoststh-custom-field').hide();
|
731 |
+
}
|
732 |
+
else {
|
733 |
+
$('#relpoststh-post-thumbnails').hide();
|
734 |
+
$('#relpoststh-custom-field').show();
|
735 |
+
}
|
736 |
+
});
|
737 |
+
$('#relpoststh_output_style').change(function(){
|
738 |
+
if (this.value == 'list') {
|
739 |
+
$('#relpoststh_cleanhtml').show();
|
740 |
+
}
|
741 |
+
else {
|
742 |
+
$('#relpoststh_cleanhtml').hide();
|
743 |
+
}
|
744 |
+
});
|
745 |
+
$("input[name='relpoststh_relation']").change(function(){
|
746 |
+
if ($("input[name='relpoststh_relation']:checked").val() == 'custom') {
|
747 |
+
$('#custom_taxonomies').show();
|
748 |
+
}
|
749 |
+
else {
|
750 |
+
$('#custom_taxonomies').hide();
|
751 |
+
}
|
752 |
+
});
|
753 |
+
});
|
754 |
+
</script>
|
755 |
+
<style>
|
756 |
+
#relpoststh-settings .nav-tab-wrapper li a {
|
757 |
+
float: none;
|
758 |
+
margin:0;
|
759 |
+
padding: 7px 20px;
|
760 |
+
display: block;
|
761 |
+
height: auto;
|
762 |
+
background: none;
|
763 |
+
}
|
764 |
+
|
765 |
+
#relpoststh-settings .nav-tab-wrapper li{
|
766 |
+
margin-bottom: 0;
|
767 |
+
margin-left: -1px;
|
768 |
+
}
|
769 |
+
#relpoststh-settings::after{
|
770 |
+
display: table;
|
771 |
+
content: "";
|
772 |
+
clear: both;
|
773 |
+
}
|
774 |
+
#relpoststh-settings{
|
775 |
+
display: table;
|
776 |
+
width: calc(100% - 2px);
|
777 |
+
border:1px solid #ccc;
|
778 |
+
margin: 0;
|
779 |
+
}
|
780 |
+
|
781 |
+
.relpoststh .wpbr-tabsWrapper{
|
782 |
+
width: calc(100% - 250px);
|
783 |
+
float: left;
|
784 |
+
}
|
785 |
+
#relpoststh-settings .nav-tab-wrapper{
|
786 |
+
display: table-cell;
|
787 |
+
vertical-align: top;
|
788 |
+
width: 202px;
|
789 |
+
}
|
790 |
+
.relpoststh .form-table th:first-child{
|
791 |
+
width: 110px;
|
792 |
+
}
|
793 |
+
.relpoststh #relpoststh-settings .metabox-holder{
|
794 |
+
display: table-cell;
|
795 |
+
padding: 10px;
|
796 |
+
background: #fff;
|
797 |
+
}
|
798 |
+
#relpoststh-settings .nav-tab-wrapper li:first-child{
|
799 |
+
margin-top: -1px;
|
800 |
+
}
|
801 |
+
#relpoststh-settings .nav-tab-wrapper li a.nav-tab-active{
|
802 |
+
background: #fff;
|
803 |
+
}
|
804 |
+
#relpoststh-settings .nav-tab-wrapper li a.nav-tab-active{
|
805 |
+
border-right: transparent;
|
806 |
+
}
|
807 |
+
#relpoststh-settings .nav-tab-wrapper li:last-child a{
|
808 |
+
border-bottom: 1px solid #ccc;
|
809 |
+
}
|
810 |
+
.relpoststh #the-list .approve{
|
811 |
+
display: block;
|
812 |
+
}
|
813 |
+
.relpoststh .postbox{
|
814 |
+
padding: 10px;
|
815 |
+
}
|
816 |
+
.relpoststh .wpbr-sidebar{
|
817 |
+
width: 235px;
|
818 |
+
float: right;
|
819 |
+
min-width: inherit;
|
820 |
+
box-sizing: border-box;
|
821 |
+
}
|
822 |
+
.relpoststh .wpbr-sidebar .postbox{
|
823 |
+
min-width: inherit;
|
824 |
+
width: auto;
|
825 |
+
}
|
826 |
+
.relpoststh .wpbr-sidebar ul li a{
|
827 |
+
width: 100%;
|
828 |
+
display: block;
|
829 |
+
}
|
830 |
+
.relpoststh .wpbr-sidebar .wp-core-ui .button{
|
831 |
+
position: relative;
|
832 |
+
}
|
833 |
+
.relpoststh .wpbr-sidebar .dashicons{
|
834 |
+
position: absolute;
|
835 |
+
right: 10px;
|
836 |
+
margin-top: 3px;
|
837 |
+
}
|
838 |
+
.relpoststh .postbox ul li a{
|
839 |
+
position: relative;
|
840 |
+
}
|
841 |
+
|
842 |
+
.relpoststh .wpbr-button-container{
|
843 |
+
padding: 10px 0;
|
844 |
+
overflow: hidden;
|
845 |
+
}
|
846 |
+
.relpoststh .wpbr-social-links a{
|
847 |
+
text-decoration: none;
|
848 |
+
}
|
849 |
+
.relpoststh .wpbr-button-container{
|
850 |
+
padding: 10px;
|
851 |
+
overflow: hidden;
|
852 |
+
border:1px solid #ccc;
|
853 |
+
|
854 |
+
}
|
855 |
+
.relpoststh .wpbr-button-container.top{
|
856 |
+
border-bottom: 0;
|
857 |
+
}
|
858 |
+
.relpoststh .wpbr-button-container.bottom{
|
859 |
+
border-top: 0;
|
860 |
+
}
|
861 |
+
.relpoststh .wpbrmedia-settings-submit{
|
862 |
+
float:right;
|
863 |
+
}
|
864 |
+
.relpoststh .wpbr-sidebar h2{
|
865 |
+
margin: 0;
|
866 |
+
padding: 10px;
|
867 |
+
border-bottom: 1px solid #ccc;
|
868 |
+
}
|
869 |
+
.relpoststh .wpbr-sidebar ul li .twitter .dashicons {
|
870 |
+
color: #45b0e3;
|
871 |
+
}
|
872 |
+
.relpoststh .wpbr-sidebar ul li .facebook .dashicons {
|
873 |
+
color: #3b5998;
|
874 |
+
}
|
875 |
+
.relpoststh .wpbr-sidebar ul li .wordpress .dashicons {
|
876 |
+
color: #21759b;
|
877 |
+
}
|
878 |
+
.relpoststh .wpbr-sidebar ul li .rss .dashicons {
|
879 |
+
color: #FF6600;
|
880 |
+
}
|
881 |
+
#relpoststh-settings p.submit{
|
882 |
+
display: none;
|
883 |
+
}
|
884 |
+
.relpoststh #wpbr_custom_css .form-table th{
|
885 |
+
width: 0;
|
886 |
+
}
|
887 |
+
.relpoststh #wpbr_custom_css .form-table td{
|
888 |
+
width: 100%;
|
889 |
+
}
|
890 |
+
.relpoststh .wpbr-wrap:after{
|
891 |
+
content: '';
|
892 |
+
display: table;
|
893 |
+
clear: both;
|
894 |
+
}
|
895 |
+
|
896 |
+
.relpoststh .metabox-holder{
|
897 |
+
padding-top: 0 !important;
|
898 |
+
padding-right: 15px !important;
|
899 |
+
}
|
900 |
+
|
901 |
+
.relpoststh .setting-notification{
|
902 |
+
position: absolute;
|
903 |
+
width: auto;
|
904 |
+
padding: 16px 10px;
|
905 |
+
left: 0;
|
906 |
+
top: 0;
|
907 |
+
background-color: #fcf8e3;
|
908 |
+
color: #c09853;
|
909 |
+
height: 100%;
|
910 |
+
box-sizing: border-box;
|
911 |
+
display: none;
|
912 |
+
}
|
913 |
+
|
914 |
+
</style>
|
915 |
+
<div class="wrap relpoststh">
|
916 |
+
<div class="icon32" id="icon-options-general"><br></div>
|
917 |
+
<h2><?php _e( 'Related Posts Thumbnails Settings', 'related-posts-thumbnails' ); ?></h2>
|
918 |
+
|
919 |
+
<form action="?page=related-posts-thumbnails" method="POST" style="clear:both;">
|
920 |
+
<input type="hidden" name="action" value="update" />
|
921 |
+
<?php wp_nonce_field( 'related-posts-thumbnails' ); ?>
|
922 |
+
|
923 |
+
<div class="wpbr-wrap"><div class="wpbr-tabsWrapper">
|
924 |
+
<div class="wpbr-button-container top">
|
925 |
+
<div class="setting-notification">
|
926 |
+
<?php echo __( 'Settings have changed, you should save them!' , 'related-posts-thumbnails' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
927 |
</div>
|
928 |
+
<input type="submit" name="Submit" class="wpbrmedia-settings-submit button button-primary button-big" value="<?php esc_html_e( 'Save Settings','related-posts-thumbnails' );?>" id="wpbr_save_setting_top">
|
929 |
+
</div>
|
930 |
+
|
931 |
+
<div id="relpoststh-settings" class="">
|
932 |
+
<ul class="nav-tab-wrapper">
|
933 |
+
<li> <a href="#nogo" class="nav-tab nav-tab-active" id="wpbr_rpt_general_options">General Display Options</a> </li>
|
934 |
+
<li> <a href="#nogo" class="nav-tab" id="wpbr_rpt_thumbnails_source">Thumbnails source</a> </li>
|
935 |
+
<li> <a href="#nogo" class="nav-tab" id="wpbr_rpt_style_options">Style options:</a> </li>
|
936 |
+
<li> <a href="#nogo" class="nav-tab" id="wpbr_rpt_relation_options">Relation Builder Options</a> </li>
|
937 |
+
</ul>
|
938 |
+
|
939 |
+
<div class="metabox-holder">
|
940 |
+
<div class="postbox" style="padding: 20px" id="content_general_options">
|
941 |
+
<h2><?php _e( 'General Display Options', 'related-posts-thumbnails' ); ?>:</h2>
|
942 |
+
|
943 |
+
<table class="form-table">
|
944 |
+
<tr valign="top">
|
945 |
+
<th scope="row"><?php _e( 'Automatically append to the post content', 'related-posts-thumbnails' ); ?>:</th>
|
946 |
+
<td>
|
947 |
+
<input type="checkbox" name="relpoststh_auto" id="relpoststh_auto" value="1" <?php if ( $relpoststh_auto ) { echo 'checked="checked"'; } ?>/>
|
948 |
+
<label for="relpoststh_auto"><?php _e( 'Or use <b><?php get_related_posts_thumbnails(); ?></b> in the Loop', 'related-posts-thumbnails' ); ?></label><br />
|
949 |
+
</td>
|
950 |
+
</tr>
|
951 |
+
<tr valign="top">
|
952 |
+
<th scope="row"><?php _e( 'Developer mode', 'related-posts-thumbnails' ); ?>:</th>
|
953 |
+
<td>
|
954 |
+
<input type="checkbox" name="relpoststh_devmode" id="relpoststh_devmode" value="1" <?php if ( $relpoststh_devmode ) { echo 'checked="checked"'; } ?>/>
|
955 |
+
<label for="relpoststh_devmode"><?php _e( 'This will add debugging information in HTML source', 'related-posts-thumbnails' ); ?></label><br />
|
956 |
+
</td>
|
957 |
+
</tr>
|
958 |
+
<tr valign="top">
|
959 |
+
<th scope="row"><?php _e( 'Page type', 'related-posts-thumbnails' ); ?>:</th>
|
960 |
+
<td>
|
961 |
+
<input type="checkbox" name="relpoststh_single_only" id="relpoststh_single_only" value="1" <?php if ( $relpoststh_single_only ) { echo 'checked="checked"'; } ?>/>
|
962 |
+
<label for="relpoststh_single_only"><?php _e( 'Show on single posts only', 'related-posts-thumbnails' ); ?></label><br />
|
963 |
+
</td>
|
964 |
+
</tr>
|
965 |
+
<tr valign="top">
|
966 |
+
<th scope="row"><?php _e( 'Post types', 'related-posts-thumbnails' ); ?>:</th>
|
967 |
+
<td>
|
968 |
+
<?php if ( is_array( $post_types ) && count( $post_types ) ) : ?>
|
969 |
+
<?php foreach ( $post_types as $post_type ) : ?>
|
970 |
+
<input type="checkbox" name="relpoststh_post_types[]" id="pt_<?php echo $post_type; ?>" value="<?php echo $post_type; ?>" <?php if ( in_array( $post_type, $relpoststh_post_types ) ) { echo 'checked="checked"'; } ?>/>
|
971 |
+
<label for="pt_<?php echo $post_type; ?>"><?php echo $post_type; ?></label>
|
972 |
+
<?php endforeach; ?>
|
973 |
+
<?php endif; ?>
|
974 |
+
</td>
|
975 |
+
</tr>
|
976 |
+
<tr valign="top">
|
977 |
+
<th scope="row"><?php _e( 'Categories on which related thumbnails will appear', 'related-posts-thumbnails' ); ?>:</th>
|
978 |
+
<td>
|
979 |
+
<?php $this->display_categories_list( $relpoststh_categoriesall, $categories, $relpoststh_categories, 'relpoststh_categoriesall', 'relpoststh_categories' ); ?>
|
980 |
+
</td>
|
981 |
+
</tr>
|
982 |
+
<tr valign="top">
|
983 |
+
<th scope="row"><?php _e( 'Categories that will appear in related thumbnails', 'related-posts-thumbnails' ); ?>:</th>
|
984 |
+
<td>
|
985 |
+
<?php $this->display_categories_list( $relpoststh_show_categoriesall, $categories, $relpoststh_show_categories, 'relpoststh_show_categoriesall', 'relpoststh_show_categories' ); ?>
|
986 |
+
</td>
|
987 |
+
</tr>
|
988 |
+
<tr>
|
989 |
+
<th scope="row"><?php _e( 'Include only posts after', 'related-posts-thumbnails' ); ?>:</th>
|
990 |
+
<td>
|
991 |
+
<?php _e( 'Year', 'related-posts-thumbnails' ); ?>: <input type="text" name="relpoststh_year" size="4" value="<?php if ( isset( $relpoststh_startdate[0] ) ) { echo $relpoststh_startdate[0]; } ?>"> <?php _e( 'Month', 'related-posts-thumbnails' ); ?>: <input type="text" name="relpoststh_month" size="2" value="<?php if ( isset( $relpoststh_startdate[1] ) ) { echo $relpoststh_startdate[1]; } ?>"> <?php _e( 'Day', 'related-posts-thumbnails' ); ?>: <input type="text" name="relpoststh_day" size="2" value="<?php if ( isset( $relpoststh_startdate[2] ) ) { echo $relpoststh_startdate[2]; } ?>"> <label for="relpoststh_excerptlength"><?php _e( 'Leave empty for all posts dates', 'related-posts-thumbnails' ); ?></label><br />
|
992 |
+
</td>
|
993 |
+
</tr>
|
994 |
+
<tr>
|
995 |
+
<th scope="row"><?php _e( 'Top text', 'related-posts-thumbnails' ); ?>:</th>
|
996 |
+
<td>
|
997 |
+
<input type="text" name="relpoststh_top_text" value="<?php echo stripslashes( htmlspecialchars( get_option( 'relpoststh_top_text', $this->top_text ) ) ); ?>" size="50"/>
|
998 |
+
</td>
|
999 |
+
</tr>
|
1000 |
+
<tr>
|
1001 |
+
<th scope="row"><?php _e( 'Number of similar posts to display', 'related-posts-thumbnails' ); ?>:</th>
|
1002 |
+
<td>
|
1003 |
+
<input type="text" name="relpoststh_number" value="<?php echo get_option( 'relpoststh_number', $this->number ); ?>" size="2"/>
|
1004 |
+
</td>
|
1005 |
+
</tr>
|
1006 |
+
<tr>
|
1007 |
+
<th scope="row"><?php _e( 'Default image URL', 'related-posts-thumbnails' ); ?>:</th>
|
1008 |
+
<td>
|
1009 |
+
<input type="text" name="relpoststh_default_image" value="<?php echo get_option( 'relpoststh_default_image', $this->default_image );?>" size="50"/>
|
1010 |
+
</td>
|
1011 |
+
</tr>
|
1012 |
+
<tr>
|
1013 |
+
<th scope="row"><?php _e( 'Thumbnails source', 'related-posts-thumbnails' ); ?>:</th>
|
1014 |
+
<td>
|
1015 |
+
<select name="relpoststh_thsource" id="relpoststh_thsource">
|
1016 |
+
<?php foreach ( $thsources as $name => $title ) : ?>
|
1017 |
+
<option value="<?php echo $name; ?>" <?php if ( $relpoststh_thsource == $name ) { echo 'selected'; } ?>><?php echo $title; ?></option>
|
1018 |
+
<?php endforeach; ?>
|
1019 |
+
</select>
|
1020 |
+
</td>
|
1021 |
+
</tr>
|
1022 |
+
</table>
|
1023 |
+
</div>
|
1024 |
+
|
1025 |
+
<div class="postbox" style="padding: 20px; display:none;" id="content_thumbnail_options">
|
1026 |
+
<div style="padding: 20px" id="relpoststh-post-thumbnails" <?php if ( $relpoststh_thsource != 'post-thumbnails' ) : ?> style="display:none" <?php endif; ?>>
|
1027 |
+
<h2><?php _e( 'Thumbnails source', 'related-posts-thumbnails' ); ?>:</h2>
|
1028 |
+
<table class="form-table">
|
1029 |
+
<tr valign="top">
|
1030 |
+
<th scope="row"><?php _e( 'Post-thumbnails name', 'related-posts-thumbnails' ); ?>:</th>
|
1031 |
+
<td>
|
1032 |
+
<select name="relpoststh_poststhname">
|
1033 |
+
<?php foreach ( $available_sizes as $size_name => $size ) : ?>
|
1034 |
+
<option <?php if ( $size_name == get_option( 'relpoststh_poststhname', $this->poststhname ) ) { echo 'selected'; } ?>><?php echo $size_name; ?></option>
|
1035 |
+
<?php endforeach; ?>
|
1036 |
+
</select>
|
1037 |
+
<?php if ( ! current_theme_supports( 'post-thumbnails' ) ) : ?>
|
1038 |
+
(<?php _e( 'Your theme has to support post-thumbnails to have more choices', 'related-posts-thumbnails' ); ?>)
|
1039 |
+
<?php endif; ?>
|
1040 |
+
</td>
|
1041 |
+
</tr>
|
1042 |
+
<?php if ( current_theme_supports( 'post-thumbnails' ) ) : ?>
|
1043 |
+
<tr>
|
1044 |
+
<th scope="row"><?php _e( 'Show posts only with thumbnails', 'related-posts-thumbnails' ); ?>:</th>
|
1045 |
+
<td>
|
1046 |
+
<input type="checkbox" name="onlywiththumbs" id="onlywiththumbs" value="1" <?php if ( $onlywiththumbs ) { echo 'checked="checked"'; } ?>/>
|
1047 |
+
<label for="onlywiththumbs"><?php _e( 'Only posts with assigned Featured Image', 'related-posts-thumbnails' ); ?></label><br />
|
1048 |
+
</td>
|
1049 |
+
</tr>
|
1050 |
+
<?php endif; ?>
|
1051 |
+
</table>
|
1052 |
+
</div>
|
1053 |
+
<div style="padding: 20px" id="relpoststh-custom-field" <?php if ( $relpoststh_thsource != 'custom-field' ) : ?> style="display:none" <?php endif; ?>>
|
1054 |
+
<h2><?php _e( 'Thumbnails source', 'related-posts-thumbnails' ); ?>:</h2>
|
1055 |
+
<table class="form-table">
|
1056 |
+
<tr valign="top">
|
1057 |
+
<th scope="row"><?php _e( 'Custom field name', 'related-posts-thumbnails' ); ?>:</th>
|
1058 |
+
<td>
|
1059 |
+
<input type="text" name="relpoststh_customfield" value="<?php echo get_option( 'relpoststh_customfield', $this->custom_field );?>" size="50"/>
|
1060 |
+
</td>
|
1061 |
+
</tr>
|
1062 |
+
<tr valign="top">
|
1063 |
+
<th scope="row"><?php _e( 'Size', 'related-posts-thumbnails' ); ?>:</th>
|
1064 |
+
<td>
|
1065 |
+
<?php _e( 'Width', 'related-posts-thumbnails' ); ?>: <input type="text" name="relpoststh_customwidth" value="<?php echo get_option( 'relpoststh_customwidth', $this->custom_width );?>" size="3"/>px x
|
1066 |
+
<?php _e( 'Height', 'related-posts-thumbnails' ); ?>: <input type="text" name="relpoststh_customheight" value="<?php echo get_option( 'relpoststh_customheight', $this->custom_height );?>" size="3"/>px
|
1067 |
+
</td>
|
1068 |
+
</tr>
|
1069 |
+
<tr valign="top">
|
1070 |
+
<th scope="row"><?php _e( 'Theme resize url', 'related-posts-thumbnails' ); ?>:</th>
|
1071 |
+
<td>
|
1072 |
+
<input type="text" name="relpoststh_theme_resize_url" value="<?php echo get_option( 'relpoststh_theme_resize_url', '' );?>" size="50"/>
|
1073 |
+
(<?php _e( 'If your theme resizes images, enter URL to its resizing PHP file', 'related-posts-thumbnails' ); ?>)
|
1074 |
+
</td>
|
1075 |
+
</tr>
|
1076 |
+
</table>
|
1077 |
+
</div>
|
1078 |
+
</div>
|
1079 |
+
|
1080 |
+
<div class="postbox" style="padding: 20px; display:none;" id="content_style_options">
|
1081 |
+
<h2><?php _e( 'Style options', 'related-posts-thumbnails' ); ?>:</h2>
|
1082 |
+
<table class="form-table">
|
1083 |
+
<tr>
|
1084 |
+
<th scope="row"><?php _e( 'Output style', 'related-posts-thumbnails' ); ?>:</th>
|
1085 |
+
<td>
|
1086 |
+
<select name="relpoststh_output_style" id="relpoststh_output_style">
|
1087 |
+
<?php foreach ( $output_styles as $name => $title ) : ?>
|
1088 |
+
<option value="<?php echo $name; ?>" <?php if ( $relpoststh_output_style == $name ) { echo 'selected'; } ?>><?php echo $title; ?></option>
|
1089 |
+
<?php endforeach; ?>
|
1090 |
+
</select>
|
1091 |
+
<span id="relpoststh_cleanhtml" style="display: <?php if ( $relpoststh_output_style == 'list' ) { echo 'inline';
|
1092 |
+
} else { echo 'none'; }?>;"><?php _e( 'Turn off plugin styles', 'related-posts-thumbnails' ); ?> <input type="checkbox" name="relpoststh_cleanhtml" <?php if ( $relpoststh_cleanhtml ) { echo 'checked="checked"'; } ?> /></span>
|
1093 |
+
</td>
|
1094 |
+
</tr>
|
1095 |
+
<tr valign="top">
|
1096 |
+
<th scope="row"><?php _e( 'Background color', 'related-posts-thumbnails' ); ?>:</th>
|
1097 |
+
<td>
|
1098 |
+
<input type="text" name="relpoststh_background" value="<?php echo get_option( 'relpoststh_background', $this->background ); ?>" size="7"/>
|
1099 |
+
</td>
|
1100 |
+
</tr>
|
1101 |
+
<tr valign="top">
|
1102 |
+
<th scope="row"><?php _e( 'Background color on mouse over', 'related-posts-thumbnails' ); ?>:</th>
|
1103 |
+
<td>
|
1104 |
+
<input type="text" name="relpoststh_hoverbackground" value="<?php echo get_option( 'relpoststh_hoverbackground', $this->hoverbackground ); ?>" size="7"/>
|
1105 |
+
</td>
|
1106 |
+
</tr>
|
1107 |
+
<tr valign="top">
|
1108 |
+
<th scope="row"><?php _e( 'Border color', 'related-posts-thumbnails' ); ?>:</th>
|
1109 |
+
<td>
|
1110 |
+
<input type="text" name="relpoststh_bordercolor" value="<?php echo get_option( 'relpoststh_bordercolor', $this->border_color )?>" size="7"/>
|
1111 |
+
</td>
|
1112 |
+
</tr>
|
1113 |
+
<tr valign="top">
|
1114 |
+
<th scope="row"><?php _e( 'Font color', 'related-posts-thumbnails' ); ?>:</th>
|
1115 |
+
<td>
|
1116 |
+
<input type="text" name="relpoststh_fontcolor" value="<?php echo get_option( 'relpoststh_fontcolor', $this->font_color ); ?>" size="7"/>
|
1117 |
+
</td>
|
1118 |
+
</tr>
|
1119 |
+
<tr valign="top">
|
1120 |
+
<th scope="row"><?php _e( 'Font family', 'related-posts-thumbnails' ); ?>:</th>
|
1121 |
+
<td>
|
1122 |
+
<input type="text" name="relpoststh_fontfamily" value="<?php echo stripslashes( htmlspecialchars( get_option( 'relpoststh_fontfamily', $this->font_family ) ) ); ?>" size="50"/>
|
1123 |
+
</td>
|
1124 |
+
</tr>
|
1125 |
+
<tr valign="top">
|
1126 |
+
<th scope="row"><?php _e( 'Font size', 'related-posts-thumbnails' ); ?>:</th>
|
1127 |
+
<td>
|
1128 |
+
<input type="text" name="relpoststh_fontsize" value="<?php echo get_option( 'relpoststh_fontsize', $this->font_size )?>" size="7"/>
|
1129 |
+
</td>
|
1130 |
+
</tr>
|
1131 |
+
<tr valign="top">
|
1132 |
+
<th scope="row"><?php _e( 'Text maximum length', 'related-posts-thumbnails' ); ?>:</th>
|
1133 |
+
<td>
|
1134 |
+
<input type="text" name="relpoststh_textlength" value="<?php echo get_option( 'relpoststh_textlength', $this->text_length )?>" size="7"/>
|
1135 |
+
<label for="relpoststh_textlength"><?php _e( 'Set 0 for no title', 'related-posts-thumbnails' ); ?></label><br />
|
1136 |
+
</td>
|
1137 |
+
</tr>
|
1138 |
+
<tr valign="top">
|
1139 |
+
<th scope="row"><?php _e( 'Excerpt maximum length', 'related-posts-thumbnails' ); ?>:</th>
|
1140 |
+
<td>
|
1141 |
+
<input type="text" name="relpoststh_excerptlength" value="<?php echo get_option( 'relpoststh_excerptlength', $this->excerpt_length )?>" size="7"/>
|
1142 |
+
<label for="relpoststh_excerptlength"><?php _e( 'Set 0 for no excerpt', 'related-posts-thumbnails' ); ?></label><br />
|
1143 |
+
</td>
|
1144 |
+
</tr>
|
1145 |
+
<tr valign="top">
|
1146 |
+
<th scope="row"><?php _e( 'Text block height', 'related-posts-thumbnails' ); ?>:</th>
|
1147 |
+
<td>
|
1148 |
+
<input type="text" name="relpoststh_textblockheight" value="<?php echo get_option( 'relpoststh_textblockheight', $this->text_block_height )?>" size="7"/> px
|
1149 |
+
</td>
|
1150 |
+
</tr>
|
1151 |
+
</table>
|
1152 |
+
</div>
|
1153 |
+
<div class="postbox" style="padding: 20px; display:none;" id="content_relation_options">
|
1154 |
+
<h2><?php _e( 'Relation Builder Options', 'related-posts-thumbnails' ); ?>:</h2>
|
1155 |
+
<table class="form-table">
|
1156 |
+
<tr valign="top">
|
1157 |
+
<th scope="row"><?php _e( 'Relation based on', 'related-posts-thumbnails' ); ?>:</th>
|
1158 |
+
<td>
|
1159 |
+
<?php if ( is_array( $relation_options ) && count( $relation_options ) ) : ?>
|
1160 |
+
<?php foreach ( $relation_options as $ro_key => $ro_name ) : ?>
|
1161 |
+
<input type="radio" name="relpoststh_relation" id="relpoststh_relation_<?php echo $ro_key; ?>" value="<?php echo $ro_key; ?>" <?php if ( $relpoststh_relation == $ro_key ) { echo 'checked="checked"'; } ?>/>
|
1162 |
+
<label for="relpoststh_relation_<?php echo $ro_key; ?>"><?php echo $ro_name; ?></label><br />
|
1163 |
+
<?php endforeach; ?>
|
1164 |
+
<?php endif; ?>
|
1165 |
+
<div id="custom_taxonomies" style="display: <?php if ( $relpoststh_relation == 'custom' ) { echo 'inline';
|
1166 |
+
} else { echo 'none'; }?>;">
|
1167 |
+
<?php if ( is_array( $custom_taxonomies ) && count( $custom_taxonomies ) ) : ?>
|
1168 |
+
<?php foreach ( $custom_taxonomies as $custom_taxonomy ) : ?>
|
1169 |
+
<input type="checkbox" name="relpoststh_custom_taxonomies[]" id="ct_<?php echo $custom_taxonomy; ?>" value="<?php echo $custom_taxonomy; ?>" <?php if ( in_array( $custom_taxonomy, $relpoststh_custom_taxonomies ) ) { echo 'checked="checked"'; } ?>/>
|
1170 |
+
<label for="ct_<?php echo $custom_taxonomy; ?>"><?php echo $custom_taxonomy; ?></label>
|
1171 |
+
<?php endforeach; ?>
|
1172 |
+
<?php endif; ?>
|
1173 |
+
</div>
|
1174 |
+
</td>
|
1175 |
+
</tr>
|
1176 |
+
</table>
|
1177 |
+
</div>
|
1178 |
+
<!-- <input name="Submit" value="<?php _e( 'Save Changes', 'related-posts-thumbnails' ); ?>" type="submit" class="button-primary"> -->
|
1179 |
+
</div>
|
1180 |
+
</div>
|
1181 |
+
|
1182 |
+
<div class="wpbr-button-container bottom">
|
1183 |
+
<div class="wpbr-social-links alignleft">
|
1184 |
+
<a href="https://profiles.wordpress.org/marynixie/" class="wordpress" target="_blank"><span class="dashicons dashicons-wordpress"></span></a>
|
1185 |
+
</div>
|
1186 |
+
<input type="submit" name="Submit" class="wpbrmedia-settings-submit button button-primary button-big" value="<?php esc_html_e( 'Save Settings','related-posts-thumbnails' ); ?>" id="wpbr_save_setting_bottom">
|
1187 |
+
</div>
|
1188 |
+
</div>
|
1189 |
+
|
1190 |
+
<div class="metabox-holder wpbr-sidebar">
|
1191 |
+
<div class="sidebar postbox">
|
1192 |
+
<h2><?php esc_html_e( 'Spread the Word' , 'related-posts-thumbnails' )?></h2>
|
1193 |
+
<ul>
|
1194 |
+
<li>
|
1195 |
+
<a href="http://twitter.com/share?text=This is Best Related Post Thumbnails Plugin for WordPress&url=https://wordpress.org/support/view/plugin-reviews/related-posts-thumbnails" data-count="none" class="button twitter" target="_blank" title="Post to Twitter Now"><?php esc_html_e( 'Share on Twitter' , 'related-posts-thumbnails' )?><span class="dashicons dashicons-twitter"></span></a>
|
1196 |
+
</li>
|
1197 |
+
|
1198 |
+
<li>
|
1199 |
+
<a href="https://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/support/view/plugin-reviews/related-posts-thumbnails" class="button facebook" target="_blank" title="Share with your facebook friends about this awesome plugin."><?php esc_html_e( 'Share on Facebook' , 'related-posts-thumbnails' )?><span class="dashicons dashicons-facebook"></span>
|
1200 |
+
</a>
|
1201 |
+
</li>
|
1202 |
+
|
1203 |
+
<li>
|
1204 |
+
<a href="https://wordpress.org/support/view/plugin-reviews/related-posts-thumbnails?filter=5" class="button wordpress" target="_blank" title="Rate on Wordpress.org"><?php esc_html_e( 'Rate on Wordpress.org' , 'related-posts-thumbnails' )?><span class="dashicons dashicons-wordpress"></span>
|
1205 |
+
</a>
|
1206 |
+
</li>
|
1207 |
+
</ul>
|
1208 |
+
</div>
|
1209 |
+
</div>
|
1210 |
+
|
1211 |
+
</div>
|
1212 |
+
</form>
|
1213 |
+
<p style="margin-top: 40px;"><small><?php _e( 'If you experience some problems with this plugin please let me know about it on <a href="http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/">Plugin\'s homepage</a>. If you think this plugin is awesome please vote on <a href="http://wordpress.org/extend/plugins/related-posts-thumbnails/">Wordpress plugin page</a>. Thanks!', 'related-posts-thumbnails' ); ?></small></p>
|
1214 |
+
<?php
|
1215 |
}
|
1216 |
|
1217 |
function display_categories_list( $categoriesall, $categories, $selected_categories, $all_name, $specific_name ) {
|