Completed
Branch master (adfd66)
by
unknown
01:53
created
includes/admin/views/html-notice-welcome.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -11,31 +11,31 @@  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 18
 <div class="notice notice-success auto-load-next-post-notice">
19 19
 	<div class="auto-load-next-post-notice-inner">
20 20
 		<div class="auto-load-next-post-notice-icon">
21
-			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
21
+			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
22 22
 		</div>
23 23
 
24 24
 		<div class="auto-load-next-post-notice-content">
25
-			<h3><?php echo esc_html__( 'Welcome!', 'auto-load-next-post' ); ?></h3>
25
+			<h3><?php echo esc_html__('Welcome!', 'auto-load-next-post'); ?></h3>
26 26
 			<p>
27
-				<?php echo sprintf( __( 'Thank you for activating %1$s! If you\'re a first time user, welcome! You\'re well on your way to increasing your pageviews.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?>
27
+				<?php echo sprintf(__('Thank you for activating %1$s! If you\'re a first time user, welcome! You\'re well on your way to increasing your pageviews.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?>
28 28
 				<?php
29 29
 				// If the theme has not added support then encourage the user to see the documentation.
30
-				if ( ! is_alnp_supported() ) {
30
+				if ( ! is_alnp_supported()) {
31 31
 					$query = array(
32 32
 						'autofocus[panel]'   => 'alnp',
33 33
 						'autofocus[section]' => 'auto_load_next_post_theme_selectors',
34 34
 						'url'                => alnp_get_random_page_permalink(),
35
-						'return'             => admin_url( 'options-general.php?page=auto-load-next-post-settings' ),
35
+						'return'             => admin_url('options-general.php?page=auto-load-next-post-settings'),
36 36
 					);
37
-					$customizer_link = add_query_arg( $query, admin_url( 'customize.php' ) );
38
-					echo sprintf( __( 'I encourage you to check out the plugin documentation and getting started with %1$ssetting up your theme selectors%2$s.', 'auto-load-next-post' ), '<a href="' . esc_url( $customizer_link ) . '">', '</a>' );
37
+					$customizer_link = add_query_arg($query, admin_url('customize.php'));
38
+					echo sprintf(__('I encourage you to check out the plugin documentation and getting started with %1$ssetting up your theme selectors%2$s.', 'auto-load-next-post'), '<a href="'.esc_url($customizer_link).'">', '</a>');
39 39
 				}
40 40
 				?>
41 41
 			</p>
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 		<div class="auto-load-next-post-documentation">
45 45
 			<?php
46 46
 			// If the theme has not added support then display button to documentation.
47
-			if ( ! is_alnp_supported() ) {
48
-				printf( '<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice' ), esc_html__( 'Documentation', 'auto-load-next-post' ) );
47
+			if ( ! is_alnp_supported()) {
48
+				printf('<a href="%1$s" class="button button-primary auto-load-next-post-documentation-button" target="_blank">%2$s</a>', esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'documentation/?utm_source=plugin&utm_medium=link&utm_campaign=welcome-notice'), esc_html__('Documentation', 'auto-load-next-post'));
49 49
 			}
50 50
 			?>
51
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_welcome_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Dismiss Notice', 'auto-load-next-post' ); ?></a>
51
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_welcome_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Dismiss Notice', 'auto-load-next-post'); ?></a>
52 52
 		</div>
53 53
 	</div>
54 54
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-trying-beta.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,24 +11,24 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 ?>
18 18
 <div class="notice notice-info auto-load-next-post-notice">
19 19
 	<div class="auto-load-next-post-notice-inner">
20 20
 		<div class="auto-load-next-post-notice-icon">
21
-			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
21
+			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
22 22
 		</div>
23 23
 
24 24
 		<div class="auto-load-next-post-notice-content">
25
-			<h3><?php echo esc_html__( 'Thanks for trying out this beta!', 'auto-load-next-post' ); ?></h3>
26
-			<p><?php echo esc_html__( 'If you have any questions about the beta or if you have any feedback at all including features to be added or integrations to support, please let me know. Any little bit you\'re willing to share helps.', 'auto-load-next-post' ); ?></p>
25
+			<h3><?php echo esc_html__('Thanks for trying out this beta!', 'auto-load-next-post'); ?></h3>
26
+			<p><?php echo esc_html__('If you have any questions about the beta or if you have any feedback at all including features to be added or integrations to support, please let me know. Any little bit you\'re willing to share helps.', 'auto-load-next-post'); ?></p>
27 27
 		</div>
28 28
 
29 29
 		<div class="auto-load-next-post-send-feedback">
30
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url( AUTO_LOAD_NEXT_POST_STORE_URL . 'contact/' ), esc_html__( 'Give Feedback', 'auto-load-next-post' ) ); ?>
31
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_beta_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Ask me again in 7 days', 'auto-load-next-post' ); ?></a>
30
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url(AUTO_LOAD_NEXT_POST_STORE_URL.'contact/'), esc_html__('Give Feedback', 'auto-load-next-post')); ?>
31
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_beta_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Ask me again in 7 days', 'auto-load-next-post'); ?></a>
32 32
 		</div>
33 33
 	</div>
34 34
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-upgrade-warning.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,24 +11,24 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 ?>
18 18
 <div class="notice notice-warning auto-load-next-post-notice">
19 19
 	<div class="auto-load-next-post-notice-inner">
20 20
 		<div class="auto-load-next-post-notice-icon">
21
-			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
21
+			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
22 22
 		</div>
23 23
 
24 24
 		<div class="auto-load-next-post-notice-content">
25
-			<h3><?php esc_html_e( 'Update Coming!', 'auto-load-next-post' ); ?></h3>
26
-			<p><?php printf( __( 'Version %1$s1.6.0%2$s of %3$s is coming with new features and improvements. Before it is released I require your help to test with the themes you like to use and provide feedback. I do recommend you do so on a staging site. You will be helping me move the project forward. Thank you!', 'auto-load-next-post' ), '<strong>', '</strong>', esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
25
+			<h3><?php esc_html_e('Update Coming!', 'auto-load-next-post'); ?></h3>
26
+			<p><?php printf(__('Version %1$s1.6.0%2$s of %3$s is coming with new features and improvements. Before it is released I require your help to test with the themes you like to use and provide feedback. I do recommend you do so on a staging site. You will be helping me move the project forward. Thank you!', 'auto-load-next-post'), '<strong>', '</strong>', esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
27 27
 		</div>
28 28
 
29 29
 		<div class="auto-load-next-post-send-feedback">
30
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url( 'https://autoloadnextpost.com/2019/09/auto-load-next-post-v1-6-0-beta-1/' ), esc_html__( 'Learn More', 'auto-load-next-post' ) ); ?>
31
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_upgrade_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'Not interested / Already doing so?', 'auto-load-next-post' ); ?></a>
30
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-feedback-button" target="_blank">%2$s</a>', esc_url('https://autoloadnextpost.com/2019/09/auto-load-next-post-v1-6-0-beta-1/'), esc_html__('Learn More', 'auto-load-next-post')); ?>
31
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_upgrade_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('Not interested / Already doing so?', 'auto-load-next-post'); ?></a>
32 32
 		</div>
33 33
 	</div>
34 34
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-please-review.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18 18
 $current_user = wp_get_current_user();
19 19
 
20
-$time = auto_load_next_post_seconds_to_words( time() - $install_date );
20
+$time = auto_load_next_post_seconds_to_words(time() - $install_date);
21 21
 ?>
22 22
 <div class="notice notice-info auto-load-next-post-notice">
23 23
 	<div class="auto-load-next-post-notice-inner">
24 24
 		<div class="auto-load-next-post-notice-icon">
25
-			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
25
+			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
26 26
 		</div>
27 27
 
28 28
 		<div class="auto-load-next-post-notice-content">
29
-			<h3><?php echo esc_html__( 'Are you enjoying Auto Load Next Post?', 'auto-load-next-post' ); ?></h3>
30
-			<p><?php printf( esc_html__( 'You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), esc_html( $time ) ); ?></p>
29
+			<h3><?php echo esc_html__('Are you enjoying Auto Load Next Post?', 'auto-load-next-post'); ?></h3>
30
+			<p><?php printf(esc_html__('You have been using %1$s for %2$s now! Mind leaving a quick review and let me know know what you think of the plugin? I\'d really appreciate it!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), esc_html($time)); ?></p>
31 31
 		</div>
32 32
 
33 33
 		<div class="auto-load-next-post-review-now">
34
-			<?php printf( '<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url( AUTO_LOAD_NEXT_POST_REVIEW_URL . '?rate=5#new-post' ), esc_html__( 'Leave a Review', 'auto-load-next-post' ) ); ?>
35
-			<a href="<?php echo esc_url( add_query_arg( 'hide_auto_load_next_post_review_notice', 'true' ) ); ?>" class="no-thanks"><?php echo esc_html__( 'No thank you / I already have', 'auto-load-next-post' ); ?></a>
34
+			<?php printf('<a href="%1$s" class="button button-primary auto-load-next-post-review-button" target="_blank">%2$s</a>', esc_url(AUTO_LOAD_NEXT_POST_REVIEW_URL.'?rate=5#new-post'), esc_html__('Leave a Review', 'auto-load-next-post')); ?>
35
+			<a href="<?php echo esc_url(add_query_arg('hide_auto_load_next_post_review_notice', 'true')); ?>" class="no-thanks"><?php echo esc_html__('No thank you / I already have', 'auto-load-next-post'); ?></a>
36 36
 		</div>
37 37
 	</div>
38 38
 </div>
Please login to merge, or discard this patch.
includes/admin/views/html-admin-sidebar.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  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
 ?>
@@ -20,25 +20,25 @@  discard block
 block discarded – undo
20 20
 	<a class="alnp-banner" href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>?utm_source=plugin&utm_medium=alnp-banner&utm_campaign=alnp-settings-page"></a>
21 21
 
22 22
 	<div class="alnp-upgrade-details">
23
-		<h1><?php esc_html_e( 'Pro Coming Soon', 'auto-load-next-post' ); ?></h1>
23
+		<h1><?php esc_html_e('Pro Coming Soon', 'auto-load-next-post'); ?></h1>
24 24
 
25 25
 		<ul>
26
-			<li><?php echo wptexturize( esc_html__( 'Load the Next Post or Next Post with same Category or New Posts or Related Posts or by Custom Query', 'auto-load-next-post' ) ); ?></li>
27
-			<li><?php echo wptexturize( esc_html__( 'Page and Media Attachment Support', 'auto-load-next-post' ) ); ?></li>
28
-			<li><?php echo wptexturize( esc_html__( 'Custom Post Type Support', 'auto-load-next-post' ) ); ?></li>
29
-			<li><?php echo wptexturize( esc_html__( 'Paginated Posts Supported', 'auto-load-next-post' ) ); ?></li>
30
-			<li><?php echo wptexturize( esc_html__( 'Exclude Post Formats', 'auto-load-next-post' ) ); ?></li>
31
-			<li><?php echo wptexturize( esc_html__( 'Limit Posts per Session', 'auto-load-next-post' ) ); ?></li>
32
-			<li><?php echo wptexturize( esc_html__( 'Query Posts by Category and Tag', 'auto-load-next-post' ) ); ?></li>
33
-			<li><?php echo wptexturize( esc_html__( 'Exclude User Roles and Specific Users', 'auto-load-next-post' ) ); ?></li>
34
-			<li><?php echo wptexturize( esc_html__( 'Pre-Query Posts Ready to Load', 'auto-load-next-post' ) ); ?></li>
35
-			<li><?php echo wptexturize( esc_html__( 'Hide Comments and Show by Toggle Button', 'auto-load-next-post' ) ); ?></li>
36
-			<li><?php echo wptexturize( sprintf( esc_html__( 'Multilingual Support for %1$s and %2$s', 'auto-load-next-post' ), 'WPML', 'Polylang' ) ); ?></li>
37
-			<li><?php echo wptexturize( esc_html__( 'Email Support', 'auto-load-next-post' ) ); ?></li>
26
+			<li><?php echo wptexturize(esc_html__('Load the Next Post or Next Post with same Category or New Posts or Related Posts or by Custom Query', 'auto-load-next-post')); ?></li>
27
+			<li><?php echo wptexturize(esc_html__('Page and Media Attachment Support', 'auto-load-next-post')); ?></li>
28
+			<li><?php echo wptexturize(esc_html__('Custom Post Type Support', 'auto-load-next-post')); ?></li>
29
+			<li><?php echo wptexturize(esc_html__('Paginated Posts Supported', 'auto-load-next-post')); ?></li>
30
+			<li><?php echo wptexturize(esc_html__('Exclude Post Formats', 'auto-load-next-post')); ?></li>
31
+			<li><?php echo wptexturize(esc_html__('Limit Posts per Session', 'auto-load-next-post')); ?></li>
32
+			<li><?php echo wptexturize(esc_html__('Query Posts by Category and Tag', 'auto-load-next-post')); ?></li>
33
+			<li><?php echo wptexturize(esc_html__('Exclude User Roles and Specific Users', 'auto-load-next-post')); ?></li>
34
+			<li><?php echo wptexturize(esc_html__('Pre-Query Posts Ready to Load', 'auto-load-next-post')); ?></li>
35
+			<li><?php echo wptexturize(esc_html__('Hide Comments and Show by Toggle Button', 'auto-load-next-post')); ?></li>
36
+			<li><?php echo wptexturize(sprintf(esc_html__('Multilingual Support for %1$s and %2$s', 'auto-load-next-post'), 'WPML', 'Polylang')); ?></li>
37
+			<li><?php echo wptexturize(esc_html__('Email Support', 'auto-load-next-post')); ?></li>
38 38
 		</ul>
39 39
 
40 40
 		<p>
41
-			<a href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>pro/?utm_source=plugin&utm_medium=link&utm_campaign=alnp-settings-page"><?php esc_html_e( 'Visit autoloadnextpost.com &rarr;', 'auto-load-next-post' ); ?></a>
41
+			<a href="<?php echo AUTO_LOAD_NEXT_POST_STORE_URL; ?>pro/?utm_source=plugin&utm_medium=link&utm_campaign=alnp-settings-page"><?php esc_html_e('Visit autoloadnextpost.com &rarr;', 'auto-load-next-post'); ?></a>
42 42
 		</p>
43 43
 
44 44
 	</div>
@@ -46,33 +46,33 @@  discard block
 block discarded – undo
46 46
 	<div class="block">
47 47
 		<div class="inner-block">
48 48
 			<form method="post" action="https://sebastiendumont.us1.list-manage.com/subscribe/post?u=48ead612ad85b23fe2239c6e3&amp;id=79e97b5275" name="mc-embedded-subscribe-form" target="_blank" class="subscribe block">
49
-				<h2><?php esc_html_e( 'Sign up to pre-order first', 'auto-load-next-post' ); ?></h2>
49
+				<h2><?php esc_html_e('Sign up to pre-order first', 'auto-load-next-post'); ?></h2>
50 50
 
51 51
 				<p class="intro">
52
-					<?php echo wptexturize( esc_html__( 'Submit your name and email and be the first to know when you can pre-order Auto Load Next Post Pro and keep up to date with my developments plus a 20% discount.', 'auto-load-next-post' ) ); ?>
52
+					<?php echo wptexturize(esc_html__('Submit your name and email and be the first to know when you can pre-order Auto Load Next Post Pro and keep up to date with my developments plus a 20% discount.', 'auto-load-next-post')); ?>
53 53
 				</p>
54 54
 
55 55
 				<div class="field">
56
-					<input type="email" name="EMAIL" value="" placeholder="<?php esc_html_e( 'Your Email Address', 'auto-load-next-post' ); ?>"/>
56
+					<input type="email" name="EMAIL" value="" placeholder="<?php esc_html_e('Your Email Address', 'auto-load-next-post'); ?>"/>
57 57
 				</div>
58 58
 
59 59
 				<div class="field">
60
-					<input type="text" name="FNAME" value="" placeholder="<?php esc_html_e( 'First Name', 'auto-load-next-post' ); ?>"/>
60
+					<input type="text" name="FNAME" value="" placeholder="<?php esc_html_e('First Name', 'auto-load-next-post'); ?>"/>
61 61
 				</div>
62 62
 
63 63
 				<div class="field">
64
-					<input type="text" name="LNAME" value="" placeholder="<?php esc_html_e( 'Last Name', 'auto-load-next-post' ); ?>"/>
64
+					<input type="text" name="LNAME" value="" placeholder="<?php esc_html_e('Last Name', 'auto-load-next-post'); ?>"/>
65 65
 				</div>
66 66
 
67 67
 				<input type="hidden" name="group[35169][1]" value="1">
68 68
 
69 69
 				<div class="field submit-button">
70 70
 					<div style="position: absolute; left: -9999px;" aria-hidden="true"><input type="text" name="b_48ead612ad85b23fe2239c6e3_79e97b5275" tabindex="-1" value=""></div>
71
-					<input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="<?php esc_html_e( 'Sign me up', 'auto-load-next-post' ); ?>"/>
71
+					<input type="submit" name="subscribe" id="mc-embedded-subscribe" class="button" value="<?php esc_html_e('Sign me up', 'auto-load-next-post'); ?>"/>
72 72
 				</div>
73 73
 
74 74
 				<p class="promise">
75
-					<?php esc_html_e( 'I promise I will not use your email for anything else and you can unsubscribe with 1-click anytime.', 'auto-load-next-post' ); ?>
75
+					<?php esc_html_e('I promise I will not use your email for anything else and you can unsubscribe with 1-click anytime.', 'auto-load-next-post'); ?>
76 76
 				</p>
77 77
 
78 78
 			</form>
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	</div>
81 81
 
82 82
 	<div class="block credits">
83
-		<h3><?php esc_html_e( 'Created &amp; maintained by', 'auto-load-next-post' ); ?></h3>
83
+		<h3><?php esc_html_e('Created &amp; maintained by', 'auto-load-next-post'); ?></h3>
84 84
 		<div class="inner-block">
85 85
 			<ul>
86 86
 				<li>
Please login to merge, or discard this patch.
includes/admin/views/html-notice-theme-ready.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  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
 
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 <div class="notice notice-success auto-load-next-post-notice is-dismissible">
21 21
 	<div class="auto-load-next-post-notice-inner">
22 22
 		<div class="auto-load-next-post-notice-icon">
23
-			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH . '/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__( 'Auto Load Next Post WordPress Plugin', 'auto-load-next-post' ); ?>" />
23
+			<img src="<?php echo AUTO_LOAD_NEXT_POST_URL_PATH.'/assets/images/icon-256x256.png'; ?>" alt="<?php echo esc_attr__('Auto Load Next Post WordPress Plugin', 'auto-load-next-post'); ?>" />
24 24
 		</div>
25 25
 
26 26
 		<div class="auto-load-next-post-notice-content">
27
-			<h3><?php echo sprintf( esc_html__( 'Thank you for installing %1$s!', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></h3>
28
-			<p><?php echo sprintf( __( 'We detected your theme <strong>%1$s</strong> already supports %2$s. Everything is already setup for you and is ready to increase your pageviews.', 'auto-load-next-post' ), $active_theme->name, esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ); ?></p>
27
+			<h3><?php echo sprintf(esc_html__('Thank you for installing %1$s!', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></h3>
28
+			<p><?php echo sprintf(__('We detected your theme <strong>%1$s</strong> already supports %2$s. Everything is already setup for you and is ready to increase your pageviews.', 'auto-load-next-post'), $active_theme->name, esc_html__('Auto Load Next Post', 'auto-load-next-post')); ?></p>
29 29
 		</div>
30 30
 	</div>
31 31
 </div>
Please login to merge, or discard this patch.
includes/admin/class-alnp-admin-notices.php 1 patch
Spacing   +49 added lines, -49 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( 'Auto_Load_Next_Post_Admin_Notices' ) ) {
18
+if ( ! class_exists('Auto_Load_Next_Post_Admin_Notices')) {
19 19
 
20 20
 	class Auto_Load_Next_Post_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,31 +88,31 @@  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 upgrade notice then hide it for that user.
97
-			if ( ! empty( $_GET['hide_auto_load_next_post_upgrade_notice'] ) && current_user_can( 'install_plugins' ) ) {
98
-				add_user_meta( $current_user->ID, 'auto_load_next_post_hide_upgrade_notice', '1', true );
97
+			if ( ! empty($_GET['hide_auto_load_next_post_upgrade_notice']) && current_user_can('install_plugins')) {
98
+				add_user_meta($current_user->ID, 'auto_load_next_post_hide_upgrade_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 welcome notice then hide it for that user.
103
-			if ( ! empty( $_GET['hide_auto_load_next_post_welcome_notice'] ) && current_user_can( 'install_plugins' ) ) {
104
-				add_user_meta( $current_user->ID, 'auto_load_next_post_hide_welcome_notice', '1', true );
103
+			if ( ! empty($_GET['hide_auto_load_next_post_welcome_notice']) && current_user_can('install_plugins')) {
104
+				add_user_meta($current_user->ID, 'auto_load_next_post_hide_welcome_notice', '1', true);
105 105
 				$user_hidden_notice = true;
106 106
 			}
107 107
 
108
-			if ( ! empty( $_GET['hide_auto_load_next_post_beta_notice'] ) && current_user_can( 'install_plugins' ) ) {
109
-				set_transient( 'alnp_beta_notice_hidden', 'hidden', WEEK_IN_SECONDS );
108
+			if ( ! empty($_GET['hide_auto_load_next_post_beta_notice']) && current_user_can('install_plugins')) {
109
+				set_transient('alnp_beta_notice_hidden', 'hidden', WEEK_IN_SECONDS);
110 110
 				$user_hidden_notice = true;
111 111
 			}
112 112
 
113
-			if ( $user_hidden_notice ) {
113
+			if ($user_hidden_notice) {
114 114
 				// Redirect to the plugins page.
115
-				wp_safe_redirect( admin_url( 'plugins.php' ) );
115
+				wp_safe_redirect(admin_url('plugins.php'));
116 116
 				exit;
117 117
 			}
118 118
 		} // END dont_bug_me()
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 			global $current_user;
132 132
 
133 133
 			// If the current user can not install plugins then return nothing!
134
-			if ( ! current_user_can( 'install_plugins' ) ) {
134
+			if ( ! current_user_can('install_plugins')) {
135 135
 				return false;
136 136
 			}
137 137
 
@@ -139,66 +139,66 @@  discard block
 block discarded – undo
139 139
 			$screen_id = $screen ? $screen->id : '';
140 140
 
141 141
 			// Notices should only show on the main dashboard and on the plugins screen.
142
-			if ( ! in_array( $screen_id, alnp_get_admin_screens() ) ) {
142
+			if ( ! in_array($screen_id, alnp_get_admin_screens())) {
143 143
 				return false;
144 144
 			}
145 145
 
146 146
 			// Is admin welcome notice hidden?
147
-			$hide_welcome_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_welcome_notice', true );
147
+			$hide_welcome_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_welcome_notice', true);
148 148
 
149 149
 			// Check if we need to display the welcome notice.
150
-			if ( empty( $hide_welcome_notice ) ) {
150
+			if (empty($hide_welcome_notice)) {
151 151
 				// If the user has just installed the plugin for the first time then welcome the user.
152
-				if ( ( intval( time() - self::$install_date ) / WEEK_IN_SECONDS ) % 52 <= 2 ) {
153
-					add_action( 'admin_notices', array( $this, 'welcome_notice' ) );
152
+				if ((intval(time() - self::$install_date) / WEEK_IN_SECONDS) % 52 <= 2) {
153
+					add_action('admin_notices', array($this, 'welcome_notice'));
154 154
 				}
155 155
 			}
156 156
 
157 157
 			// Is admin review notice hidden?
158
-			$hide_review_notice = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_review_notice', true );
158
+			$hide_review_notice = get_user_meta($current_user->ID, 'auto_load_next_post_hide_review_notice', true);
159 159
 
160 160
 			// Check if we need to display the review plugin notice.
161
-			if ( empty( $hide_review_notice ) ) {
161
+			if (empty($hide_review_notice)) {
162 162
 				// If it has been a week or more since activating the plugin then display the review notice.
163
-				if ( ( intval( time() - self::$install_date ) ) > WEEK_IN_SECONDS ) {
164
-					add_action( 'admin_notices', array( $this, 'plugin_review_notice' ) );
163
+				if ((intval(time() - self::$install_date)) > WEEK_IN_SECONDS) {
164
+					add_action('admin_notices', array($this, 'plugin_review_notice'));
165 165
 				}
166 166
 			}
167 167
 
168 168
 			// Is this version of Auto Load Next Post a beta release?
169
-			if ( is_alnp_beta() && empty( get_transient( 'alnp_beta_notice_hidden' ) ) ) {
170
-				add_action( 'admin_notices', array( $this, 'beta_notice' ) );
169
+			if (is_alnp_beta() && empty(get_transient('alnp_beta_notice_hidden'))) {
170
+				add_action('admin_notices', array($this, 'beta_notice'));
171 171
 			}
172 172
 
173
-			$template = get_option( 'template' );
173
+			$template = get_option('template');
174 174
 
175 175
 			// Checks if the theme supports Auto Load Next Post and not provided via a plugin.
176
-			if ( is_alnp_supported() ) {
177
-				$plugin_supported = alnp_get_theme_support( 'plugin_support' );
176
+			if (is_alnp_supported()) {
177
+				$plugin_supported = alnp_get_theme_support('plugin_support');
178 178
 
179 179
 				// Return if theme is supported via plugin.
180
-				if ( ! empty( $plugin_supported ) && $plugin_supported == 'yes' ) {
181
-					update_option( 'auto_load_next_post_theme_supported', $template );
180
+				if ( ! empty($plugin_supported) && $plugin_supported == 'yes') {
181
+					update_option('auto_load_next_post_theme_supported', $template);
182 182
 					return false;
183 183
 				}
184 184
 
185 185
 				// If supported theme does not match active theme then show notice.
186
-				if ( get_option( 'auto_load_next_post_theme_supported' ) !== $template ) {
187
-					add_action( 'admin_notices', array( $this, 'theme_ready_notice' ) );
188
-					update_option( 'auto_load_next_post_theme_supported', $template );
186
+				if (get_option('auto_load_next_post_theme_supported') !== $template) {
187
+					add_action('admin_notices', array($this, 'theme_ready_notice'));
188
+					update_option('auto_load_next_post_theme_supported', $template);
189 189
 				}
190 190
 			} else {
191 191
 				// If theme not supported then delete option.
192
-				delete_option( 'auto_load_next_post_theme_supported' );
192
+				delete_option('auto_load_next_post_theme_supported');
193 193
 			}
194 194
 
195 195
 			// Upgrade warning notice that will disappear once the new release is installed.
196 196
 			$upgrade_version = '1.6.0';
197 197
 
198
-			$user_hidden_upgrade = get_user_meta( $current_user->ID, 'auto_load_next_post_hide_upgrade_notice', '1' );
198
+			$user_hidden_upgrade = get_user_meta($current_user->ID, 'auto_load_next_post_hide_upgrade_notice', '1');
199 199
 
200
-			if ( version_compare( AUTO_LOAD_NEXT_POST_VERSION, $upgrade_version, '<' ) && empty( $user_hidden_upgrade ) ) {
201
-				add_action( 'admin_notices', array( $this, 'upgrade_warning' ) );
200
+			if (version_compare(AUTO_LOAD_NEXT_POST_VERSION, $upgrade_version, '<') && empty($user_hidden_upgrade)) {
201
+				add_action('admin_notices', array($this, 'upgrade_warning'));
202 202
 			}
203 203
 		} // END add_notices()
204 204
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		 * @version 1.5.13
212 212
 		 */
213 213
 		public function upgrade_warning() {
214
-			include_once( dirname( __FILE__ ) . '/views/html-notice-upgrade-warning.php' );
214
+			include_once(dirname(__FILE__).'/views/html-notice-upgrade-warning.php');
215 215
 		} // END upgrade_warning()
216 216
 
217 217
 		/**
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 		 * @since  1.4.3
222 222
 		 */
223 223
 		public function requirement_wp_notice() {
224
-			include( dirname( __FILE__ ) . '/views/html-notice-requirement-wp.php' );
224
+			include(dirname(__FILE__).'/views/html-notice-requirement-wp.php');
225 225
 		} // END requirement_wp_notice()
226 226
 
227 227
 		/**
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 		 * @since  1.5.0
232 232
 		 */
233 233
 		public function theme_ready_notice() {
234
-			include( dirname( __FILE__ ) . '/views/html-notice-theme-ready.php' );
234
+			include(dirname(__FILE__).'/views/html-notice-theme-ready.php');
235 235
 		} // END theme_ready_notice()
236 236
 
237 237
 		/**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 		 * @since  1.5.0
242 242
 		 */
243 243
 		public function welcome_notice() {
244
-			include( dirname( __FILE__ ) . '/views/html-notice-welcome.php' );
244
+			include(dirname(__FILE__).'/views/html-notice-welcome.php');
245 245
 		} // END welcome_notice()
246 246
 
247 247
 		/**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 		 * @since  1.5.0
252 252
 		 */
253 253
 		public function beta_notice() {
254
-			include( dirname( __FILE__ ) . '/views/html-notice-trying-beta.php' );
254
+			include(dirname(__FILE__).'/views/html-notice-trying-beta.php');
255 255
 		} // END beta_notice()
256 256
 
257 257
 		/**
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 		public function plugin_review_notice() {
265 265
 			$install_date = self::$install_date;
266 266
 
267
-			include( dirname( __FILE__ ) . '/views/html-notice-please-review.php' );
267
+			include(dirname(__FILE__).'/views/html-notice-please-review.php');
268 268
 		} // END plugin_review_notice()
269 269
 
270 270
 	} // END class.
Please login to merge, or discard this patch.