Completed
Pull Request — master (#133)
by Sébastien
01:53
created
includes/customizer/class-alnp-customizer-scripts.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
17 17
 // Exit if Auto_Load_Next_Post_Customizer_Scripts class already exists.
18
-if ( !class_exists( 'Auto_Load_Next_Post_Customizer_Scripts' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Customizer_Scripts')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_Customizer_Scripts {
21 21
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 		 * @access public
27 27
 		 */
28 28
 		public function __construct() {
29
-			add_action( 'customize_preview_init', array( $this, 'alnp_add_customizer_preview_scripts' ) );
30
-			add_action( 'customize_controls_print_scripts', array( $this, 'alnp_add_scripts' ), 30 );
29
+			add_action('customize_preview_init', array($this, 'alnp_add_customizer_preview_scripts'));
30
+			add_action('customize_controls_print_scripts', array($this, 'alnp_add_scripts'), 30);
31 31
 		}
32 32
 
33 33
 		/**
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		 * @since 1.5.0
37 37
 		 */
38 38
 		public function alnp_add_customizer_preview_scripts() {
39
-			Auto_Load_Next_Post::load_file( 'alnp-theme-customizer', '/assets/js/customizer/theme-customizer.js', true, array( 'jquery', 'customize-preview' ), '', true );
39
+			Auto_Load_Next_Post::load_file('alnp-theme-customizer', '/assets/js/customizer/theme-customizer.js', true, array('jquery', 'customize-preview'), '', true);
40 40
 		} // END alnp_add_customizer_preview_scripts()
41 41
 
42 42
 		/**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 						 */
69 69
 						if ( isExpanded && !is_page_single ) {
70 70
 							console.log( "Random single post loaded." );
71
-							wp.customize.previewer.previewUrl.set( '<?php echo esc_js( Auto_Load_Next_Post_Customizer::alnp_get_random_page_permalink() ); ?>' );
71
+							wp.customize.previewer.previewUrl.set( '<?php echo esc_js(Auto_Load_Next_Post_Customizer::alnp_get_random_page_permalink()); ?>' );
72 72
 						}
73 73
 						else {
74 74
 							console.log( 'Already viewing a single post!' );
Please login to merge, or discard this patch.
includes/customizer/class-alnp-display-video-controller.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
19 19
 // Exit if WP_Customize_Control does not exsist.
20
-if ( ! class_exists( 'WP_Customize_Control' ) ) {
20
+if ( ! class_exists('WP_Customize_Control')) {
21 21
 	return null;
22 22
 }
23 23
 
24
-if ( !class_exists( 'Auto_Load_Next_Post_Display_Video_Controller' ) ) {
24
+if ( ! class_exists('Auto_Load_Next_Post_Display_Video_Controller')) {
25 25
 
26 26
 	/**
27 27
 	 * This class is for the display video control in the Customizer.
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		 */
46 46
 		public function render_content() {
47 47
 			?>
48
-			<span class="customize-control-title"><?php esc_html_e( $this->label ); ?></span>
48
+			<span class="customize-control-title"><?php esc_html_e($this->label); ?></span>
49 49
 
50 50
 			<p>
51 51
 				<iframe width="320" height="180" src="https://www.youtube-nocookie.com/embed/<?php echo $this->value(); ?>?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
Please login to merge, or discard this patch.
includes/customizer/class-alnp-pro-preview-controller.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly.
15
-if ( ! defined( 'ABSPATH' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
19 19
 // Exit if WP_Customize_Control does not exsist.
20
-if ( ! class_exists( 'WP_Customize_Control' ) ) {
20
+if ( ! class_exists('WP_Customize_Control')) {
21 21
 	return null;
22 22
 }
23 23
 
24
-if ( !class_exists( 'Auto_Load_Next_Post_Pro_Preview_Controller' ) ) {
24
+if ( ! class_exists('Auto_Load_Next_Post_Pro_Preview_Controller')) {
25 25
 
26 26
 	/**
27 27
 	 * The 'alnp_pro_preview' for Auto Load Next Post Pro control class.
@@ -42,35 +42,35 @@  discard block
 block discarded – undo
42 42
 		 */
43 43
 		public function render_content() {
44 44
 			?>
45
-			<span class="customize-control-title"><?php esc_html_e( $this->label ); ?></span>
45
+			<span class="customize-control-title"><?php esc_html_e($this->label); ?></span>
46 46
 
47 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' ) ); ?>
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 49
 			</p>
50 50
 
51 51
 			<ul style="list-style: disc; margin-left: 1em;">
52
-				<li><?php _e( 'User Role Restrictions', 'auto-load-next-post' ); ?></li>
53
-				<li><?php _e( 'Custom Post Type Support', 'auto-load-next-post' ); ?></li>
54
-				<li><?php _e( 'Media Attachment Support', 'auto-load-next-post' ); ?></li>
55
-				<li><?php _e( 'Limit Posts per Session', 'auto-load-next-post' ); ?></li>
56
-				<li><?php _e( 'Query Posts by Category or Tag', 'auto-load-next-post' ); ?></li>
52
+				<li><?php _e('User Role Restrictions', 'auto-load-next-post'); ?></li>
53
+				<li><?php _e('Custom Post Type Support', 'auto-load-next-post'); ?></li>
54
+				<li><?php _e('Media Attachment Support', 'auto-load-next-post'); ?></li>
55
+				<li><?php _e('Limit Posts per Session', 'auto-load-next-post'); ?></li>
56
+				<li><?php _e('Query Posts by Category or Tag', 'auto-load-next-post'); ?></li>
57 57
 			</ul>
58 58
 
59 59
 			<p>
60
-				<?php printf( esc_html__( 'Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="' . esc_url( 'https://autoloadnextpost.com/pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ), '</a>' ); ?>
60
+				<?php printf(esc_html__('Find out more about %1$s%2$s%3$s.', 'auto-load-next-post'), '<a target="_blank" href="'.esc_url('https://autoloadnextpost.com/pro/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview').'">', esc_html__('Auto Load Next Post Pro', 'auto-load-next-post'), '</a>'); ?>
61 61
 			</p>
62 62
 
63
-			<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>
63
+			<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>
64 64
 
65 65
 			<p>
66
-				<?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( 'https://autoloadnextpost.com/add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview' ) . '">', '</a>' ); ?>
66
+				<?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('https://autoloadnextpost.com/add-ons/?utm_source=wpcustomizer&utm_campaign=plugin-settings-pro-preview').'">', '</a>'); ?>
67 67
 			</p>
68 68
 
69
-			<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>
69
+			<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>
70 70
 
71 71
 			<div class="notice inline notice-info">
72 72
 				<p>
73
-					<?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>' ); ?>
73
+					<?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>'); ?>
74 74
 				</p>
75 75
 			</div>
76 76
 			<?php
Please login to merge, or discard this patch.
includes/admin/views/html-notice-no-theme-selectors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 ?>
17 17
 <div class="notice notice-error auto-load-next-post-message">
18
-	<p><?php echo sprintf( __( 'It seems that not all of the required theme selectors have been set. These theme selectors are required in order for %1$s to work. %2$sHow to find my theme selectors?%3$s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>' ); ?></p>
18
+	<p><?php echo sprintf(__('It seems that not all of the required theme selectors have been set. These theme selectors are required in order for %1$s to work. %2$sHow to find my theme selectors?%3$s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-theme-selectors" target="_blank">', '</a>'); ?></p>
19 19
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-is-supported.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 ?>
17 17
 <div class="notice notice-info auto-load-next-post-message">
18
-	<p><?php echo sprintf( __( 'This theme supports %s. No need to change the theme selectors as they have already been set by the theme.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
18
+	<p><?php echo sprintf(__('This theme supports %s. No need to change the theme selectors as they have already been set by the theme.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
19 19
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-theme-ready.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
 <div class="notice notice-success auto-load-next-post-notice is-dismissible">
20 20
 	<div class="auto-load-next-post-notice-inner">
21 21
 		<div class="auto-load-next-post-notice-icon">
22
-			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
22
+			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
23 23
 		</div>
24 24
 
25 25
 		<div class="auto-load-next-post-notice-content">
26
-			<h3><?php echo esc_html__( 'Congratulations!', 'auto-load-next-post' ); ?></h3>
27
-			<p><?php echo sprintf( __( 'Your current theme <strong>%1$s</strong> is supported. %2$s is ready to increase your pageviews. There is nothing else to setup so your good to go.', 'auto-load-next-post' ), $active_theme->name, esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
26
+			<h3><?php echo esc_html__('Congratulations!', 'auto-load-next-post'); ?></h3>
27
+			<p><?php echo sprintf(__('Your current theme <strong>%1$s</strong> is supported. %2$s is ready to increase your pageviews. There is nothing else to setup so your good to go.', 'auto-load-next-post'), $active_theme->name, esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
28 28
 		</div>
29 29
 	</div>
30 30
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-trying-beta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,24 +11,24 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 ?>
18 18
 <div class="notice notice-info auto-load-next-post-notice">
19 19
 	<div class="auto-load-next-post-notice-inner">
20 20
 		<div class="auto-load-next-post-notice-icon">
21
-			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
21
+			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
22 22
 		</div>
23 23
 
24 24
 		<div class="auto-load-next-post-notice-content">
25
-			<h3><?php echo esc_html__( 'Thanks for trying out this beta!', 'auto-load-next-post' ); ?></h3>
26
-			<p><?php printf( esc_html__( 'If you have any questions about the beta or if you have any feedback at all, let me know. Any little bit you\'re willing to share helps. You can %1$sjoin the Slack channel%2$s to provide feedback, discuss features to be added and integrations to support. Or you can just give feedback the old fashion way pressing the big button on the side.', 'auto-load-next-post' ), '<a href="' . esc_url( 'https://launchpass.com/autoloadnextpost' ) . '" target="_blank">', '</a>' ); ?></p>
25
+			<h3><?php echo esc_html__('Thanks for trying out this beta!', 'auto-load-next-post'); ?></h3>
26
+			<p><?php printf(esc_html__('If you have any questions about the beta or if you have any feedback at all, let me know. Any little bit you\'re willing to share helps. You can %1$sjoin the Slack channel%2$s to provide feedback, discuss features to be added and integrations to support. Or you can just give feedback the old fashion way pressing the big button on the side.', 'auto-load-next-post'), '<a href="'.esc_url('https://launchpass.com/autoloadnextpost').'" target="_blank">', '</a>'); ?></p>
27 27
 		</div>
28 28
 
29 29
 		<div class="auto-load-next-post-send-feedback">
30
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url( 'https://autoloadnextpost.com/contact/' ), esc_html__( 'Give Feedback', 'auto-load-next-post' ) ); ?>
31
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_beta_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Ask me again in 7 days', 'auto-load-next-post' ); ?></a>
30
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url('https://autoloadnextpost.com/contact/'), esc_html__('Give Feedback', 'auto-load-next-post')); ?>
31
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_beta_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Ask me again in 7 days', 'auto-load-next-post'); ?></a>
32 32
 		</div>
33 33
 	</div>
34 34
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-no-comment-selector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 ?>
17 17
 <div class="notice notice-error auto-load-next-post-message">
18
-	<p><?php echo sprintf( __( 'In order to remove comments we need to know what the comments container is. Please identify the comments container under <strong>Theme Selectors</strong>. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>' ); ?></p>
18
+	<p><?php echo sprintf(__('In order to remove comments we need to know what the comments container is. Please identify the comments container under <strong>Theme Selectors</strong>. %1$sHow to find my theme selectors?%2$s', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/documentation/find-theme-selectors/?utm_source=wpadmin&utm_campaign=plugin-settings-misc" target="_blank">', '</a>'); ?></p>
19 19
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-please-review.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18 18
 $current_user = wp_get_current_user();
19 19
 
20
-$time = auto_load_next_post_seconds_to_words( time() - $install_date );
20
+$time = auto_load_next_post_seconds_to_words(time() - $install_date);
21 21
 ?>
22 22
 <div class="notice notice-info auto-load-next-post-notice">
23 23
 	<div class="auto-load-next-post-notice-inner">
24 24
 		<div class="auto-load-next-post-notice-icon">
25
-			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
25
+			<img src="https://ps.w.org/auto-load-next-post/assets/icon-256x256.png" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
26 26
 		</div>
27 27
 
28 28
 		<div class="auto-load-next-post-notice-content">
29
-			<h3><?php echo esc_html__( 'Are you enjoying Auto Load Next Post?', 'auto-load-next-post' ); ?></h3>
30
-			<p><?php printf( esc_html__( 'You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), esc_html( $time ) ); ?></p>
29
+			<h3><?php echo esc_html__('Are you enjoying Auto Load Next Post?', 'auto-load-next-post'); ?></h3>
30
+			<p><?php printf(esc_html__('You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), esc_html($time)); ?></p>
31 31
 		</div>
32 32
 
33 33
 		<div class="auto-load-next-post-review-now">
34
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post' ), esc_html__( 'Leave a Review', 'auto-load-next-post' ) ); ?>
35
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_review_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'No thank you / I already have', 'auto-load-next-post' ); ?></a>
34
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url('https://wordpress.org/support/plugin/auto-load-next-post/reviews?rate=5#new-post'), esc_html__('Leave a Review', 'auto-load-next-post')); ?>
35
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_review_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('No thank you / I already have', 'auto-load-next-post'); ?></a>
36 36
 		</div>
37 37
 	</div>
38 38
 </div>
Please login to merge, or discard this patch.