ALNP_Pro_Preview_Controller::render_content()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 42

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 42
rs 9.248
c 0
b 0
f 0
1
<?php
2
/**
3
 * Auto Load Next Post: Customizer Controller for Previewing Auto Load Next Post Pro.
4
 *
5
 * @see https://developer.wordpress.org/reference/classes/wp_customize_control/
6
 *
7
 * @since    1.5.0
8
 * @author   Sébastien Dumont
9
 * @category Customizer
10
 * @package  Auto Load Next Post/Customizer/Controller
11
 * @license  GPL-2.0+
12
 */
13
14
// Exit if accessed directly.
15
if ( ! defined( 'ABSPATH' ) ) {
16
	exit;
17
}
18
19
// Exit if WP_Customize_Control does not exsist.
20
if ( ! class_exists( 'WP_Customize_Control' ) ) {
21
	return null;
22
}
23
24
if ( !class_exists( 'ALNP_Pro_Preview_Controller' ) ) {
25
26
	/**
27
	 * The 'alnp_pro_preview' for Auto Load Next Post Pro control class.
28
	 */
29
	class ALNP_Pro_Preview_Controller extends WP_Customize_Control {
30
31
		/**
32
		 * The type of customize control.
33
		 *
34
		 * @access public
35
		 * @since  1.5.0
36
		 * @var    string
37
		 */
38
		public $type = 'alnp-pro-preview';
39
40
		/**
41
		 * Render the content on the theme customizer page via PHP.
42
		 */
43
		public function render_content() {
44
			?>
45
			<span class="customize-control-title"><?php echo $this->label; ?></span>
46
47
			<p>
48
				<?php printf( esc_html__( '%1$s is coming soon and will come with more powerful features. Here are just a few of them you can look forward to.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ) ); ?>
49
			</p>
50
51
			<ul style="list-style: disc; margin-left: 1em;">
52
				<li><?php echo wptexturize( esc_html__( 'Load the Next Post or Next Post with same Category or New Posts or Related Posts or by Custom Query', 'auto-load-next-post' ) ); ?></li>
53
				<li><?php echo wptexturize( esc_html__( 'Page and Media Attachment Support', 'auto-load-next-post' ) ); ?></li>
54
				<li><?php echo wptexturize( esc_html__( 'Custom Post Type Support', 'auto-load-next-post' ) ); ?></li>
55
				<li><?php echo wptexturize( esc_html__( 'Paginated Posts Supported', 'auto-load-next-post' ) ); ?></li>
56
				<li><?php echo wptexturize( esc_html__( 'Exclude Post Formats', 'auto-load-next-post' ) ); ?></li>
57
				<li><?php echo wptexturize( esc_html__( 'Limit Posts per Session', 'auto-load-next-post' ) ); ?></li>
58
				<li><?php echo wptexturize( esc_html__( 'Query Posts by Category and Tag', 'auto-load-next-post' ) ); ?></li>
59
				<li><?php echo wptexturize( esc_html__( 'Exclude User Roles and Specific Users', 'auto-load-next-post' ) ); ?></li>
60
				<li><?php echo wptexturize( esc_html__( 'Pre-Query Posts Ready to Load', 'auto-load-next-post' ) ); ?></li>
61
				<li><?php echo wptexturize( esc_html__( 'Hide Comments and Show by Toggle Button', 'auto-load-next-post' ) ); ?></li>
62
				<li><?php echo wptexturize( sprintf( esc_html__( 'Multilingual Support for %1$s and %2$s', 'auto-load-next-post' ), 'WPML', 'Polylang' ) ); ?></li>
63
				<li><?php echo wptexturize( esc_html__( 'Email Support', 'auto-load-next-post' ) ); ?></li>
64
			</ul>
65
66
			<p>
67
				<?php printf( esc_html__( 'Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ), '</a>' ); ?>
68
			</p>
69
70
			<span class="customize-control-title"><?php printf( esc_html__( 'Add-ons for %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></span>
71
72
			<p>
73
				<?php printf( esc_html__( 'Add-ons available provide additional support or options for %1$s. %2$sCheck out the add-ons%3$s to see what is available.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a target="_blank" href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', '</a>' ); ?>
74
			</p>
75
76
			<span class="customize-control-title"><?php printf( esc_html__( 'Enjoying %s?', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></span>
77
78
			<div class="notice inline notice-info">
79
				<p>
80
					<?php printf( esc_html__( 'Why not leave me a review on %1$sWordPress.org%2$s?  I\'d really appreciate it!', 'auto-load-next-post' ), '<a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/auto-load-next-post?filter=5#postform">', '</a>' ); ?>
81
				</p>
82
			</div>
83
			<?php
84
		} // END render_content()
85
86
	} // END class
87
88
} // END if class
89