Completed
Pull Request — master (#182)
by
unknown
16s
created
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-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.
includes/admin/class-alnp-admin-pro-preview.php 1 patch
Spacing   +14 added lines, -14 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_Pro_Preview' ) ) {
19
+if ( ! class_exists('ALNP_Pro_Preview')) {
20 20
 
21 21
 	class ALNP_Pro_Preview {
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( 'alnp_settings_tabs_array', array( $this, 'add_pro_tabs' ), 99 );
30
-			add_filter( 'alnp_settings_tab_url', array( $this, 'hash'), 0, 2 );
29
+			add_filter('alnp_settings_tabs_array', array($this, 'add_pro_tabs'), 99);
30
+			add_filter('alnp_settings_tab_url', array($this, 'hash'), 0, 2);
31 31
 		} // END __construct()
32 32
 
33 33
 		/**
@@ -37,16 +37,16 @@  discard block
 block discarded – undo
37 37
 		 * @param  array $pages
38 38
 		 * @return array $pages
39 39
 		 */
40
-		public function add_pro_tabs( $pages ) {
40
+		public function add_pro_tabs($pages) {
41 41
 			$pro_pages = array(
42
-				'comments'        => __( 'Comments', 'auto-load-next-post' ),
43
-				'load-and-scroll' => __( 'Load & Scroll', 'auto-load-next-post' ),
44
-				'restrictions'    => __( 'Restrictions', 'auto-load-next-post' ),
45
-				'query'           => __( 'Query', 'auto-load-next-post' ),
46
-				'license'         => __( 'License', 'auto-load-next-post' ),
42
+				'comments'        => __('Comments', 'auto-load-next-post'),
43
+				'load-and-scroll' => __('Load & Scroll', 'auto-load-next-post'),
44
+				'restrictions'    => __('Restrictions', 'auto-load-next-post'),
45
+				'query'           => __('Query', 'auto-load-next-post'),
46
+				'license'         => __('License', 'auto-load-next-post'),
47 47
 			);
48 48
 
49
-			$pages = array_merge( $pages, $pro_pages );
49
+			$pages = array_merge($pages, $pro_pages);
50 50
 
51 51
 			return $pages;
52 52
 		} // END add_pro_tabs()
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
 		 * @param  string $slug
60 60
 		 * @return string
61 61
 		 */
62
-		public function hash( $url, $slug ) {
63
-			if ( ! in_array( $slug, array(
62
+		public function hash($url, $slug) {
63
+			if ( ! in_array($slug, array(
64 64
 				'comments', 
65 65
 				'load-and-scroll', 
66 66
 				'restrictions', 
67 67
 				'query', 
68 68
 				'license'
69
-			) ) ) {
69
+			))) {
70 70
 				return $url;
71 71
 			}
72 72
 
Please login to merge, or discard this patch.
includes/admin/class-alnp-extensions.php 1 patch
Spacing   +13 added lines, -13 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_Extensions' ) ) {
19
+if ( ! class_exists('ALNP_Extensions')) {
20 20
 
21 21
 	class ALNP_Extensions {
22 22
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		 */
36 36
 		public function __construct() {
37 37
 			$this->id    = 'extensions';
38
-			$this->label = esc_html__( 'Extensions', 'auto-load-next-post' );
38
+			$this->label = esc_html__('Extensions', 'auto-load-next-post');
39 39
 
40 40
 			// Below are extensions hosted on WordPress.org
41 41
 			self::$extensions = array(
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 				),
45 45
 			);
46 46
 
47
-			include_once( AUTO_LOAD_NEXT_POST_FILE_PATH . '/vendor/connekt-plugin-installer/class-connekt-plugin-installer.php'); // Plugin Installer
47
+			include_once(AUTO_LOAD_NEXT_POST_FILE_PATH.'/vendor/connekt-plugin-installer/class-connekt-plugin-installer.php'); // Plugin Installer
48 48
 
49
-			add_filter( 'alnp_settings_tabs_array', array( $this, 'add_extensions_page' ), 99 );
50
-			add_action( 'auto_load_next_post_settings_end', array( $this, 'output' ), 10, 2 );
49
+			add_filter('alnp_settings_tabs_array', array($this, 'add_extensions_page'), 99);
50
+			add_action('auto_load_next_post_settings_end', array($this, 'output'), 10, 2);
51 51
 		} // END __construct()
52 52
 
53 53
 		/**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		 * @param  array $pages
58 58
 		 * @return array $pages
59 59
 		 */
60
-		public function add_extensions_page( $pages ) {
60
+		public function add_extensions_page($pages) {
61 61
 			$pages[$this->id] = $this->label;
62 62
 
63 63
 			return $pages;
@@ -70,22 +70,22 @@  discard block
 block discarded – undo
70 70
 		 * @param  string $current_view
71 71
 		 * @param  array  $tabs
72 72
 		 */
73
-		public function output( $current_view, $tabs ) {
74
-			if ( $current_view !== 'extensions' ) {
73
+		public function output($current_view, $tabs) {
74
+			if ($current_view !== 'extensions') {
75 75
 				return;
76 76
 			}
77 77
 			?>
78 78
 			<div class="wrap auto-load-next-post">
79 79
 				<?php
80 80
 				// Include settings tabs.
81
-				include_once( dirname( __FILE__ ) . '/views/html-admin-tabs.php' );
81
+				include_once(dirname(__FILE__).'/views/html-admin-tabs.php');
82 82
 				?>
83
-				<h1 class="screen-reader-text"><?php echo esc_html( $this->label ); ?></h1>
83
+				<h1 class="screen-reader-text"><?php echo esc_html($this->label); ?></h1>
84 84
 
85 85
 				<?php
86 86
 				// Load the class if it exists and Airplane Mode is disabled.
87
-				if ( class_exists( 'Connekt_Plugin_Installer' ) && ! alnp_airplane_mode_enabled() ) {
88
-					Connekt_Plugin_Installer::init( self::$extensions );
87
+				if (class_exists('Connekt_Plugin_Installer') && ! alnp_airplane_mode_enabled()) {
88
+					Connekt_Plugin_Installer::init(self::$extensions);
89 89
 				}
90 90
 				?>
91 91
 			</div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-template-location.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,16 +10,16 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
17 17
 $locate_single = alnp_get_template_directory();
18 18
 
19
-if ( empty( $locate_single ) ) {
20
-	$response = sprintf( __( '%1$s has not detected your theme templates. Currently using fallback support. Try the new %2$sSetup Wizard%3$s to help.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<a href="' . add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'setup-wizard' ), admin_url( 'options-general.php' ) ) . '">', '</a>' );
19
+if (empty($locate_single)) {
20
+	$response = sprintf(__('%1$s has not detected your theme templates. Currently using fallback support. Try the new %2$sSetup Wizard%3$s to help.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<a href="'.add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'setup-wizard'), admin_url('options-general.php')).'">', '</a>');
21 21
 } else {
22
-	$response = sprintf( __( 'Template location detected: %1$s%3$s%2$s If this is incorrect, please set the correct location for the template below.', 'auto-load-next-post' ), '<code>', '</code>', $locate_single );
22
+	$response = sprintf(__('Template location detected: %1$s%3$s%2$s If this is incorrect, please set the correct location for the template below.', 'auto-load-next-post'), '<code>', '</code>', $locate_single);
23 23
 }
24 24
 ?>
25 25
 <div class="notice notice-info">
Please login to merge, or discard this patch.