Completed
Branch v1.6.0 (7bff6e)
by Sébastien
01:27
created
includes/auto-load-next-post-deprecated-functions.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  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
 
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
  * @param string $version     Version when the function was deprecated.
24 24
  * @param string $replacement Replacement for the called function if any.
25 25
  */
26
-function alnp_deprecated_function( $function, $version, $replacement = null ) {
27
-	if ( is_ajax() ) {
28
-		do_action( 'deprecated_function_run', $function, $replacement, $version );
29
-		$log_string  = sprintf( esc_html__( 'The %1$s function is deprecated since version %2$s', 'auto-load-next-post' ), $function, $version );
30
-		$log_string .= $replacement ? " " . sprintf( esc_html__( 'Replace with %s.', 'auto-load-next-post' ), $replacement ) : '';
26
+function alnp_deprecated_function($function, $version, $replacement = null) {
27
+	if (is_ajax()) {
28
+		do_action('deprecated_function_run', $function, $replacement, $version);
29
+		$log_string  = sprintf(esc_html__('The %1$s function is deprecated since version %2$s', 'auto-load-next-post'), $function, $version);
30
+		$log_string .= $replacement ? " ".sprintf(esc_html__('Replace with %s.', 'auto-load-next-post'), $replacement) : '';
31 31
 
32
-		error_log( $log_string );
32
+		error_log($log_string);
33 33
 	} else {
34
-		_deprecated_function( $function, $version, $replacement );
34
+		_deprecated_function($function, $version, $replacement);
35 35
 	}
36 36
 } // END alnp_deprecated_function()
37 37
 
38
-if ( ! function_exists( 'auto_load_next_post_is_ajax' ) ) {
38
+if ( ! function_exists('auto_load_next_post_is_ajax')) {
39 39
 	/**
40 40
 	 * Returns true when the page is loaded via ajax.
41 41
 	 *
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	 * @return bool
45 45
 	 */
46 46
 	function auto_load_next_post_is_ajax() {
47
-		alnp_deprecated_function( 'auto_load_next_post_is_ajax', '1.6.0', null );
47
+		alnp_deprecated_function('auto_load_next_post_is_ajax', '1.6.0', null);
48 48
 
49
-		if ( defined( 'DOING_AJAX' ) ) {
49
+		if (defined('DOING_AJAX')) {
50 50
 			return true;
51 51
 		}
52 52
 
53
-		return( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) == 'xmlhttprequest' ) ? true : false;
53
+		return(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') ? true : false;
54 54
 	} // END auto_load_next_post_is_ajax
55 55
 }
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 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
-if ( ! class_exists( 'ALNP_Admin' ) ) {
18
+if ( ! class_exists('ALNP_Admin')) {
19 19
 
20 20
 	class ALNP_Admin {
21 21
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			self::includes();
32 32
 
33 33
 			// Add settings page.
34
-			add_action( 'admin_menu', array( $this, 'admin_menu' ), 9 );
34
+			add_action('admin_menu', array($this, 'admin_menu'), 9);
35 35
 		} // END __construct()
36 36
 
37 37
 		/**
@@ -45,28 +45,28 @@  discard block
 block discarded – undo
45 45
 		public function includes() {
46 46
 			global $wp_version;
47 47
 
48
-			include( dirname( __FILE__ ) . '/class-alnp-admin-action-links.php' );        // Action Links
49
-			include( dirname( __FILE__ ) . '/class-alnp-admin-assets.php' );              // Admin Assets
50
-			include( dirname( __FILE__ ) . '/class-alnp-admin-notices.php' );             // Plugin Notices
48
+			include(dirname(__FILE__).'/class-alnp-admin-action-links.php'); // Action Links
49
+			include(dirname(__FILE__).'/class-alnp-admin-assets.php'); // Admin Assets
50
+			include(dirname(__FILE__).'/class-alnp-admin-notices.php'); // Plugin Notices
51 51
 
52
-			if ( apply_filters( 'alnp_enable_admin_help_tab', true ) ) {
53
-				include( dirname( __FILE__ ) . '/class-alnp-admin-help.php' );            // Plugin Help Tab
52
+			if (apply_filters('alnp_enable_admin_help_tab', true)) {
53
+				include(dirname(__FILE__).'/class-alnp-admin-help.php'); // Plugin Help Tab
54 54
 			}
55 55
 
56
-			include_once( dirname( __FILE__ ) . '/class-alnp-getting-started.php');       // Getting Started.
57
-			include_once( dirname( __FILE__ ) . '/class-alnp-setup-wizard.php');          // Setup Wizard.
58
-			include_once( dirname( __FILE__ ) . '/class-alnp-extensions.php');            // Extensions.
56
+			include_once(dirname(__FILE__).'/class-alnp-getting-started.php'); // Getting Started.
57
+			include_once(dirname(__FILE__).'/class-alnp-setup-wizard.php'); // Setup Wizard.
58
+			include_once(dirname(__FILE__).'/class-alnp-extensions.php'); // Extensions.
59 59
 
60
-			if ( ! is_alnp_pro_version_installed() ) {
61
-				include_once( dirname( __FILE__ ) . '/class-alnp-admin-pro-preview.php'); // Pro Preview.
60
+			if ( ! is_alnp_pro_version_installed()) {
61
+				include_once(dirname(__FILE__).'/class-alnp-admin-pro-preview.php'); // Pro Preview.
62 62
 			}
63 63
 
64
-			include( dirname( __FILE__ ) . '/class-alnp-sidebar.php' );                   // Sidebar
65
-			include( dirname( __FILE__ ) . '/class-alnp-admin-footer.php' );              // Admin Footer
66
-			include( dirname( __FILE__ ) . '/class-alnp-privacy.php' );                   // Plugin Privacy
64
+			include(dirname(__FILE__).'/class-alnp-sidebar.php'); // Sidebar
65
+			include(dirname(__FILE__).'/class-alnp-admin-footer.php'); // Admin Footer
66
+			include(dirname(__FILE__).'/class-alnp-privacy.php'); // Plugin Privacy
67 67
 
68
-			if ( version_compare( $wp_version, '5.2', '>=' ) ) {
69
-				include( dirname( __FILE__ ) . '/class-alnp-admin-site-health.php' );     // Site Health
68
+			if (version_compare($wp_version, '5.2', '>=')) {
69
+				include(dirname(__FILE__).'/class-alnp-admin-site-health.php'); // Site Health
70 70
 			}
71 71
 		} // END includes()
72 72
 
@@ -78,33 +78,33 @@  discard block
 block discarded – undo
78 78
 		 * @version 1.6.0
79 79
 		 */
80 80
 		public function admin_menu() {
81
-			$current_view = ! empty( $_GET['view'] ) ? sanitize_title( wp_unslash( $_GET['view'] ) ) : '';
81
+			$current_view = ! empty($_GET['view']) ? sanitize_title(wp_unslash($_GET['view'])) : '';
82 82
 			$title = '';
83 83
 
84
-			switch( $current_view ) {
84
+			switch ($current_view) {
85 85
 				case 'getting-started':
86
-					$title = sprintf( esc_attr__( 'Getting Started with %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) );
86
+					$title = sprintf(esc_attr__('Getting Started with %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'));
87 87
 					break;
88 88
 				case 'setup-wizard':
89
-					$title = sprintf( esc_attr__( 'Setup Wizard for %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) );
89
+					$title = sprintf(esc_attr__('Setup Wizard for %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'));
90 90
 					break;
91 91
 				case 'extensions':
92
-					$title = sprintf( esc_attr__( '%s | Extensions', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) );
92
+					$title = sprintf(esc_attr__('%s | Extensions', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'));
93 93
 					break;
94 94
 				default:
95
-					$title = sprintf( esc_attr__( '%s Settings', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) );
95
+					$title = sprintf(esc_attr__('%s Settings', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'));
96 96
 					break;
97 97
 			}
98 98
 
99 99
 			$settings_page = add_options_page(
100 100
 				$title,
101
-				esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ),
101
+				esc_html__('Auto Load Next Post', 'auto-load-next-post'),
102 102
 				'manage_options',
103 103
 				'auto-load-next-post',
104
-				array( $this, 'settings_page' )
104
+				array($this, 'settings_page')
105 105
 			);
106 106
 
107
-			add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) );
107
+			add_action('load-'.$settings_page, array($this, 'settings_page_init'));
108 108
 		} // END admin_menu()
109 109
 
110 110
 		/**
@@ -120,29 +120,29 @@  discard block
 block discarded – undo
120 120
 			global $current_view, $current_section;
121 121
 
122 122
 			// Include settings pages.
123
-			include_once( dirname( __FILE__ ) . '/class-alnp-admin-settings.php' );
123
+			include_once(dirname(__FILE__).'/class-alnp-admin-settings.php');
124 124
 
125 125
 			ALNP_Admin_Settings::get_settings_pages();
126 126
 
127 127
 			// Get current view/section.
128
-			$current_view    = empty( $_GET['view'] ) ? 'theme-selectors' : sanitize_title( wp_unslash( $_GET['view'] ) );
129
-			$current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( wp_unslash( $_REQUEST['section'] ) );
128
+			$current_view    = empty($_GET['view']) ? 'theme-selectors' : sanitize_title(wp_unslash($_GET['view']));
129
+			$current_section = empty($_REQUEST['section']) ? '' : sanitize_title(wp_unslash($_REQUEST['section']));
130 130
 
131 131
 			// Save settings if data has been posted.
132
-			if ( apply_filters( '' !== $current_section ? "alnp_save_settings_{$current_view}_{$current_section}" : "alnp_save_settings_{$current_view}", ! empty( $_POST ) ) ) {
132
+			if (apply_filters('' !== $current_section ? "alnp_save_settings_{$current_view}_{$current_section}" : "alnp_save_settings_{$current_view}", ! empty($_POST))) {
133 133
 				ALNP_Admin_Settings::save();
134 134
 			}
135 135
 
136 136
 			// Add any posted messages.
137
-			if ( ! empty( $_GET['auto_load_next_post_error'] ) ) {
138
-				ALNP_Admin_Settings::add_error( wp_kses_post( wp_unslash( $_GET['auto_load_next_post_error'] ) ) );
137
+			if ( ! empty($_GET['auto_load_next_post_error'])) {
138
+				ALNP_Admin_Settings::add_error(wp_kses_post(wp_unslash($_GET['auto_load_next_post_error'])));
139 139
 			}
140 140
 
141
-			if ( ! empty( $_GET['auto_load_next_post_message'] ) ) {
142
-				ALNP_Admin_Settings::add_message( wp_kses_post( wp_unslash( $_GET['auto_load_next_post_message'] ) ) );
141
+			if ( ! empty($_GET['auto_load_next_post_message'])) {
142
+				ALNP_Admin_Settings::add_message(wp_kses_post(wp_unslash($_GET['auto_load_next_post_message'])));
143 143
 			}
144 144
 
145
-			do_action( 'auto_load_next_post_settings_page_init' );
145
+			do_action('auto_load_next_post_settings_page_init');
146 146
 		} // END settings_page_init()
147 147
 
148 148
 		/**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @since  1.0.0
153 153
 		 */
154 154
 		public function settings_page() {
155
-			include_once( dirname( __FILE__ ) . '/class-alnp-admin-settings.php' );
155
+			include_once(dirname(__FILE__).'/class-alnp-admin-settings.php');
156 156
 
157 157
 			ALNP_Admin_Settings::output();
158 158
 		} // END settings_page()
Please login to merge, or discard this patch.
includes/admin/class-alnp-setup-wizard.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  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
-if ( ! class_exists( 'ALNP_Setup_Wizard' ) ) {
19
+if ( ! class_exists('ALNP_Setup_Wizard')) {
20 20
 
21 21
 	class ALNP_Setup_Wizard {
22 22
 
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'setup-wizard';
30
-			$this->label = esc_html__( 'Setup Wizard', 'auto-load-next-post' );
30
+			$this->label = esc_html__('Setup Wizard', 'auto-load-next-post');
31 31
 
32
-			add_action( 'auto_load_next_post_settings_end', array( $this, 'output' ), 10, 2 );
32
+			add_action('auto_load_next_post_settings_end', array($this, 'output'), 10, 2);
33 33
 		} // END __construct()
34 34
 
35 35
 		/**
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 		 * @access public
39 39
 		 * @param  string $current_view
40 40
 		 */
41
-		public function output( $current_view ) {
42
-			if ( $current_view !== 'setup-wizard' ) {
41
+		public function output($current_view) {
42
+			if ($current_view !== 'setup-wizard') {
43 43
 				return;
44 44
 			}
45 45
 
@@ -53,31 +53,31 @@  discard block
 block discarded – undo
53 53
 					<div class="content">
54 54
 						<div class="logo">
55 55
 							<a href="https://autoloadnextpost.com/" target="_blank">
56
-								<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/logo.png'; ?>" alt="<?php esc_html_e( 'Auto Load Next Post', 'auto-load-next-post' ); ?>" />
56
+								<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/logo.png'; ?>" alt="<?php esc_html_e('Auto Load Next Post', 'auto-load-next-post'); ?>" />
57 57
 							</a>
58 58
 						</div><!-- .logo -->
59 59
 
60
-						<h1><?php echo esc_html__( 'Welcome to the Setup Wizard', 'auto-load-next-post' ); ?></h1>
60
+						<h1><?php echo esc_html__('Welcome to the Setup Wizard', 'auto-load-next-post'); ?></h1>
61 61
 
62 62
 						<?php
63 63
 						// Stop users from using the Setup Wizard if theme already supports Auto Load Next Post.
64
-						if ( ! isset( $_GET['force-setup'] ) && is_alnp_supported() ) {
65
-							echo '<p>' . sprintf( __( 'Running the Setup Wizard is not required for your active theme %1$s as it already supports %2$s.', 'auto-load-next-post' ), '<strong>' . $active_theme->name . '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>';
64
+						if ( ! isset($_GET['force-setup']) && is_alnp_supported()) {
65
+							echo '<p>'.sprintf(__('Running the Setup Wizard is not required for your active theme %1$s as it already supports %2$s.', 'auto-load-next-post'), '<strong>'.$active_theme->name.'</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>';
66 66
 
67
-							echo '<p style="text-align: center;"><a href="' . add_query_arg( array( 'page' => 'auto-load-next-post' ), admin_url( 'options-general.php' ) ) . '" class="button button-primary button-large" aria-label="' . sprintf( esc_attr__( 'View %s settings', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '">' . esc_html__( 'View Settings', 'auto-load-next-post' ) . '</a></p>';
67
+							echo '<p style="text-align: center;"><a href="'.add_query_arg(array('page' => 'auto-load-next-post'), admin_url('options-general.php')).'" class="button button-primary button-large" aria-label="'.sprintf(esc_attr__('View %s settings', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'">'.esc_html__('View Settings', 'auto-load-next-post').'</a></p>';
68 68
 						} else {
69 69
 						?>
70 70
 						<div class="box enter show-box">
71
-							<p><?php _e( 'The setup wizard will scan a random post on your site and identify your theme\'s selectors matching those that are known and used in many different themes. It will also look for the directory within the theme for where the theme content loops are stored.', 'auto-load-next-post' ); ?></p>
71
+							<p><?php _e('The setup wizard will scan a random post on your site and identify your theme\'s selectors matching those that are known and used in many different themes. It will also look for the directory within the theme for where the theme content loops are stored.', 'auto-load-next-post'); ?></p>
72 72
 
73
-							<p><?php _e( 'Once found, they will be set for you once the scan is complete.', 'auto-load-next-post' ); ?></p>
73
+							<p><?php _e('Once found, they will be set for you once the scan is complete.', 'auto-load-next-post'); ?></p>
74 74
 
75
-							<p><?php _e( 'So let\'s get started.', 'auto-load-next-post' ); ?></p>
75
+							<p><?php _e('So let\'s get started.', 'auto-load-next-post'); ?></p>
76 76
 
77
-							<p class="small red"><i><?php echo sprintf( esc_html__( 'Please note that the setup wizard is not full proof and some manual work maybe required depending on the results. If you have %1$sWP_DEBUG%2$s enabled then results on what was found will be displayed to you.', 'auto-load-next-post' ), '<strong>', '</strong>' ); ?></i></p>
77
+							<p class="small red"><i><?php echo sprintf(esc_html__('Please note that the setup wizard is not full proof and some manual work maybe required depending on the results. If you have %1$sWP_DEBUG%2$s enabled then results on what was found will be displayed to you.', 'auto-load-next-post'), '<strong>', '</strong>'); ?></i></p>
78 78
 
79 79
 							<p style="text-align: center;">
80
-								<a class="button button-primary button-large scan-button" href="#" data-step="template-location"><?php _e( 'Start', 'auto-load-next-post' ); ?></a>
80
+								<a class="button button-primary button-large scan-button" href="#" data-step="template-location"><?php _e('Start', 'auto-load-next-post'); ?></a>
81 81
 							</p>
82 82
 
83 83
 							<div class="meter blue animate" style="display:none;">
@@ -86,32 +86,32 @@  discard block
 block discarded – undo
86 86
 						</div><!-- .box.enter -->
87 87
 
88 88
 						<div class="box template-location-results">
89
-							<h2><?php _e( 'Setup Wizard: Template Location', 'auto-load-next-post' ); ?></h2>
89
+							<h2><?php _e('Setup Wizard: Template Location', 'auto-load-next-post'); ?></h2>
90 90
 
91
-							<p class="template-found"><?php printf( __( '%s has detected the template location and has set it for you. Please continue the wizard to scan for theme selectors next.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
91
+							<p class="template-found"><?php printf(__('%s has detected the template location and has set it for you. Please continue the wizard to scan for theme selectors next.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
92 92
 
93
-							<p class="no-template-found"><?php printf( __( 'Setup Wizard was not able to locate your template location for this theme. This is likely because the theme is using either a directory or filename that %s does not recognise.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
93
+							<p class="no-template-found"><?php printf(__('Setup Wizard was not able to locate your template location for this theme. This is likely because the theme is using either a directory or filename that %s does not recognise.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
94 94
 
95
-							<p class="no-template-found"><?php printf( __( 'A fallback template will be used instead. To fully support %s with this theme, view the repeater template override guide in the documentation.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
95
+							<p class="no-template-found"><?php printf(__('A fallback template will be used instead. To fully support %s with this theme, view the repeater template override guide in the documentation.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
96 96
 
97 97
 							<?php
98 98
 							/**
99 99
 							 * Displays the theme template location if WP_DEBUG is enabled.
100 100
 							 */
101
-							if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
101
+							if (defined('WP_DEBUG') && WP_DEBUG) {
102 102
 							?>
103 103
 							<p class="template-location debug-mode">
104
-								<strong class="red"><?php _e( 'Developers:', 'auto-load-next-post' ); ?></strong> <?php echo sprintf( __( 'You can %1$sapply a filter to set the template location%2$s with the found directory for your theme.', 'auto-load-next-post' ), '<a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/filter-hooks.md#filter-alnp_template_location" target="_blank">', '</a>' ); ?>
104
+								<strong class="red"><?php _e('Developers:', 'auto-load-next-post'); ?></strong> <?php echo sprintf(__('You can %1$sapply a filter to set the template location%2$s with the found directory for your theme.', 'auto-load-next-post'), '<a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/filter-hooks.md#filter-alnp_template_location" target="_blank">', '</a>'); ?>
105 105
 							</p>
106 106
 
107
-							<p><?php _e( 'Copy:', 'auto-load-next-post' ); ?> <i class="bold copy"><span class="location">*</span></i></p>
107
+							<p><?php _e('Copy:', 'auto-load-next-post'); ?> <i class="bold copy"><span class="location">*</span></i></p>
108 108
 							<?php } ?>
109 109
 
110 110
 							<hr>
111 111
 
112 112
 							<p style="text-align: center;">
113
-								<a class="button button-primary button-large scan-button" href="#" data-step="theme-selectors"><?php _e( 'Continue', 'auto-load-next-post' ); ?></a>
114
-								<a class="button button-large button-doc" href="<?php echo esc_url( 'https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/repeater-template.md#repeater-template' ); ?>" target="_blank"><?php _e( 'Documentation', 'auto-load-next-post' ); ?></a>
113
+								<a class="button button-primary button-large scan-button" href="#" data-step="theme-selectors"><?php _e('Continue', 'auto-load-next-post'); ?></a>
114
+								<a class="button button-large button-doc" href="<?php echo esc_url('https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/repeater-template.md#repeater-template'); ?>" target="_blank"><?php _e('Documentation', 'auto-load-next-post'); ?></a>
115 115
 							</p>
116 116
 
117 117
 							<div class="meter blue animate" style="display:none;">
@@ -120,39 +120,39 @@  discard block
 block discarded – undo
120 120
 						</div><!-- .box.template-location-results -->
121 121
 
122 122
 						<div class="box theme-selector-results">
123
-							<h2><?php _e( 'Setup Wizard: Theme Selectors', 'auto-load-next-post' ); ?></h2>
123
+							<h2><?php _e('Setup Wizard: Theme Selectors', 'auto-load-next-post'); ?></h2>
124 124
 
125 125
 							<?php
126 126
 							/**
127 127
 							 * Displays the theme selector results if WP_DEBUG is enabled.
128 128
 							 */
129
-							if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
129
+							if (defined('WP_DEBUG') && WP_DEBUG) {
130 130
 							?>
131 131
 							<div class="theme-selectors debug-mode">
132
-								<p><?php _e( 'If any selector was not found, click on the help icon next to the result for more details.', 'auto-load-next-post' ); ?></p>
132
+								<p><?php _e('If any selector was not found, click on the help icon next to the result for more details.', 'auto-load-next-post'); ?></p>
133 133
 
134
-								<p><strong><?php _e( 'Post scanned:', 'auto-load-next-post' ); ?></strong> <i><span class="post-tested">*</span></i></p>
134
+								<p><strong><?php _e('Post scanned:', 'auto-load-next-post'); ?></strong> <i><span class="post-tested">*</span></i></p>
135 135
 
136 136
 								<div class="result-container">
137 137
 									<div class="selectors">
138
-										<p class="bold"><?php _e( 'Selector', 'auto-load-next-post' ); ?></p>
138
+										<p class="bold"><?php _e('Selector', 'auto-load-next-post'); ?></p>
139 139
 
140 140
 										<div class="container pending">
141
-											<span class="selector"><?php _e( 'Content Container', 'auto-load-next-post' ); ?></span>
141
+											<span class="selector"><?php _e('Content Container', 'auto-load-next-post'); ?></span>
142 142
 										</div>
143 143
 										<div class="title pending">
144
-											<span class="selector"><?php _e( 'Post Title', 'auto-load-next-post' ); ?></span>
144
+											<span class="selector"><?php _e('Post Title', 'auto-load-next-post'); ?></span>
145 145
 										</div>
146 146
 										<div class="navigation pending">
147
-											<span class="selector"><?php _e( 'Post Navigation', 'auto-load-next-post' ); ?></span>
147
+											<span class="selector"><?php _e('Post Navigation', 'auto-load-next-post'); ?></span>
148 148
 										</div>
149 149
 										<div class="comments pending">
150
-											<span class="selector"><?php _e( 'Comments Container', 'auto-load-next-post' ); ?></span>
150
+											<span class="selector"><?php _e('Comments Container', 'auto-load-next-post'); ?></span>
151 151
 										</div>
152 152
 									</div><!-- .selectors -->
153 153
 
154 154
 									<div class="results-found">
155
-										<p class="bold"><?php _e( 'Result', 'auto-load-next-post' ); ?></p>
155
+										<p class="bold"><?php _e('Result', 'auto-load-next-post'); ?></p>
156 156
 
157 157
 										<div class="container"><span class="result">-</span></div>
158 158
 										<div class="title"><span class="result">-</span></div>
@@ -161,22 +161,22 @@  discard block
 block discarded – undo
161 161
 									</div><!-- .results-found -->
162 162
 								</div><!-- .result-container -->
163 163
 
164
-								<p><strong class="red"><?php _e( 'Developers:', 'auto-load-next-post' ); ?></strong> <?php echo sprintf( __( 'Checkout the %1$sadd theme support guide%2$s to apply these found theme selectors automatically when another user installs your theme with %3$s.', 'auto-load-next-post' ), '<a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/add-theme-support.md#add-theme-support" target="_blank">', '</a>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
164
+								<p><strong class="red"><?php _e('Developers:', 'auto-load-next-post'); ?></strong> <?php echo sprintf(__('Checkout the %1$sadd theme support guide%2$s to apply these found theme selectors automatically when another user installs your theme with %3$s.', 'auto-load-next-post'), '<a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/add-theme-support.md#add-theme-support" target="_blank">', '</a>', esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
165 165
 
166 166
 							</div><!-- .debug-mode -->
167 167
 							<?php } ?>
168 168
 
169
-							<p class="theme-selectors-undetected"><?php printf( esc_html__( 'Setup Wizard was unable to detect some of the theme selectors. You can scan again just to be sure the wizard did not timeout but most likley you will have to manually set them yourself. %1$sFollow the theme selectors guide to find them%2$s.', 'auto-load-next-post' ), '<a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors" target="_blank">', '</a>' ); ?></p>
169
+							<p class="theme-selectors-undetected"><?php printf(esc_html__('Setup Wizard was unable to detect some of the theme selectors. You can scan again just to be sure the wizard did not timeout but most likley you will have to manually set them yourself. %1$sFollow the theme selectors guide to find them%2$s.', 'auto-load-next-post'), '<a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors" target="_blank">', '</a>'); ?></p>
170 170
 
171
-							<p class="no-post-navigation"><?php printf( __( 'No post navigation on the scanned post was detected. If this is incorrect, please %1$scontact me%2$s and let me know your site URL address.', 'auto-load-next-post' ), '<a href="https://autoloadnextpost.com/contact/" target="_blank">', '</a>' ); ?></p>
171
+							<p class="no-post-navigation"><?php printf(__('No post navigation on the scanned post was detected. If this is incorrect, please %1$scontact me%2$s and let me know your site URL address.', 'auto-load-next-post'), '<a href="https://autoloadnextpost.com/contact/" target="_blank">', '</a>'); ?></p>
172 172
 
173
-							<p class="setup-complete"><?php printf( __( 'Congratulations, %s is now setup and ready. Further optional options are available via the settings page.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
173
+							<p class="setup-complete"><?php printf(__('Congratulations, %s is now setup and ready. Further optional options are available via the settings page.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
174 174
 
175 175
 							<hr>
176 176
 
177 177
 							<p style="text-align: center;">
178
-								<button class="button button-large rescan"><?php _e( 'Scan Again?', 'auto-load-next-post' ); ?></button>
179
-								<a class="button button-primary button-large" href="<?php echo add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'misc' ), admin_url( 'options-general.php' ) ); ?>"><?php _e( 'View Settings', 'auto-load-next-post' ); ?></a>
178
+								<button class="button button-large rescan"><?php _e('Scan Again?', 'auto-load-next-post'); ?></button>
179
+								<a class="button button-primary button-large" href="<?php echo add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'misc'), admin_url('options-general.php')); ?>"><?php _e('View Settings', 'auto-load-next-post'); ?></a>
180 180
 							</p>
181 181
 						</div><!-- .box.theme-selector-results -->
182 182
 						<?php } ?>
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-notices.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 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
-if ( ! class_exists( 'ALNP_Admin_Notices' ) ) {
18
+if ( ! class_exists('ALNP_Admin_Notices')) {
19 19
 
20 20
 	class ALNP_Admin_Notices {
21 21
 
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 		 * @version 1.5.11
38 38
 		 */
39 39
 		public function __construct() {
40
-			self::$install_date = get_site_option( 'auto_load_next_post_install_date', time() );
40
+			self::$install_date = get_site_option('auto_load_next_post_install_date', time());
41 41
 
42 42
 			// Check WordPress enviroment.
43
-			add_action( 'admin_init', array( $this, 'check_wp' ), 12 );
43
+			add_action('admin_init', array($this, 'check_wp'), 12);
44 44
 
45 45
 			// Don't bug the user if they don't want to see any notices.
46
-			add_action( 'admin_init', array( $this, 'dont_bug_me' ), 15 );
46
+			add_action('admin_init', array($this, 'dont_bug_me'), 15);
47 47
 
48 48
 			// Display other admin notices when required. All are dismissable.
49
-			add_action( 'admin_print_styles', array( $this, 'add_notices' ), 0 );
49
+			add_action('admin_print_styles', array($this, 'add_notices'), 0);
50 50
 		} // END __construct()
51 51
 
52 52
 		/**
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 			global $wp_version;
63 63
 
64 64
 			// If the current user can not install plugins then return nothing!
65
-			if ( ! current_user_can( 'install_plugins' ) ) {
65
+			if ( ! current_user_can('install_plugins')) {
66 66
 				return false;
67 67
 			}
68 68
 
69
-			if ( ! version_compare( $wp_version, AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE, '>=' ) ) {
70
-				add_action( 'admin_notices', array( $this, 'requirement_wp_notice' ) );
69
+			if ( ! version_compare($wp_version, AUTO_LOAD_NEXT_POST_WP_VERSION_REQUIRE, '>=')) {
70
+				add_action('admin_notices', array($this, 'requirement_wp_notice'));
71 71
 				return false;
72 72
 			}
73 73
 
@@ -88,26 +88,26 @@  discard block
 block discarded – undo
88 88
 			$user_hidden_notice = false;
89 89
 
90 90
 			// If the user is allowed to install plugins and requested to hide the review notice then hide it for that user.
91
-			if ( ! empty( $_GET['hide_auto_load_next_post_review_notice'] ) && current_user_can( 'install_plugins' ) ) {
92
-				add_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', '1', true );
91
+			if ( ! empty($_GET['hide_auto_load_next_post_review_notice']) && current_user_can('install_plugins')) {
92
+				add_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', '1', true);
93 93
 				$user_hidden_notice = true;
94 94
 			}
95 95
 
96 96
 			// If the user is allowed to install plugins and requested to hide the review notice then hide it for that user.
97
-			if ( ! empty( $_GET['hide_auto_load_next_post_setup_notice'] ) && current_user_can( 'install_plugins' ) ) {
98
-				add_user_meta( $current_user->ID, 'auto_load_next_post_hide_setup_notice', '1', true );
97
+			if ( ! empty($_GET['hide_auto_load_next_post_setup_notice']) && current_user_can('install_plugins')) {
98
+				add_user_meta($current_user->ID, 'auto_load_next_post_hide_setup_notice', '1', true);
99 99
 				$user_hidden_notice = true;
100 100
 			}
101 101
 
102 102
 			// If the user is allowed to install plugins and requested to hide the beta notice then hide it for that user.
103
-			if ( ! empty( $_GET['hide_auto_load_next_post_beta_notice'] ) && current_user_can( 'install_plugins' ) ) {
104
-				set_transient( 'alnp_beta_notice_hidden', 'hidden', WEEK_IN_SECONDS );
103
+			if ( ! empty($_GET['hide_auto_load_next_post_beta_notice']) && current_user_can('install_plugins')) {
104
+				set_transient('alnp_beta_notice_hidden', 'hidden', WEEK_IN_SECONDS);
105 105
 				$user_hidden_notice = true;
106 106
 			}
107 107
 
108
-			if ( $user_hidden_notice ) {
108
+			if ($user_hidden_notice) {
109 109
 				// Redirect to the plugins page.
110
-				wp_safe_redirect( admin_url( 'plugins.php' ) );
110
+				wp_safe_redirect(admin_url('plugins.php'));
111 111
 				exit;
112 112
 			}
113 113
 		} // END dont_bug_me()
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			global $current_user;
127 127
 
128 128
 			// If the current user can not install plugins then return nothing!
129
-			if ( ! current_user_can( 'install_plugins' ) ) {
129
+			if ( ! current_user_can('install_plugins')) {
130 130
 				return false;
131 131
 			}
132 132
 
@@ -134,62 +134,62 @@  discard block
 block discarded – undo
134 134
 			$screen_id = $screen ? $screen->id : '';
135 135
 
136 136
 			// Notices should only show on the main dashboard and on the plugins screen.
137
-			if ( ! in_array( $screen_id, alnp_get_admin_screens() ) ) {
137
+			if ( ! in_array($screen_id, alnp_get_admin_screens())) {
138 138
 				return false;
139 139
 			}
140 140
 
141 141
 			// Is admin review notice hidden?
142
-			$hide_review_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', true );
142
+			$hide_review_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', true);
143 143
 
144 144
 			// Check if we need to display the review plugin notice.
145
-			if ( empty( $hide_review_notice ) ) {
145
+			if (empty($hide_review_notice)) {
146 146
 				// If it has been a week or more since activating the plugin then display the review notice.
147
-				if ( ( intval( time() - self::$install_date ) ) > WEEK_IN_SECONDS ) {
148
-					add_action( 'admin_notices', array( $this, 'plugin_review_notice' ) );
147
+				if ((intval(time() - self::$install_date)) > WEEK_IN_SECONDS) {
148
+					add_action('admin_notices', array($this, 'plugin_review_notice'));
149 149
 				}
150 150
 			}
151 151
 
152 152
 			// Is admin setup wizard notice hidden?
153
-			$hide_setup_wizard_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_setup_notice', true );
153
+			$hide_setup_wizard_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_setup_notice', true);
154 154
 
155 155
 			// Check if we need to show setup wizard notice.
156
-			if ( empty( $hide_setup_wizard_notice ) && ! is_alnp_supported() ) {
156
+			if (empty($hide_setup_wizard_notice) && ! is_alnp_supported()) {
157 157
 				// Notify users of the Setup Wizard.
158
-				add_action( 'admin_notices', array( $this, 'setup_wizard_notice' ) );
158
+				add_action('admin_notices', array($this, 'setup_wizard_notice'));
159 159
 			}
160 160
 
161 161
 			// Is this version of Auto Load Next Post a beta/pre-release?
162
-			if ( is_alnp_beta() && empty( get_transient( 'alnp_beta_notice_hidden' ) ) ) {
163
-				add_action( 'admin_notices', array( $this, 'beta_notice' ) );
162
+			if (is_alnp_beta() && empty(get_transient('alnp_beta_notice_hidden'))) {
163
+				add_action('admin_notices', array($this, 'beta_notice'));
164 164
 			}
165 165
 
166
-			$template = get_option( 'template' );
166
+			$template = get_option('template');
167 167
 
168 168
 			// Checks if the theme supports Auto Load Next Post and not provided via a plugin.
169
-			if ( is_alnp_supported() ) {
170
-				$plugin_supported = alnp_get_theme_support( 'plugin_support' );
169
+			if (is_alnp_supported()) {
170
+				$plugin_supported = alnp_get_theme_support('plugin_support');
171 171
 
172 172
 				// Return if theme is supported via plugin.
173
-				if ( ! empty( $plugin_supported ) && $plugin_supported == 'yes' ) {
174
-					update_option( 'auto_load_next_post_theme_supported', $template );
173
+				if ( ! empty($plugin_supported) && $plugin_supported == 'yes') {
174
+					update_option('auto_load_next_post_theme_supported', $template);
175 175
 					return false;
176 176
 				}
177 177
 
178 178
 				// If supported theme does not match active theme then show notice.
179
-				if ( get_option( 'auto_load_next_post_theme_supported' ) !== $template ) {
180
-					add_action( 'admin_notices', array( $this, 'theme_ready_notice' ) );
181
-					update_option( 'auto_load_next_post_theme_supported', $template );
179
+				if (get_option('auto_load_next_post_theme_supported') !== $template) {
180
+					add_action('admin_notices', array($this, 'theme_ready_notice'));
181
+					update_option('auto_load_next_post_theme_supported', $template);
182 182
 				}
183 183
 			} else {
184 184
 				// If theme not supported then delete option.
185
-				delete_option( 'auto_load_next_post_theme_supported' );
185
+				delete_option('auto_load_next_post_theme_supported');
186 186
 			}
187 187
 
188 188
 			// Upgrade warning notice that will disappear once the new release is installed.
189 189
 			$upgrade_version = '1.6.0';
190 190
 
191
-			if ( ! is_alnp_beta() && version_compare( AUTO_LOAD_NEXT_POST_VERSION, $upgrade_version, '<' ) ) {
192
-				add_action( 'admin_notices', array( $this, 'upgrade_warning' ) );
191
+			if ( ! is_alnp_beta() && version_compare(AUTO_LOAD_NEXT_POST_VERSION, $upgrade_version, '<')) {
192
+				add_action('admin_notices', array($this, 'upgrade_warning'));
193 193
 			}
194 194
 		} // END add_notices()
195 195
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		 * @version 1.5.13
203 203
 		 */
204 204
 		public function upgrade_warning() {
205
-			include_once( dirname( __FILE__ ) . '/views/html-notice-upgrade-warning.php' );
205
+			include_once(dirname(__FILE__).'/views/html-notice-upgrade-warning.php');
206 206
 		} // END upgrade_warning()
207 207
 
208 208
 		/**
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		 * @since  1.4.3
213 213
 		 */
214 214
 		public function requirement_wp_notice() {
215
-			include( dirname( __FILE__ ) . '/views/html-notice-requirement-wp.php' );
215
+			include(dirname(__FILE__).'/views/html-notice-requirement-wp.php');
216 216
 		} // END requirement_wp_notice()
217 217
 
218 218
 		/**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		 * @since  1.5.0
223 223
 		 */
224 224
 		public function theme_ready_notice() {
225
-			include( dirname( __FILE__ ) . '/views/html-notice-theme-ready.php' );
225
+			include(dirname(__FILE__).'/views/html-notice-theme-ready.php');
226 226
 		} // END theme_ready_notice()
227 227
 
228 228
 		/**
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		 * @since  1.6.0
233 233
 		 */
234 234
 		public function setup_wizard_notice() {
235
-			include( dirname( __FILE__ ) . '/views/html-notice-setup-wizard.php' );
235
+			include(dirname(__FILE__).'/views/html-notice-setup-wizard.php');
236 236
 		}
237 237
 
238 238
 		/**
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 		 * @since  1.5.0
243 243
 		 */
244 244
 		public function beta_notice() {
245
-			include( dirname( __FILE__ ) . '/views/html-notice-trying-beta.php' );
245
+			include(dirname(__FILE__).'/views/html-notice-trying-beta.php');
246 246
 		} // END beta_notice()
247 247
 
248 248
 		/**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 		public function plugin_review_notice() {
256 256
 			$install_date = self::$install_date;
257 257
 
258
-			include( dirname( __FILE__ ) . '/views/html-notice-please-review.php' );
258
+			include(dirname(__FILE__).'/views/html-notice-please-review.php');
259 259
 		} // END plugin_review_notice()
260 260
 
261 261
 	} // END class.
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-action-links.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  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
-if ( ! class_exists( 'ALNP_Admin_Action_Links' ) ) {
19
+if ( ! class_exists('ALNP_Admin_Action_Links')) {
20 20
 
21 21
 	class ALNP_Admin_Action_Links {
22 22
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 		 * @access public
27 27
 		 */
28 28
 		public function __construct() {
29
-			add_filter( 'plugin_action_links_' . plugin_basename( AUTO_LOAD_NEXT_POST_FILE ), array( $this, 'plugin_action_links' ) );
30
-			add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta'), 10, 3 );
29
+			add_filter('plugin_action_links_'.plugin_basename(AUTO_LOAD_NEXT_POST_FILE), array($this, 'plugin_action_links'));
30
+			add_filter('plugin_row_meta', array($this, 'plugin_row_meta'), 10, 3);
31 31
 		} // END __construct()
32 32
 
33 33
 		/**
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 		 * @param  array $links An array of plugin links.
38 38
 		 * @return array $links
39 39
 		 */
40
-		public function plugin_action_links( $links ) {
41
-			if ( current_user_can( 'manage_options' ) ) {
40
+		public function plugin_action_links($links) {
41
+			if (current_user_can('manage_options')) {
42 42
 				$action_links = array(
43
-					'getting-started' => '<a href="' . add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'getting-started' ), admin_url( 'options-general.php' ) ) . '" aria-label="' . sprintf( esc_attr__( 'Getting Started with %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '">' . esc_attr__( 'Getting Started', 'auto-load-next-post' ) . '</a>',
44
-					'settings'        => '<a href="' . add_query_arg( array( 'page' => 'auto-load-next-post' ), admin_url( 'options-general.php' ) ) . '" aria-label="' . sprintf( esc_attr__( 'View %s settings', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '">' . esc_attr__( 'Settings', 'auto-load-next-post' ) . '</a>'
43
+					'getting-started' => '<a href="'.add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'getting-started'), admin_url('options-general.php')).'" aria-label="'.sprintf(esc_attr__('Getting Started with %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'">'.esc_attr__('Getting Started', 'auto-load-next-post').'</a>',
44
+					'settings'        => '<a href="'.add_query_arg(array('page' => 'auto-load-next-post'), admin_url('options-general.php')).'" aria-label="'.sprintf(esc_attr__('View %s settings', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'">'.esc_attr__('Settings', 'auto-load-next-post').'</a>'
45 45
 				);
46 46
 
47
-				return array_merge( $action_links, $links );
47
+				return array_merge($action_links, $links);
48 48
 			}
49 49
 
50 50
 			return $links;
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
 		 * @param  array  $data     Plugin Information
60 60
 		 * @return array  $metadata
61 61
 		 */
62
-		public function plugin_row_meta( $metadata, $file, $data ) {
63
-			if ( $file == plugin_basename( AUTO_LOAD_NEXT_POST_FILE ) ) {
64
-				$metadata[ 1 ] = sprintf( __( 'Developed By %s', 'auto-load-next-post' ), '<a href="' . $data[ 'AuthorURI' ] . '" aria-label="' . esc_attr__( 'View the developers site', 'auto-load-next-post' ) . '">' . $data[ 'Author' ] . '</a>' );
62
+		public function plugin_row_meta($metadata, $file, $data) {
63
+			if ($file == plugin_basename(AUTO_LOAD_NEXT_POST_FILE)) {
64
+				$metadata[1] = sprintf(__('Developed By %s', 'auto-load-next-post'), '<a href="'.$data['AuthorURI'].'" aria-label="'.esc_attr__('View the developers site', 'auto-load-next-post').'">'.$data['Author'].'</a>');
65 65
 
66 66
 				$campaign_args = array(
67 67
 					'utm_medium'   => 'auto-load-next-post-lite',
@@ -70,23 +70,23 @@  discard block
 block discarded – undo
70 70
 					'utm_content'  => 'go-pro',
71 71
 				);
72 72
 
73
-				$theme_support = add_query_arg( $campaign_args, AUTO_LOAD_NEXT_POST_STORE_URL . 'product/theme-support/' );
73
+				$theme_support = add_query_arg($campaign_args, AUTO_LOAD_NEXT_POST_STORE_URL.'product/theme-support/');
74 74
 
75 75
 				$row_meta = array(
76
-					'docs' => '<a href="' . esc_url( 'https://github.com/autoloadnextpost/alnp-documentation/tree/master/en_US#the-manual' ) . '" aria-label="' . sprintf( esc_attr__( 'View %s documentation', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '" target="_blank">' . esc_attr__( 'Documentation', 'auto-load-next-post' ) . '</a>',
77
-					'community' => '<a href="' . esc_url( 'https://wordpress.org/support/plugin/auto-load-next-post' ) . '" aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">' . esc_attr__( 'Community Support', 'auto-load-next-post' ) . '</a>',
78
-					'theme-support' => '<a href="' . esc_url( $theme_support ) . '" attr-label="' . esc_attr__( 'Get theme support', 'auto-load-next-post' ) . '" target="_blank">' . esc_attr__( 'Theme Support', 'auto-load-next-post' ) . '</a>',
79
-					'review' => '<a href="' . esc_url( AUTO_LOAD_NEXT_POST_REVIEW_URL ) . '" aria-label="' . sprintf( esc_attr__( 'Review %s on WordPress.org', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '" target="_blank">' . esc_attr__( 'Leave a Review', 'auto-load-next-post' ) . '</a>',
76
+					'docs' => '<a href="'.esc_url('https://github.com/autoloadnextpost/alnp-documentation/tree/master/en_US#the-manual').'" aria-label="'.sprintf(esc_attr__('View %s documentation', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'" target="_blank">'.esc_attr__('Documentation', 'auto-load-next-post').'</a>',
77
+					'community' => '<a href="'.esc_url('https://wordpress.org/support/plugin/auto-load-next-post').'" aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">'.esc_attr__('Community Support', 'auto-load-next-post').'</a>',
78
+					'theme-support' => '<a href="'.esc_url($theme_support).'" attr-label="'.esc_attr__('Get theme support', 'auto-load-next-post').'" target="_blank">'.esc_attr__('Theme Support', 'auto-load-next-post').'</a>',
79
+					'review' => '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_REVIEW_URL).'" aria-label="'.sprintf(esc_attr__('Review %s on WordPress.org', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'" target="_blank">'.esc_attr__('Leave a Review', 'auto-load-next-post').'</a>',
80 80
 				);
81 81
 
82 82
 				// Checks if Auto Load Next Post Pro has been installed.
83
-				if ( ! is_alnp_pro_version_installed() ) {
84
-					$store_url = add_query_arg( $campaign_args, AUTO_LOAD_NEXT_POST_STORE_URL . 'pro/' );
83
+				if ( ! is_alnp_pro_version_installed()) {
84
+					$store_url = add_query_arg($campaign_args, AUTO_LOAD_NEXT_POST_STORE_URL.'pro/');
85 85
 
86
-					$row_meta['pro'] = sprintf( '<a href="%1$s" aria-label="' . sprintf( esc_attr__( 'Sign up for %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ) ) . '" target="_blank" style="color: #c00; font-weight: 700;">%2$s</a>', esc_url( $store_url ), esc_attr__( 'Pro Coming Soon', 'auto-load-next-post' ) );
86
+					$row_meta['pro'] = sprintf('<a href="%1$s" aria-label="'.sprintf(esc_attr__('Sign up for %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post Pro', 'auto-load-next-post')).'" target="_blank" style="color: #c00; font-weight: 700;">%2$s</a>', esc_url($store_url), esc_attr__('Pro Coming Soon', 'auto-load-next-post'));
87 87
 				}
88 88
 
89
-				$metadata = array_merge( $metadata, $row_meta );
89
+				$metadata = array_merge($metadata, $row_meta);
90 90
 			}
91 91
 
92 92
 			return $metadata;
Please login to merge, or discard this patch.
includes/admin/class-alnp-getting-started.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  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
-if ( ! class_exists( 'ALNP_Getting_Started' ) ) {
19
+if ( ! class_exists('ALNP_Getting_Started')) {
20 20
 
21 21
 	class ALNP_Getting_Started {
22 22
 
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'getting-started';
30
-			$this->label = esc_html__( 'Getting Started', 'auto-load-next-post' );
30
+			$this->label = esc_html__('Getting Started', 'auto-load-next-post');
31 31
 
32
-			add_action( 'auto_load_next_post_settings_end', array( $this, 'output' ), 10, 2 );
32
+			add_action('auto_load_next_post_settings_end', array($this, 'output'), 10, 2);
33 33
 		} // END __construct()
34 34
 
35 35
 		/**
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 		 * @access public
39 39
 		 * @param string $current_view
40 40
 		 */
41
-		public function output( $current_view ) {
42
-			if ( $current_view !== 'getting-started' ) {
41
+		public function output($current_view) {
42
+			if ($current_view !== 'getting-started') {
43 43
 				return;
44 44
 			}
45 45
 
@@ -53,42 +53,42 @@  discard block
 block discarded – undo
53 53
 					<div class="content">
54 54
 						<div class="logo">
55 55
 							<a href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>" target="_blank">
56
-								<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/logo.png'; ?>" alt="<?php esc_html_e( 'Auto Load Next Post', 'auto-load-next-post' ); ?>" />
56
+								<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/logo.png'; ?>" alt="<?php esc_html_e('Auto Load Next Post', 'auto-load-next-post'); ?>" />
57 57
 							</a>
58 58
 						</div>
59 59
 
60
-						<h1><?php printf( __( 'Getting started with %s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></h1>
60
+						<h1><?php printf(__('Getting started with %s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></h1>
61 61
 
62
-						<p><strong><?php printf( __( 'Thanks for choosing %s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></strong></p>
62
+						<p><strong><?php printf(__('Thanks for choosing %s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></strong></p>
63 63
 
64
-						<p><?php echo esc_html__( 'Your well on your way to increasing your pageviews by engaging your site viewers to keep reading your content and reduce bounce rate.', 'auto-load-next-post' ); ?></p>
64
+						<p><?php echo esc_html__('Your well on your way to increasing your pageviews by engaging your site viewers to keep reading your content and reduce bounce rate.', 'auto-load-next-post'); ?></p>
65 65
 
66 66
 						<?php
67 67
 						// Is Theme already supported?
68
-						if ( is_alnp_supported() ) {
68
+						if (is_alnp_supported()) {
69 69
 						?>
70
-							<p><?php echo sprintf( __( 'Your active theme %1$s supports %2$s so everything is already setup for you.', 'auto-load-next-post' ), '<strong>' . $active_theme->name . '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
70
+							<p><?php echo sprintf(__('Your active theme %1$s supports %2$s so everything is already setup for you.', 'auto-load-next-post'), '<strong>'.$active_theme->name.'</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
71 71
 						<?php
72 72
 						} else {
73 73
 						?>
74
-							<p><?php echo sprintf( __( 'Run the %1$s to be ready in less than 5-minutes, setting up %2$s for the first time is easy. The wizard will scan your theme to process the installation.', 'auto-load-next-post' ), esc_html__( 'Setup Wizard', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
74
+							<p><?php echo sprintf(__('Run the %1$s to be ready in less than 5-minutes, setting up %2$s for the first time is easy. The wizard will scan your theme to process the installation.', 'auto-load-next-post'), esc_html__('Setup Wizard', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
75 75
 
76
-							<p><strong class="red"><?php _e( 'Developers:', 'auto-load-next-post' ); ?></strong> <?php printf( __( 'Enable %1$sWP_DEBUG%2$s in your %3$swp-config.php%4$s file before running the %5$s to provide you results for each step once it has scanned your theme.', 'auto-load-next-post' ), '<strong>', '</strong>', '<code>', '</code>', esc_html__( 'Setup Wizard', 'auto-load-next-post' ) ); ?></p>
76
+							<p><strong class="red"><?php _e('Developers:', 'auto-load-next-post'); ?></strong> <?php printf(__('Enable %1$sWP_DEBUG%2$s in your %3$swp-config.php%4$s file before running the %5$s to provide you results for each step once it has scanned your theme.', 'auto-load-next-post'), '<strong>', '</strong>', '<code>', '</code>', esc_html__('Setup Wizard', 'auto-load-next-post')); ?></p>
77 77
 
78
-							<p><?php echo sprintf( __( 'You can add support for %1$s for future users by viewing the documentation and developer guides, snippets and more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
78
+							<p><?php echo sprintf(__('You can add support for %1$s for future users by viewing the documentation and developer guides, snippets and more.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
79 79
 
80 80
 							<?php
81 81
 							/**
82 82
 							 * Display content if you have Auto Load Next Post Pro installed or not.
83 83
 							 */
84
-							if ( is_alnp_pro_version_installed() ) {
85
-								include( dirname( __FILE__ ) . '/views/html-getting-started-pro.php' );
84
+							if (is_alnp_pro_version_installed()) {
85
+								include(dirname(__FILE__).'/views/html-getting-started-pro.php');
86 86
 							}
87 87
 							?>
88 88
 
89 89
 							<p style="text-align: center;">
90
-								<a class="button button-primary button-large" href="<?php echo add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'setup-wizard' ), admin_url( 'options-general.php' ) ); ?>"><?php _e( 'Setup Wizard', 'auto-load-next-post' ); ?></a>
91
-								<a class="button button-large" href="<?php echo AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL; ?>"><?php _e( 'View Documentation', 'auto-load-next-post' ); ?></a>
90
+								<a class="button button-primary button-large" href="<?php echo add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'setup-wizard'), admin_url('options-general.php')); ?>"><?php _e('Setup Wizard', 'auto-load-next-post'); ?></a>
91
+								<a class="button button-large" href="<?php echo AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL; ?>"><?php _e('View Documentation', 'auto-load-next-post'); ?></a>
92 92
 							</p>
93 93
 
94 94
 							<hr>
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
 
99 99
 						<p><?php echo sprintf(
100 100
 							/* translators: 1: Opening <a> tag to the Auto Load Next Post Twitter account, 2: Opening <a> tag to the Auto Load Next Post Instagram account, 3: Opening <a> tag to the Auto Load Next Post contact page, 4: Opening <a> tag to the Auto Load Next Post newsletter, 5: Closing </a> tag */
101
-							esc_html__( 'If you have any questions or feedback, let me know on %1$sTwitter%5$s, %2$sInstagram%5$s or via the %3$sContact page%5$s. Also, %4$ssubscribe to my newsletter%5$s if you want to stay up to date with what\'s new and upcoming in Auto Load Next Post.', 'auto-load-next-post' ), '<a href="https://twitter.com/autoloadnxtpost" target="_blank">', '<a href="https://instagram.com/autoloadnextpost" target="_blank">', '<a href="https://autoloadnextpost.com/contact/" target="_blank">', '<a href="http://eepurl.com/bvLz2H" target="_blank">', '</a>'
101
+							esc_html__('If you have any questions or feedback, let me know on %1$sTwitter%5$s, %2$sInstagram%5$s or via the %3$sContact page%5$s. Also, %4$ssubscribe to my newsletter%5$s if you want to stay up to date with what\'s new and upcoming in Auto Load Next Post.', 'auto-load-next-post'), '<a href="https://twitter.com/autoloadnxtpost" target="_blank">', '<a href="https://instagram.com/autoloadnextpost" target="_blank">', '<a href="https://autoloadnextpost.com/contact/" target="_blank">', '<a href="http://eepurl.com/bvLz2H" target="_blank">', '</a>'
102 102
 						);
103 103
 						?></p>
104 104
 
105
-						<p><?php echo esc_html__( 'Enjoy!', 'auto-load-next-post' ); ?></p>
105
+						<p><?php echo esc_html__('Enjoy!', 'auto-load-next-post'); ?></p>
106 106
 					</div>
107 107
 
108 108
 				</div>
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-assets.php 1 patch
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  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
-if ( ! class_exists( 'ALNP_Admin_Assets' ) ) {
17
+if ( ! class_exists('ALNP_Admin_Assets')) {
18 18
 
19 19
 	class ALNP_Admin_Assets {
20 20
 
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 		 */
26 26
 		public function __construct() {
27 27
 			// Register scripts and styles for settings page.
28
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_styles' ), 10 );
29
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 10 );
28
+			add_action('admin_enqueue_scripts', array($this, 'admin_styles'), 10);
29
+			add_action('admin_enqueue_scripts', array($this, 'admin_scripts'), 10);
30 30
 
31 31
 			// Register Stylesheet for Dark Mode if active.
32
-			add_action( 'doing_dark_mode', array( $this, 'do_dark_mode' ), 99 );
32
+			add_action('doing_dark_mode', array($this, 'do_dark_mode'), 99);
33 33
 
34 34
 			// Adds admin body classes.
35
-			add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
35
+			add_filter('admin_body_class', array($this, 'admin_body_class'));
36 36
 		} // END __construct()
37 37
 
38 38
 		/**
@@ -44,22 +44,22 @@  discard block
 block discarded – undo
44 44
 			$screen    = get_current_screen();
45 45
 			$screen_id = $screen ? $screen->id : '';
46 46
 
47
-			if ( in_array( $screen_id, alnp_get_admin_screens() ) ) {
48
-				Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_admin', '/assets/css/admin/auto-load-next-post' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.css' );
47
+			if (in_array($screen_id, alnp_get_admin_screens())) {
48
+				Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_admin', '/assets/css/admin/auto-load-next-post'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css');
49 49
 
50
-				$current_view = ! empty( $_GET['view'] ) ? sanitize_title( wp_unslash( $_GET['view'] ) ) : '';
50
+				$current_view = ! empty($_GET['view']) ? sanitize_title(wp_unslash($_GET['view'])) : '';
51 51
 
52 52
 				// Dont load stylesheet if viewing any of these pages.
53
-				$dont_style = array( 'getting-started', 'setup-wizard', 'extensions', 'videos' );
54
-				if ( ! in_array( $current_view, $dont_style ) ) {
53
+				$dont_style = array('getting-started', 'setup-wizard', 'extensions', 'videos');
54
+				if ( ! in_array($current_view, $dont_style)) {
55 55
 
56 56
 					// Select2 - Make sure that we remove other registered Select2 to prevent styling issues.
57
-					if ( wp_script_is( 'select2', 'registered' ) ) {
58
-						wp_dequeue_style( 'select2' );
59
-						wp_deregister_style( 'select2' );
57
+					if (wp_script_is('select2', 'registered')) {
58
+						wp_dequeue_style('select2');
59
+						wp_deregister_style('select2');
60 60
 					}
61 61
 
62
-					Auto_Load_Next_Post::load_file( 'select2', '/assets/css/libs/select2.min.css' );
62
+					Auto_Load_Next_Post::load_file('select2', '/assets/css/libs/select2.min.css');
63 63
 				}
64 64
 			}
65 65
 		} // END admin_styles()
@@ -73,76 +73,76 @@  discard block
 block discarded – undo
73 73
 			$screen    = get_current_screen();
74 74
 			$screen_id = $screen ? $screen->id : '';
75 75
 
76
-			if ( $screen_id == 'settings_page_auto-load-next-post' ) {
76
+			if ($screen_id == 'settings_page_auto-load-next-post') {
77 77
 
78 78
 				// Load jQuery Confirm
79
-				Auto_Load_Next_Post::load_file( 'jquery-confirm', '/assets/css/libs/jquery-confirm.min.css' );
80
-				Auto_Load_Next_Post::load_file( 'jquery-confirm', '/assets/js/libs/jquery-confirm.min.js', true, array( 'jquery' ), '3.3.4', true );
79
+				Auto_Load_Next_Post::load_file('jquery-confirm', '/assets/css/libs/jquery-confirm.min.css');
80
+				Auto_Load_Next_Post::load_file('jquery-confirm', '/assets/js/libs/jquery-confirm.min.js', true, array('jquery'), '3.3.4', true);
81 81
 
82
-				$current_view = ! empty( $_GET['view'] ) ? sanitize_title( wp_unslash( $_GET['view'] ) ) : '';
82
+				$current_view = ! empty($_GET['view']) ? sanitize_title(wp_unslash($_GET['view'])) : '';
83 83
 
84
-				switch( $current_view ) {
84
+				switch ($current_view) {
85 85
 					case 'setup-wizard':
86 86
 						// Scanner.
87
-						Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_scanner', '/assets/js/admin/scanner' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array( 'jquery' ), AUTO_LOAD_NEXT_POST_VERSION, true );
87
+						Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_scanner', '/assets/js/admin/scanner'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, true);
88 88
 
89 89
 						// Variables for Scanner JavaScript.
90
-						wp_localize_script( AUTO_LOAD_NEXT_POST_SLUG . '_scanner', 'alnp_scanner_params', array(
90
+						wp_localize_script(AUTO_LOAD_NEXT_POST_SLUG.'_scanner', 'alnp_scanner_params', array(
91 91
 							'is_rtl'                      => is_rtl() ? true : false,
92
-							'ajax_url'                    => admin_url( 'admin-ajax.php', 'relative' ),
92
+							'ajax_url'                    => admin_url('admin-ajax.php', 'relative'),
93 93
 							'random_page'                 => alnp_get_random_page_permalink(),
94
-							'i18n_searching'              => esc_html__( 'Searching...', 'auto-load-next-post' ),
95
-							'i18n_scanning_theme'         => esc_html__( 'Scanning Theme', 'auto-load-next-post' ),
96
-							'i18n_scanning_theme_content' => esc_html__( 'Currently scanning a post on your site for your theme selectors. Please wait...', 'auto-load-next-post' ),
97
-							'i18n_please_wait'            => esc_html__( 'Please Wait', 'auto-load-next-post' ),
98
-							'i18n_loading_post'           => esc_html__( 'Loading post...', 'auto-load-next-post' ),
99
-							'i18n_copied'                 => esc_html__( 'Copied', 'auto-load-next-post' ),
100
-							'i18n_copy_title'             => esc_html__( 'Click to copy theme selector', 'auto-load-next-post' ),
101
-							'i18n_post_nav_missing'       => esc_html__( 'Post Navigation Missing?', 'auto-load-next-post' ),
102
-							'i18n_error_post_nav'         => sprintf( esc_html__( '%1$s requires a theme with a post navigation in order to work and the setup wizard did not detect one. You may scan again to be sure. If you get the same results, %1$s may not recognise it.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
103
-						) );
94
+							'i18n_searching'              => esc_html__('Searching...', 'auto-load-next-post'),
95
+							'i18n_scanning_theme'         => esc_html__('Scanning Theme', 'auto-load-next-post'),
96
+							'i18n_scanning_theme_content' => esc_html__('Currently scanning a post on your site for your theme selectors. Please wait...', 'auto-load-next-post'),
97
+							'i18n_please_wait'            => esc_html__('Please Wait', 'auto-load-next-post'),
98
+							'i18n_loading_post'           => esc_html__('Loading post...', 'auto-load-next-post'),
99
+							'i18n_copied'                 => esc_html__('Copied', 'auto-load-next-post'),
100
+							'i18n_copy_title'             => esc_html__('Click to copy theme selector', 'auto-load-next-post'),
101
+							'i18n_post_nav_missing'       => esc_html__('Post Navigation Missing?', 'auto-load-next-post'),
102
+							'i18n_error_post_nav'         => sprintf(esc_html__('%1$s requires a theme with a post navigation in order to work and the setup wizard did not detect one. You may scan again to be sure. If you get the same results, %1$s may not recognise it.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
103
+						));
104 104
 
105 105
 						break;
106 106
 					default:
107 107
 						// Select2 - Make sure that we remove other registered Select2 to prevent plugin conflict issues.
108
-						if ( wp_script_is( 'select2', 'registered' ) ) {
109
-							wp_dequeue_script( 'select2' );
110
-							wp_deregister_script( 'select2' );
108
+						if (wp_script_is('select2', 'registered')) {
109
+							wp_dequeue_script('select2');
110
+							wp_deregister_script('select2');
111 111
 						}
112 112
 
113 113
 						// Load Select2
114
-						Auto_Load_Next_Post::load_file( 'select2', '/assets/js/libs/select2.min.js', true, array( 'jquery' ), '4.0.5', true );
114
+						Auto_Load_Next_Post::load_file('select2', '/assets/js/libs/select2.min.js', true, array('jquery'), '4.0.5', true);
115 115
 
116 116
 						// Auto Load Next Post Preview.
117
-						Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_pro_preview', '/assets/js/admin/pro-preview' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array( 'jquery', 'jquery-confirm' ), AUTO_LOAD_NEXT_POST_VERSION, true );
117
+						Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_pro_preview', '/assets/js/admin/pro-preview'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery', 'jquery-confirm'), AUTO_LOAD_NEXT_POST_VERSION, true);
118 118
 
119 119
 						// Variables for Pro Preview JavaScript.
120
-						wp_localize_script( AUTO_LOAD_NEXT_POST_SLUG . '_pro_preview', 'alnp_pro_preview_params', array(
120
+						wp_localize_script(AUTO_LOAD_NEXT_POST_SLUG.'_pro_preview', 'alnp_pro_preview_params', array(
121 121
 							'is_rtl'                    => is_rtl() ? true : false,
122
-							'i18n_coming_soon'          => esc_html__( 'Coming Soon', 'auto-load-next-post' ),
123
-							'i18n_coming_soon_content'  => sprintf( esc_html__( '%1$s%3$s%2$s coming soon with more features. Sign up in the sidebar to be notified!', 'auto-load-next-post' ), '<strong>', '</strong>', esc_html__( 'Auto Load Next Post Pro', 'auto-load-next-post' ) ),
124
-							'i18n_comments_content'     => sprintf( esc_html__( '%1$sComments:%2$s More control on how comments should interact when each post loads.', 'auto-load-next-post' ), '<strong>', '</strong>' ),
125
-							'i18n_load_scroll_content'  => sprintf( esc_html__( '%1$sLoad and Scroll:%2$s Choose what loads next, enable to load split posts, scroll transistion and scroll speed.', 'auto-load-next-post' ), '<strong>', '</strong>' ),
126
-							'i18n_restrictions_content' => sprintf( esc_html__( '%1$sRestrictions:%2$s Manage which post types %3$s should load on, how many posts to load per session and which user roles and users are excluded from loading posts.', 'auto-load-next-post' ), '<strong>', '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
127
-							'i18n_query_content'        => sprintf( esc_html__( '%1$sQuery:%2$s Customise the query of posts before %3$s loads them including excluded posts and post formats.', 'auto-load-next-post' ), '<strong>', '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
128
-							'i18n_license_content'      => esc_html__( 'License is managed here for support and remote plugin updates.', 'auto-load-next-post' )
129
-						) );
122
+							'i18n_coming_soon'          => esc_html__('Coming Soon', 'auto-load-next-post'),
123
+							'i18n_coming_soon_content'  => sprintf(esc_html__('%1$s%3$s%2$s coming soon with more features. Sign up in the sidebar to be notified!', 'auto-load-next-post'), '<strong>', '</strong>', esc_html__('Auto Load Next Post Pro', 'auto-load-next-post')),
124
+							'i18n_comments_content'     => sprintf(esc_html__('%1$sComments:%2$s More control on how comments should interact when each post loads.', 'auto-load-next-post'), '<strong>', '</strong>'),
125
+							'i18n_load_scroll_content'  => sprintf(esc_html__('%1$sLoad and Scroll:%2$s Choose what loads next, enable to load split posts, scroll transistion and scroll speed.', 'auto-load-next-post'), '<strong>', '</strong>'),
126
+							'i18n_restrictions_content' => sprintf(esc_html__('%1$sRestrictions:%2$s Manage which post types %3$s should load on, how many posts to load per session and which user roles and users are excluded from loading posts.', 'auto-load-next-post'), '<strong>', '</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')),
127
+							'i18n_query_content'        => sprintf(esc_html__('%1$sQuery:%2$s Customise the query of posts before %3$s loads them including excluded posts and post formats.', 'auto-load-next-post'), '<strong>', '</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')),
128
+							'i18n_license_content'      => esc_html__('License is managed here for support and remote plugin updates.', 'auto-load-next-post')
129
+						));
130 130
 
131 131
 						// Load plugin settings.
132
-						Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_admin', '/assets/js/admin/settings' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.js', true, array( 'jquery' ), AUTO_LOAD_NEXT_POST_VERSION, true );
132
+						Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_admin', '/assets/js/admin/settings'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.js', true, array('jquery'), AUTO_LOAD_NEXT_POST_VERSION, true);
133 133
 
134 134
 						// Variables for Admin Settings JavaScript.
135
-						wp_localize_script( AUTO_LOAD_NEXT_POST_SLUG . '_admin', 'alnp_settings_params', array(
135
+						wp_localize_script(AUTO_LOAD_NEXT_POST_SLUG.'_admin', 'alnp_settings_params', array(
136 136
 							'is_rtl'                    => is_rtl() ? 'rtl' : 'ltr',
137
-							'i18n_nav_warning'          => esc_html__( 'The changes you made will be lost if you navigate away from this page.', 'auto-load-next-post' ),
138
-							'i18n_reset_warning'        => sprintf( esc_html__( 'This will reset all settings back to default and re-initialize %s. Are you sure?', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
139
-							'i18n_setup_wizard_warning' => esc_html__( 'The setup wizard will override settings that you may already have working. Are you sure?', 'auto-load-next-post' ),
140
-							'i18n_coming_soon'          => esc_html__( 'Coming Soon', 'auto-load-next-post' ),
141
-							'i18n_continue'             => esc_html__( 'Continue', 'auto-load-next-post' ),
142
-							'i18n_save'                 => esc_html__( 'Save', 'auto-load-next-post' ),
143
-							'i18n_save_recommendation'  => sprintf( esc_html__( 'Press the %1$sSave Changes%2$s button to keep changes.', 'auto-load-next-post' ), '<strong>', '</strong>' ),
144
-							'i18n_warning'              => esc_html__( 'Warning', 'auto-load-next-post' ),
145
-						) );
137
+							'i18n_nav_warning'          => esc_html__('The changes you made will be lost if you navigate away from this page.', 'auto-load-next-post'),
138
+							'i18n_reset_warning'        => sprintf(esc_html__('This will reset all settings back to default and re-initialize %s. Are you sure?', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
139
+							'i18n_setup_wizard_warning' => esc_html__('The setup wizard will override settings that you may already have working. Are you sure?', 'auto-load-next-post'),
140
+							'i18n_coming_soon'          => esc_html__('Coming Soon', 'auto-load-next-post'),
141
+							'i18n_continue'             => esc_html__('Continue', 'auto-load-next-post'),
142
+							'i18n_save'                 => esc_html__('Save', 'auto-load-next-post'),
143
+							'i18n_save_recommendation'  => sprintf(esc_html__('Press the %1$sSave Changes%2$s button to keep changes.', 'auto-load-next-post'), '<strong>', '</strong>'),
144
+							'i18n_warning'              => esc_html__('Warning', 'auto-load-next-post'),
145
+						));
146 146
 
147 147
 						break;
148 148
 				}
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 			$screen    = get_current_screen();
159 159
 			$screen_id = $screen ? $screen->id : '';
160 160
 
161
-			if ( $screen_id == 'settings_page_auto-load-next-post' ) {
162
-				Auto_Load_Next_Post::load_file( AUTO_LOAD_NEXT_POST_SLUG . '_dark_mode', '/assets/css/admin/auto-load-next-post-dark-mode' . AUTO_LOAD_NEXT_POST_SCRIPT_MODE . '.css' );
161
+			if ($screen_id == 'settings_page_auto-load-next-post') {
162
+				Auto_Load_Next_Post::load_file(AUTO_LOAD_NEXT_POST_SLUG.'_dark_mode', '/assets/css/admin/auto-load-next-post-dark-mode'.AUTO_LOAD_NEXT_POST_SCRIPT_MODE.'.css');
163 163
 			}
164 164
 		} // END do_dark_mode()
165 165
 
@@ -172,10 +172,10 @@  discard block
 block discarded – undo
172 172
 		 * @param  string $classes
173 173
 		 * @return string $classes
174 174
 		 */
175
-		public function admin_body_class( $classes ) {
176
-			$current_view = ! empty( $_GET['view'] ) ? sanitize_title( wp_unslash( $_GET['view'] ) ) : '';
175
+		public function admin_body_class($classes) {
176
+			$current_view = ! empty($_GET['view']) ? sanitize_title(wp_unslash($_GET['view'])) : '';
177 177
 
178
-			switch( $current_view ) {
178
+			switch ($current_view) {
179 179
 				case 'getting-started':
180 180
 					$classes = ' alnp-getting-started ';
181 181
 					break;
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-footer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  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
-if ( ! class_exists( 'ALNP_Admin_Footer' ) ) {
17
+if ( ! class_exists('ALNP_Admin_Footer')) {
18 18
 
19 19
 	class ALNP_Admin_Footer {
20 20
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 		 * @access  public
25 25
 		 */
26 26
 		public function __construct() {
27
-			add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 15, 1 );
28
-			add_filter( 'update_footer', array( $this, 'update_footer'), 15 );
27
+			add_filter('admin_footer_text', array($this, 'admin_footer_text'), 15, 1);
28
+			add_filter('update_footer', array($this, 'update_footer'), 15);
29 29
 		} // END __construct()
30 30
 
31 31
 		/**
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
 		 * @param  string $text text to be rendered in the footer.
38 38
 		 * @return string $text
39 39
 		 */
40
-		public function admin_footer_text( $text ) {
40
+		public function admin_footer_text($text) {
41 41
 			$screen    = get_current_screen();
42 42
 			$screen_id = $screen ? $screen->id : '';
43 43
 
44
-			if ( $screen_id == 'settings_page_auto-load-next-post' ) {
44
+			if ($screen_id == 'settings_page_auto-load-next-post') {
45 45
 				// Rating and Review
46 46
 				$text = sprintf(
47 47
 					/* translators: 1: Auto Load Next Post 2:: five stars */
48
-					__( 'If you like %1$s, please leave a %2$s rating. A huge thank you in advance!', 'auto-load-next-post' ),
49
-					sprintf( '<strong>%1$s</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
50
-					'<a href="' . AUTO_LOAD_NEXT_POST_REVIEW_URL . '?rate=5#new-post" target="_blank" aria-label="' . esc_attr__( 'five star', 'auto-load-next-post' ) . '" data-rated="' . esc_attr__( 'Thanks :)', 'auto-load-next-post' ) . '">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
48
+					__('If you like %1$s, please leave a %2$s rating. A huge thank you in advance!', 'auto-load-next-post'),
49
+					sprintf('<strong>%1$s</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')),
50
+					'<a href="'.AUTO_LOAD_NEXT_POST_REVIEW_URL.'?rate=5#new-post" target="_blank" aria-label="'.esc_attr__('five star', 'auto-load-next-post').'" data-rated="'.esc_attr__('Thanks :)', 'auto-load-next-post').'">&#9733;&#9733;&#9733;&#9733;&#9733;</a>'
51 51
 				);
52 52
 			}
53 53
 
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 		 * @param  string $text
63 63
 		 * @return string $text
64 64
 		 */
65
-		public function update_footer( $text ) {
65
+		public function update_footer($text) {
66 66
 			$screen    = get_current_screen();
67 67
 			$screen_id = $screen ? $screen->id : '';
68 68
 
69
-			if ( $screen_id == 'settings_page_auto-load-next-post' ) {
70
-				return sprintf( __( '%s Version', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . ' ' . esc_attr( AUTO_LOAD_NEXT_POST_VERSION );
69
+			if ($screen_id == 'settings_page_auto-load-next-post') {
70
+				return sprintf(__('%s Version', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).' '.esc_attr(AUTO_LOAD_NEXT_POST_VERSION);
71 71
 			}
72 72
 
73 73
 			return $text;
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-help.php 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
  */
15 15
 
16 16
 // Exit if accessed directly.
17
-if ( ! defined( 'ABSPATH' ) ) {
17
+if ( ! defined('ABSPATH')) {
18 18
 	exit;
19 19
 }
20 20
 
21
-if ( ! class_exists( 'ALNP_Admin_Help' ) ) {
21
+if ( ! class_exists('ALNP_Admin_Help')) {
22 22
 
23 23
 	class ALNP_Admin_Help {
24 24
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		 * @since  1.0.0
30 30
 		 */
31 31
 		public function __construct() {
32
-			add_action( 'current_screen', array( $this, 'add_help_tabs' ), 50 );
32
+			add_action('current_screen', array($this, 'add_help_tabs'), 50);
33 33
 		} // END __construct()
34 34
 
35 35
 		/**
@@ -43,131 +43,131 @@  discard block
 block discarded – undo
43 43
 			$screen    = get_current_screen();
44 44
 			$screen_id = $screen ? $screen->id : '';
45 45
 
46
-			if ( $screen_id != 'settings_page_auto-load-next-post' ) {
46
+			if ($screen_id != 'settings_page_auto-load-next-post') {
47 47
 				return;
48 48
 			}
49 49
 
50
-			$current_view = ! empty( $_GET['view'] ) ? sanitize_title( wp_unslash( $_GET['view'] ) ) : '';
50
+			$current_view = ! empty($_GET['view']) ? sanitize_title(wp_unslash($_GET['view'])) : '';
51 51
 
52
-			if ( in_array( $current_view, array( 'getting-started', 'setup-wizard', 'extensions' ) ) ) {
52
+			if (in_array($current_view, array('getting-started', 'setup-wizard', 'extensions'))) {
53 53
 				return;
54 54
 			}
55 55
 
56
-			$screen->add_help_tab( array(
56
+			$screen->add_help_tab(array(
57 57
 				'id'      => 'auto_load_next_post_support_tab',
58
-				'title'   => esc_html__( 'Help & Support', 'auto-load-next-post' ),
58
+				'title'   => esc_html__('Help & Support', 'auto-load-next-post'),
59 59
 				'content' =>
60
-					'<h2>' . esc_html__( 'Help & Support', 'auto-load-next-post' ) . '</h2>' .
60
+					'<h2>'.esc_html__('Help & Support', 'auto-load-next-post').'</h2>'.
61 61
 
62
-					'<p>' . sprintf( __( 'Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="' . esc_url( AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL ) . '" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">', '</a>' ) . '</p>' .
62
+					'<p>'.sprintf(__('Should you need help understanding, using, or extending %1$s, please %2$sread the documentation%3$s. You will find snippets, tutorials and much more.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL).'" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">', '</a>').'</p>'.
63 63
 
64
-					'<p>' . sprintf( __( 'For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="'. esc_url( AUTO_LOAD_NEXT_POST_SUPPORT_URL ) . '"aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">', '</a>' ) . '</p> ' .
64
+					'<p>'.sprintf(__('For further assistance with %1$s you can use the %2$scommunity forum%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.esc_url(AUTO_LOAD_NEXT_POST_SUPPORT_URL).'"aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">', '</a>').'</p> '.
65 65
 
66
-					'<p>' . sprintf( __( '%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>' ) . '</p>' .
66
+					'<p>'.sprintf(__('%1$s is in need of translations. Is the plugin not translated in your language or do you spot errors with the current translations? Helping out is easy! Head over to the project on WordPress.org and click %2$sTranslate %1$s%3$s.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" target="_blank">', '</a>').'</p>'.
67 67
 
68
-					'<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL ) . '" class="button button-primary" aria-label="' . esc_attr__( 'View Auto Load Next Post documentation', 'auto-load-next-post' ) . '" target="_blank">' . esc_html__( 'Documentation', 'auto-load-next-post' ) . '</a> <a href="'. esc_url( AUTO_LOAD_NEXT_POST_SUPPORT_URL ) . '" class="button button-secondary" aria-label="' . esc_attr__( 'Get support from the community', 'auto-load-next-post' ). '" target="_blank">' . esc_html__( 'Community Forum', 'auto-load-next-post' ) . '</a> <a href="' . esc_url( AUTO_LOAD_NEXT_POST_PLUGIN_URL . '#faq' ) . '" class="button button-secondary" target="_blank">' . esc_html__( 'Frequently Asked Questions', 'auto-load-next-post' ) . '</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">' . sprintf( esc_html__( 'Translate %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>'
69
-			) );
68
+					'<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_DOCUMENTATION_URL).'" class="button button-primary" aria-label="'.esc_attr__('View Auto Load Next Post documentation', 'auto-load-next-post').'" target="_blank">'.esc_html__('Documentation', 'auto-load-next-post').'</a> <a href="'.esc_url(AUTO_LOAD_NEXT_POST_SUPPORT_URL).'" class="button button-secondary" aria-label="'.esc_attr__('Get support from the community', 'auto-load-next-post').'" target="_blank">'.esc_html__('Community Forum', 'auto-load-next-post').'</a> <a href="'.esc_url(AUTO_LOAD_NEXT_POST_PLUGIN_URL.'#faq').'" class="button button-secondary" target="_blank">'.esc_html__('Frequently Asked Questions', 'auto-load-next-post').'</a> <a href="https://translate.wordpress.org/projects/wp-plugins/auto-load-next-post" class="button button-secondary" target="_blank">'.sprintf(esc_html__('Translate %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>'
69
+			));
70 70
 
71
-			$screen->add_help_tab( array(
71
+			$screen->add_help_tab(array(
72 72
 				'id'      => 'auto_load_next_post_theme_selectors_tab',
73
-				'title'   => __( 'Theme Selectors', 'auto-load-next-post' ),
73
+				'title'   => __('Theme Selectors', 'auto-load-next-post'),
74 74
 				'content' =>
75
-					'<h2>' . __( 'Theme Selectors', 'auto-load-next-post' ) . '</h2>' .
75
+					'<h2>'.__('Theme Selectors', 'auto-load-next-post').'</h2>'.
76 76
 
77
-					'<p>' . sprintf(
78
-						__( 'Theme Selectors allows %s know where to load the content in, which post is being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post' ),
79
-						esc_html__( 'Auto Load Next Post', 'auto-load-next-post' )
80
-					) . '</p>' .
77
+					'<p>'.sprintf(
78
+						__('Theme Selectors allows %s know where to load the content in, which post is being read, the next post to load and whether to show or hide comments per post.', 'auto-load-next-post'),
79
+						esc_html__('Auto Load Next Post', 'auto-load-next-post')
80
+					).'</p>'.
81 81
 
82
-					'<p>' . sprintf(
83
-						__( 'Each theme is different so in order for %1$s to work, the theme selectors must be set according to the theme you currently have active for each section.', 'auto-load-next-post' ),
84
-						esc_html__( 'Auto Load Next Post', 'auto-load-next-post' )
85
-					) . '</p>' .
82
+					'<p>'.sprintf(
83
+						__('Each theme is different so in order for %1$s to work, the theme selectors must be set according to the theme you currently have active for each section.', 'auto-load-next-post'),
84
+						esc_html__('Auto Load Next Post', 'auto-load-next-post')
85
+					).'</p>'.
86 86
 
87
-					'<p>' . sprintf(
88
-						__( 'When %1$s is activated, default theme selectors are set for you. These theme selectors are the most commonly used in any WordPress theme. If they don’t work for your theme then you need to find the matching theme selectors.', 'auto-load-next-post' ),
89
-						esc_html__( 'Auto Load Next Post', 'auto-load-next-post' )
90
-					) . '</p>' .
87
+					'<p>'.sprintf(
88
+						__('When %1$s is activated, default theme selectors are set for you. These theme selectors are the most commonly used in any WordPress theme. If they don’t work for your theme then you need to find the matching theme selectors.', 'auto-load-next-post'),
89
+						esc_html__('Auto Load Next Post', 'auto-load-next-post')
90
+					).'</p>'.
91 91
 
92
-					'<p>' . sprintf(
93
-						__( 'If the theme you have active supports %s then it will set the theme selectors for you and display a notice on the theme selectors page.', 'auto-load-next-post' ),
94
-						esc_html__( 'Auto Load Next Post', 'auto-load-next-post' )
95
-					) . '</p>' .
92
+					'<p>'.sprintf(
93
+						__('If the theme you have active supports %s then it will set the theme selectors for you and display a notice on the theme selectors page.', 'auto-load-next-post'),
94
+						esc_html__('Auto Load Next Post', 'auto-load-next-post')
95
+					).'</p>'.
96 96
 
97
-					'<h3 class="alnp-default-theme-selectors">' . esc_html__( 'Default Theme Selectors', 'auto-load-next-post' ) . '</h3>' .
97
+					'<h3 class="alnp-default-theme-selectors">'.esc_html__('Default Theme Selectors', 'auto-load-next-post').'</h3>'.
98 98
 
99
-					'<ul class="alnp-default-theme-selectors">' .
100
-						'<li><strong>' . esc_html__( 'Content Container', 'auto-load-next-post' ) . '</strong>' . ' <code>main.site-main</code></li>' .
101
-						'<li><strong>' . esc_html__( 'Post Title', 'auto-load-next-post' ) . '</strong>' . ' <code>h1.entry-title</code></li>' .
102
-						'<li><strong>' . esc_html__( 'Post Navigation', 'auto-load-next-post' ) . '</strong>' . ' <code>nav.post-navigation</code></li>' .
103
-						'<li><strong>' . esc_html__( 'Comments Container', 'auto-load-next-post' ) . '</strong>' . ' <code>div#comments</code></li>' .
104
-					'</ul>' .
99
+					'<ul class="alnp-default-theme-selectors">'.
100
+						'<li><strong>'.esc_html__('Content Container', 'auto-load-next-post').'</strong>'.' <code>main.site-main</code></li>'.
101
+						'<li><strong>'.esc_html__('Post Title', 'auto-load-next-post').'</strong>'.' <code>h1.entry-title</code></li>'.
102
+						'<li><strong>'.esc_html__('Post Navigation', 'auto-load-next-post').'</strong>'.' <code>nav.post-navigation</code></li>'.
103
+						'<li><strong>'.esc_html__('Comments Container', 'auto-load-next-post').'</strong>'.' <code>div#comments</code></li>'.
104
+					'</ul>'.
105 105
 
106
-					'<p><a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors" class="button button-primary" target="_blank">' . esc_html__( 'How to find your theme selectors', 'auto-load-next-post' ) . '</a></p>'
107
-			) );
106
+					'<p><a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/theme-selectors.md#how-to-find-your-theme-selectors" class="button button-primary" target="_blank">'.esc_html__('How to find your theme selectors', 'auto-load-next-post').'</a></p>'
107
+			));
108 108
 
109
-			$screen->add_help_tab( array(
109
+			$screen->add_help_tab(array(
110 110
 				'id'      => 'auto_load_next_post_templates_tab',
111
-				'title'   => __( 'Templates', 'auto-load-next-post' ),
111
+				'title'   => __('Templates', 'auto-load-next-post'),
112 112
 				'content' =>
113
-					'<h2>' . __( 'Templates', 'auto-load-next-post' ) . '</h2>' .
113
+					'<h2>'.__('Templates', 'auto-load-next-post').'</h2>'.
114 114
 
115
-					'<p>' . sprintf(
116
-						__( 'Every WordPress theme manages there %1$sTemplate Hierarchy%2$s in there own way. This makes it a little difficult for %3$s to auto detect the appropriate template location. If the appropriate template was not detected then %3$s will automatically use a fallback template in order to display your sites content while your viewers scroll.', 'auto-load-next-post' ), '<a href="https://developer.wordpress.org/themes/basics/template-hierarchy/" target="_blank">', '</a>',
117
-						esc_html__( 'Auto Load Next Post', 'auto-load-next-post' )
118
-					) . '</p>' .
115
+					'<p>'.sprintf(
116
+						__('Every WordPress theme manages there %1$sTemplate Hierarchy%2$s in there own way. This makes it a little difficult for %3$s to auto detect the appropriate template location. If the appropriate template was not detected then %3$s will automatically use a fallback template in order to display your sites content while your viewers scroll.', 'auto-load-next-post'), '<a href="https://developer.wordpress.org/themes/basics/template-hierarchy/" target="_blank">', '</a>',
117
+						esc_html__('Auto Load Next Post', 'auto-load-next-post')
118
+					).'</p>'.
119 119
 
120
-					'<p>' . sprintf( __( 'By providing an accurate location to your theme\'s template, %1$s will then use your theme\'s template instead and will display your content matching the theme\'s design.' , 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' )
121
-					) . '</p>' .
120
+					'<p>'.sprintf(__('By providing an accurate location to your theme\'s template, %1$s will then use your theme\'s template instead and will display your content matching the theme\'s design.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')
121
+					).'</p>'.
122 122
 
123
-					'<p><a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/content-and-structure.md" class="button button-primary" target="_blank">' . esc_html__( 'Content and Structure', 'auto-load-next-post' ) . '</a></p>'
124
-			) );
123
+					'<p><a href="https://github.com/autoloadnextpost/alnp-documentation/blob/master/en_US/content-and-structure.md" class="button button-primary" target="_blank">'.esc_html__('Content and Structure', 'auto-load-next-post').'</a></p>'
124
+			));
125 125
 
126
-			$screen->add_help_tab( array(
126
+			$screen->add_help_tab(array(
127 127
 				'id'      => 'auto_load_next_post_bugs_tab',
128
-				'title'   => esc_html__( 'Found a bug?', 'auto-load-next-post' ),
128
+				'title'   => esc_html__('Found a bug?', 'auto-load-next-post'),
129 129
 				'content' =>
130
-					'<h2>' . esc_html__( 'Found a bug?', 'auto-load-next-post' ) . '</h2>' .
130
+					'<h2>'.esc_html__('Found a bug?', 'auto-load-next-post').'</h2>'.
131 131
 
132
-					'<p>' . sprintf( __( 'If you find a bug within %1$s core you can create a ticket via %2$sGithub issues%4$s. Ensure you read the %3$scontribution guide%4$s prior to submitting your report. To help me solve your issue, please be as descriptive as possible.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" target="_blank">', '<a href="https://github.com/autoloadnextpost/auto-load-next-post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>' ) . '</p>' .
132
+					'<p>'.sprintf(__('If you find a bug within %1$s core you can create a ticket via %2$sGithub issues%4$s. Ensure you read the %3$scontribution guide%4$s prior to submitting your report. To help me solve your issue, please be as descriptive as possible.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" target="_blank">', '<a href="https://github.com/autoloadnextpost/auto-load-next-post/blob/master/CONTRIBUTING.md" target="_blank">', '</a>').'</p>'.
133 133
 
134
-					'<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" class="button button-primary" target="_blank">' . esc_html__( 'Report a bug', 'auto-load-next-post' ) . '</a></p>'
135
-			) );
134
+					'<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/issues?state=open" class="button button-primary" target="_blank">'.esc_html__('Report a bug', 'auto-load-next-post').'</a></p>'
135
+			));
136 136
 
137
-			$screen->add_help_tab( array(
137
+			$screen->add_help_tab(array(
138 138
 				'id'      => 'auto_load_next_post_feedback_tab',
139
-				'title'   => esc_html__( 'Contribute', 'auto-load-next-post' ),
139
+				'title'   => esc_html__('Contribute', 'auto-load-next-post'),
140 140
 				'content' =>
141
-					'<h2>' . esc_html__( 'Contribute', 'auto-load-next-post' ) . '</h2>' .
141
+					'<h2>'.esc_html__('Contribute', 'auto-load-next-post').'</h2>'.
142 142
 
143
-					'<p>' . sprintf( __( 'If you or your company use %1$s, please consider supporting me directly so I can continue maintaining it and keep evolving the project.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
143
+					'<p>'.sprintf(__('If you or your company use %1$s, please consider supporting me directly so I can continue maintaining it and keep evolving the project.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
144 144
 
145
-					'<p>' . esc_html__( 'You\'ll be helping to ensure I can spend the time not just fixing bugs, adding features or releasing new versions but also keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.', 'auto-load-next-post' ) . '</p>' .
145
+					'<p>'.esc_html__('You\'ll be helping to ensure I can spend the time not just fixing bugs, adding features or releasing new versions but also keeping the project afloat. Any contribution you make is a big help and is greatly appreciated.', 'auto-load-next-post').'</p>'.
146 146
 
147
-					'<p>' . sprintf( __( 'Your review of the plugin is also important as it will help others decide to use %s so please consider leaving a review on WordPress.org', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
147
+					'<p>'.sprintf(__('Your review of the plugin is also important as it will help others decide to use %s so please consider leaving a review on WordPress.org', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
148 148
 
149
-					'<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_REVIEW_URL ) . '" class="button button-primary" target="_blank" aria-label="' . esc_attr( __( 'Review Auto Load Next Post on WordPress.org', 'auto-load-next-post' ) ) . '">' . esc_html__( 'Leave a Review', 'auto-load-next-post' ) . '</a> <a href="https://sebdumont.xyz/donate/" class="button button-secondary" target="_blank">' . esc_html__( 'Support the Developer', 'auto-load-next-post' ) . '</a></p>'
150
-			) );
149
+					'<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_REVIEW_URL).'" class="button button-primary" target="_blank" aria-label="'.esc_attr(__('Review Auto Load Next Post on WordPress.org', 'auto-load-next-post')).'">'.esc_html__('Leave a Review', 'auto-load-next-post').'</a> <a href="https://sebdumont.xyz/donate/" class="button button-secondary" target="_blank">'.esc_html__('Support the Developer', 'auto-load-next-post').'</a></p>'
150
+			));
151 151
 
152
-			$screen->add_help_tab( array(
152
+			$screen->add_help_tab(array(
153 153
 				'id'      => 'auto_load_next_post_wizard_tab',
154
-				'title'   => esc_html__( 'Setup Wizard', 'auto-load-next-post' ),
154
+				'title'   => esc_html__('Setup Wizard', 'auto-load-next-post'),
155 155
 				'content' =>
156
-					'<h2>' . esc_html__( 'Setup Wizard', 'auto-load-next-post' ) . '</h2>' .
156
+					'<h2>'.esc_html__('Setup Wizard', 'auto-load-next-post').'</h2>'.
157 157
 
158
-					'<p>' . sprintf( esc_html__( 'If you need to access the setup wizard again, please click on the button below. %1$sNote:%2$s Setup wizard is designed for themes that have not declared support for %3$s.', 'auto-load-next-post' ), '<strong class="red">', '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</p>' .
158
+					'<p>'.sprintf(esc_html__('If you need to access the setup wizard again, please click on the button below. %1$sNote:%2$s Setup wizard is designed for themes that have not declared support for %3$s.', 'auto-load-next-post'), '<strong class="red">', '</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</p>'.
159 159
 
160
-					'<p><a href="' . add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'setup-wizard', 'force-setup' => 'yes' ), admin_url( 'options-general.php' ) ) . '" class="button button-primary" aria-label="' . sprintf( esc_attr__( 'View %s setup wizard', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '">' . esc_html__( 'Setup Wizard', 'auto-load-next-post' ) . '</a></p>'
161
-			) );
160
+					'<p><a href="'.add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'setup-wizard', 'force-setup' => 'yes'), admin_url('options-general.php')).'" class="button button-primary" aria-label="'.sprintf(esc_attr__('View %s setup wizard', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'">'.esc_html__('Setup Wizard', 'auto-load-next-post').'</a></p>'
161
+			));
162 162
 
163 163
 			$screen->set_help_sidebar(
164
-				'<p><strong>' . esc_html__( 'For more information:', 'auto-load-next-post' ) . '</strong></p>' .
164
+				'<p><strong>'.esc_html__('For more information:', 'auto-load-next-post').'</strong></p>'.
165 165
 
166
-				'<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_STORE_URL ) . 'about/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">' . sprintf( esc_html__( 'About %s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ) . '</a></p>' .
166
+				'<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_STORE_URL).'about/?utm_source=wpadmin&utm_campaign=plugin-settings-help-tab" target="_blank">'.sprintf(esc_html__('About %s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')).'</a></p>'.
167 167
 
168
-				'<p><a href="' . esc_url( AUTO_LOAD_NEXT_POST_PLUGIN_URL ) . '" target="_blank">' . esc_html__( 'WordPress.org Project', 'auto-load-next-post' ) . '</a></p>' .
168
+				'<p><a href="'.esc_url(AUTO_LOAD_NEXT_POST_PLUGIN_URL).'" target="_blank">'.esc_html__('WordPress.org Project', 'auto-load-next-post').'</a></p>'.
169 169
 
170
-				'<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/" target="_blank">' . esc_html__( 'GitHub Project', 'auto-load-next-post' ) . '</a></p>'
170
+				'<p><a href="https://github.com/autoloadnextpost/auto-load-next-post/" target="_blank">'.esc_html__('GitHub Project', 'auto-load-next-post').'</a></p>'
171 171
 			);
172 172
 
173 173
 		} // END add_help_tabs()
Please login to merge, or discard this patch.