Completed
Pull Request — master (#180)
by
unknown
16s
created
includes/admin/class-alnp-admin-site-health.php 1 patch
Spacing   +29 added lines, -29 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_Site_Health' ) ) {
19
+if ( ! class_exists('ALNP_Admin_Site_Health')) {
20 20
 
21 21
 	class ALNP_Admin_Site_Health {
22 22
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		 * @access public
27 27
 		 */
28 28
 		public function __construct() {
29
-			add_filter( 'debug_information', array( $this, 'add_debug_info' ) );
29
+			add_filter('debug_information', array($this, 'add_debug_info'));
30 30
 		} // END __construct()
31 31
 
32 32
 		/**
@@ -36,75 +36,75 @@  discard block
 block discarded – undo
36 36
 		 * @param  array $debug_info
37 37
 		 * @return array $debug_info
38 38
 		 */
39
-		public function add_debug_info( $debug_info ) {
39
+		public function add_debug_info($debug_info) {
40 40
 			$debug_info['auto-load-next-post'] = array(
41
-				'label'    => esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ),
41
+				'label'    => esc_html__('Auto Load Next Post', 'auto-load-next-post'),
42 42
 				'fields'   => array(
43 43
 					// Theme Selectors
44 44
 					'content_container' => array(
45
-						'label'   => esc_html__( 'Content Container', 'auto-load-next-post' ),
46
-						'value'   => get_option( 'auto_load_next_post_content_container', 'main.site-main' ),
45
+						'label'   => esc_html__('Content Container', 'auto-load-next-post'),
46
+						'value'   => get_option('auto_load_next_post_content_container', 'main.site-main'),
47 47
 						'private' => false,
48 48
 					),
49 49
 					'post_title_selector' => array(
50
-						'label'   => esc_html__( 'Post Title', 'auto-load-next-post' ),
51
-						'value'   => get_option( 'auto_load_next_post_title_selector', 'h1.entry-title' ),
50
+						'label'   => esc_html__('Post Title', 'auto-load-next-post'),
51
+						'value'   => get_option('auto_load_next_post_title_selector', 'h1.entry-title'),
52 52
 						'private' => false,
53 53
 					),
54 54
 					'navigation_container' => array(
55
-						'label'   => esc_html__( 'Post Navigation', 'auto-load-next-post' ),
56
-						'value'   => get_option( 'auto_load_next_post_navigation_container', 'nav.post-navigation' ),
55
+						'label'   => esc_html__('Post Navigation', 'auto-load-next-post'),
56
+						'value'   => get_option('auto_load_next_post_navigation_container', 'nav.post-navigation'),
57 57
 						'private' => false,
58 58
 					),
59 59
 					'comments_container' => array(
60
-						'label'   => esc_html__( 'Comments Container', 'auto-load-next-post' ),
61
-						'value'   => get_option( 'auto_load_next_post_comments_container', 'div#comments' ),
60
+						'label'   => esc_html__('Comments Container', 'auto-load-next-post'),
61
+						'value'   => get_option('auto_load_next_post_comments_container', 'div#comments'),
62 62
 						'private' => false,
63 63
 					),
64 64
 
65 65
 					// Templates
66 66
 					'use_fallback' => array(
67
-						'label'   => esc_html__( 'Use Fallback?', 'auto-load-next-post' ),
68
-						'value'   => get_option( 'auto_load_next_post_use_fallback', 'no' ),
67
+						'label'   => esc_html__('Use Fallback?', 'auto-load-next-post'),
68
+						'value'   => get_option('auto_load_next_post_use_fallback', 'no'),
69 69
 						'private' => false,
70 70
 					),
71 71
 
72 72
 					// Misc
73 73
 					'remove_comments' => array(
74
-						'label'   => esc_html__( 'Remove Comments', 'auto-load-next-post' ),
75
-						'value'   => get_option( 'auto_load_next_post_remove_comments', 'yes' ),
74
+						'label'   => esc_html__('Remove Comments', 'auto-load-next-post'),
75
+						'value'   => get_option('auto_load_next_post_remove_comments', 'yes'),
76 76
 						'private' => false,
77 77
 					),
78 78
 					'google_analytics' => array(
79
-						'label'   => esc_html__( 'Update Google Analytics', 'auto-load-next-post' ),
80
-						'value'   => get_option( 'auto_load_next_post_google_analytics', 'no' ),
79
+						'label'   => esc_html__('Update Google Analytics', 'auto-load-next-post'),
80
+						'value'   => get_option('auto_load_next_post_google_analytics', 'no'),
81 81
 						'private' => false,
82 82
 					),
83 83
 					'load_js_in_footer' => array(
84
-						'label'   => esc_html__( 'JavaScript in Footer?', 'auto-load-next-post' ),
85
-						'value'   => get_option( 'auto_load_next_post_load_js_in_footer', 'no' ),
84
+						'label'   => esc_html__('JavaScript in Footer?', 'auto-load-next-post'),
85
+						'value'   => get_option('auto_load_next_post_load_js_in_footer', 'no'),
86 86
 						'private' => false,
87 87
 					),
88 88
 					'disable_on_mobile' => array(
89
-						'label'   => esc_html__( 'Disable for Mobile?', 'auto-load-next-post' ),
90
-						'value'   => get_option( 'auto_load_next_post_disable_on_mobile', 'no' ),
89
+						'label'   => esc_html__('Disable for Mobile?', 'auto-load-next-post'),
90
+						'value'   => get_option('auto_load_next_post_disable_on_mobile', 'no'),
91 91
 						'private' => false,
92 92
 					),
93 93
 					'uninstall' => array(
94
-						'label'   => esc_html__( 'Remove all data on uninstall?', 'auto-load-next-post' ),
95
-						'value'   => get_option( 'auto_load_next_post_uninstall_data', 'no' ),
94
+						'label'   => esc_html__('Remove all data on uninstall?', 'auto-load-next-post'),
95
+						'value'   => get_option('auto_load_next_post_uninstall_data', 'no'),
96 96
 						'private' => false,
97 97
 					),
98 98
 
99 99
 					// Events
100 100
 					'on_load_event' => array(
101
-						'label'   => esc_html__( 'Post loaded', 'auto-load-next-post' ),
102
-						'value'   => get_option( 'auto_load_next_post_on_load_event', '' ),
101
+						'label'   => esc_html__('Post loaded', 'auto-load-next-post'),
102
+						'value'   => get_option('auto_load_next_post_on_load_event', ''),
103 103
 						'private' => false,
104 104
 					),
105 105
 					'on_entering_event' => array(
106
-						'label'   => esc_html__( 'Entering a Post', 'auto-load-next-post' ),
107
-						'value'   => get_option( 'auto_load_next_post_on_entering_event', '' ),
106
+						'label'   => esc_html__('Entering a Post', 'auto-load-next-post'),
107
+						'value'   => get_option('auto_load_next_post_on_entering_event', ''),
108 108
 						'private' => false,
109 109
 					),
110 110
 				),
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-page.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
  * @license  GPL-2.0+
11 11
  */
12 12
 
13
-if ( ! defined('ABSPATH') ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit; // Exit if accessed directly.
15 15
 }
16 16
 
17
-if ( ! class_exists( 'ALNP_Settings_Page' ) ) {
17
+if ( ! class_exists('ALNP_Settings_Page')) {
18 18
 
19 19
 	abstract class ALNP_Settings_Page {
20 20
 
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 		 * @version 1.6.0
43 43
 		 */
44 44
 		public function __construct() {
45
-			add_filter( 'alnp_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
46
-			add_action( 'auto_load_next_post_sections_' . $this->id, array( $this, 'output_sections' ) );
47
-			add_action( 'auto_load_next_post_settings_' . $this->id, array( $this, 'need_help' ), 5 );
48
-			add_action( 'auto_load_next_post_settings_' . $this->id, array( $this, 'output' ), 10 );
49
-			add_action( 'auto_load_next_post_settings_save_' . $this->id, array( $this, 'save' ) );
45
+			add_filter('alnp_settings_tabs_array', array($this, 'add_settings_page'), 20);
46
+			add_action('auto_load_next_post_sections_'.$this->id, array($this, 'output_sections'));
47
+			add_action('auto_load_next_post_settings_'.$this->id, array($this, 'need_help'), 5);
48
+			add_action('auto_load_next_post_settings_'.$this->id, array($this, 'output'), 10);
49
+			add_action('auto_load_next_post_settings_save_'.$this->id, array($this, 'save'));
50 50
 		}
51 51
 
52 52
 		/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		 * @param  array $pages
80 80
 		 * @return array $pages
81 81
 		 */
82
-		public function add_settings_page( $pages ) {
82
+		public function add_settings_page($pages) {
83 83
 			$pages[$this->id] = $this->label;
84 84
 
85 85
 			return $pages;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		 * @param  array $pages
94 94
 		 * @return array $pages
95 95
 		 */
96
-		public function add_menu_page( $pages ) {
96
+		public function add_menu_page($pages) {
97 97
 			$pages[$this->id] = $this->label;
98 98
 
99 99
 			return $pages;
@@ -133,22 +133,22 @@  discard block
 block discarded – undo
133 133
 
134 134
 			$sections = $this->get_sections();
135 135
 
136
-			if ( empty( $sections ) || 1 === sizeof( $sections ) ) {
136
+			if (empty($sections) || 1 === sizeof($sections)) {
137 137
 				return;
138 138
 			}
139 139
 
140 140
 			echo '<ul class="subsubsub">';
141 141
 
142
-			$array_keys = array_keys( $sections );
142
+			$array_keys = array_keys($sections);
143 143
 
144
-			foreach ( $sections as $id => $label ) {
145
-				$url = add_query_arg( array(
144
+			foreach ($sections as $id => $label) {
145
+				$url = add_query_arg(array(
146 146
 					'page'    => 'auto-load-next-post',
147 147
 					'view'    => $this->id,
148
-					'section' => sanitize_title( $id ),
149
-				), admin_url( 'options-general.php' ) );
148
+					'section' => sanitize_title($id),
149
+				), admin_url('options-general.php'));
150 150
 
151
-				echo '<li><a href="' . $url . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> ' . ( end( $array_keys ) == $id ? '' : '|' ) . ' </li>';
151
+				echo '<li><a href="'.$url.'" class="'.($current_section == $id ? 'current' : '').'">'.$label.'</a> '.(end($array_keys) == $id ? '' : '|').' </li>';
152 152
 			}
153 153
 
154 154
 			echo '</ul><br class="clear" />';
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		public function output() {
164 164
 			$settings = $this->get_settings();
165 165
 
166
-			ALNP_Admin_Settings::output_fields( $settings );
166
+			ALNP_Admin_Settings::output_fields($settings);
167 167
 		} // END output()
168 168
 
169 169
 		/**
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
 
180 180
 			$settings = $this->get_settings();
181 181
 
182
-			ALNP_Admin_Settings::save_fields( $settings );
182
+			ALNP_Admin_Settings::save_fields($settings);
183 183
 
184
-			if ( $current_section ) {
185
-				do_action( 'auto_load_next_post_update_options_' . $this->id . '_' . $current_section );
184
+			if ($current_section) {
185
+				do_action('auto_load_next_post_update_options_'.$this->id.'_'.$current_section);
186 186
 			}
187 187
 		} // END save()
188 188
 
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
 			global $current_view;
202 202
 
203 203
 			// If theme is already supported then don't show help button for theme selectors.
204
-			if ( is_alnp_supported() && $current_view == 'theme-selectors' ) {
204
+			if (is_alnp_supported() && $current_view == 'theme-selectors') {
205 205
 				return;
206 206
 			}
207 207
 
208
-			echo '<a href="#" class="need-help trigger-help" data-tab="' . $current_view . '"><span class="sonar-dot"></span> ' . esc_html__( 'Need Help?', 'auto-load-next-post' ) . '</a>';
208
+			echo '<a href="#" class="need-help trigger-help" data-tab="'.$current_view.'"><span class="sonar-dot"></span> '.esc_html__('Need Help?', 'auto-load-next-post').'</a>';
209 209
 		} // END need_help()
210 210
 
211 211
 	} // END class
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-misc.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18
-if ( ! class_exists( 'ALNP_Settings_Misc' ) ) {
18
+if ( ! class_exists('ALNP_Settings_Misc')) {
19 19
 
20 20
 	class ALNP_Settings_Misc extends ALNP_Settings_Page {
21 21
 
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 		 */
29 29
 		public function __construct() {
30 30
 			$this->id    = 'misc';
31
-			$this->label = esc_html__( 'Misc', 'auto-load-next-post' );
31
+			$this->label = esc_html__('Misc', 'auto-load-next-post');
32 32
 
33 33
 			parent::__construct();
34 34
 
35
-			add_filter( 'auto_load_next_post_misc_settings', array( __CLASS__, 'lock_js_in_footer' ), 0, 1 );
36
-			add_action( 'auto_load_next_post_settings_misc', array( __CLASS__, 'no_comment_selector_set' ), 0 );
35
+			add_filter('auto_load_next_post_misc_settings', array(__CLASS__, 'lock_js_in_footer'), 0, 1);
36
+			add_action('auto_load_next_post_settings_misc', array(__CLASS__, 'no_comment_selector_set'), 0);
37 37
 		} // END __construct()
38 38
 
39 39
 		/**
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 		 * @since  1.5.0
45 45
 		 */
46 46
 		public static function no_comment_selector_set() {
47
-			$comments_container = get_option( 'auto_load_next_post_comments_container' );
48
-			$remove_comments    = get_option( 'auto_load_next_post_remove_comments' );
47
+			$comments_container = get_option('auto_load_next_post_comments_container');
48
+			$remove_comments    = get_option('auto_load_next_post_remove_comments');
49 49
 
50
-			if ( empty( $comments_container ) && ! empty( $remove_comments ) ) {
51
-				include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-no-comment-selector.php' );
50
+			if (empty($comments_container) && ! empty($remove_comments)) {
51
+				include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-no-comment-selector.php');
52 52
 			}
53 53
 		} // END no_comment_selector_set()
54 54
 
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
 		 * @param   array $settings
65 65
 		 * @return  array $settings
66 66
 		 */
67
-		public static function lock_js_in_footer( $settings ) {
68
-			$js_locked_in_footer = get_option( 'auto_load_next_post_lock_js_in_footer' );
67
+		public static function lock_js_in_footer($settings) {
68
+			$js_locked_in_footer = get_option('auto_load_next_post_lock_js_in_footer');
69 69
 
70
-			if ( ! empty( $js_locked_in_footer ) && $js_locked_in_footer == 'yes' ) {
70
+			if ( ! empty($js_locked_in_footer) && $js_locked_in_footer == 'yes') {
71 71
 				// Setting key to look for.
72 72
 				$key = 'load_js_in_footer';
73 73
 
74 74
 				// Find the setting.
75
-				$find_setting = array_search( $key, $settings );
75
+				$find_setting = array_search($key, $settings);
76 76
 
77 77
 				// Does the setting exist?
78
-				if ( is_bool( $find_setting ) === true ) {
79
-					unset( $settings[$key] );
78
+				if (is_bool($find_setting) === true) {
79
+					unset($settings[$key]);
80 80
 				}
81 81
 			}
82 82
 
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
 					'title' => array(
99 99
 						'title' => $this->label,
100 100
 						'type'  => 'title',
101
-						'desc'  => esc_html__( 'Further optional options can be found here should you want to use or need.', 'auto-load-next-post' ),
101
+						'desc'  => esc_html__('Further optional options can be found here should you want to use or need.', 'auto-load-next-post'),
102 102
 						'id'    => 'misc_options'
103 103
 					),
104 104
 
105 105
 					'remove_comments' => array(
106
-						'title'    => esc_html__( 'Remove Comments', 'auto-load-next-post' ),
107
-						'desc'     => esc_html__( 'Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post' ),
106
+						'title'    => esc_html__('Remove Comments', 'auto-load-next-post'),
107
+						'desc'     => esc_html__('Enable to remove comments when each post loads including the initial post.', 'auto-load-next-post'),
108 108
 						'id'       => 'auto_load_next_post_remove_comments',
109 109
 						'default'  => 'yes',
110 110
 						'type'     => 'checkbox',
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 					),
113 113
 
114 114
 					'google_analytics' => array(
115
-						'title'    => esc_html__( 'Update Google Analytics', 'auto-load-next-post' ),
116
-						'desc'     => esc_html__( 'Enable to track each post the visitor is reading. This will count as a pageview. You must already have Google Analytics setup.', 'auto-load-next-post' ),
115
+						'title'    => esc_html__('Update Google Analytics', 'auto-load-next-post'),
116
+						'desc'     => esc_html__('Enable to track each post the visitor is reading. This will count as a pageview. You must already have Google Analytics setup.', 'auto-load-next-post'),
117 117
 						'id'       => 'auto_load_next_post_google_analytics',
118 118
 						'default'  => 'no',
119 119
 						'type'     => 'checkbox',
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 					),
122 122
 
123 123
 					'load_js_in_footer' => array(
124
-						'title'    => esc_html__( 'JavaScript in Footer?', 'auto-load-next-post' ),
125
-						'desc'     => sprintf( esc_html__( 'Enable to load %s in the footer instead of the header. Can be useful to optimize your site or if the current theme requires it.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
124
+						'title'    => esc_html__('JavaScript in Footer?', 'auto-load-next-post'),
125
+						'desc'     => sprintf(esc_html__('Enable to load %s in the footer instead of the header. Can be useful to optimize your site or if the current theme requires it.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
126 126
 						'id'       => 'auto_load_next_post_load_js_in_footer',
127 127
 						'default'  => 'no',
128 128
 						'type'     => 'checkbox',
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 					),
131 131
 
132 132
 					'disable_on_mobile' => array(
133
-						'title'    => esc_html__( 'Disable for Mobile?', 'auto-load-next-post' ),
134
-						'desc'     => sprintf( esc_html__( 'Enable to disable %s from running on mobile devices.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
133
+						'title'    => esc_html__('Disable for Mobile?', 'auto-load-next-post'),
134
+						'desc'     => sprintf(esc_html__('Enable to disable %s from running on mobile devices.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
135 135
 						'id'       => 'auto_load_next_post_disable_on_mobile',
136 136
 						'default'  => 'no',
137 137
 						'type'     => 'checkbox',
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
 					),
140 140
 
141 141
 					'reset_data' => array(
142
-						'title' => esc_html__( 'Reset all data?', 'auto-load-next-post' ),
143
-						'desc'  => esc_html__( 'Press the reset button to clear all settings for this plugin and re-initialize.', 'auto-load-next-post' ),
142
+						'title' => esc_html__('Reset all data?', 'auto-load-next-post'),
143
+						'desc'  => esc_html__('Press the reset button to clear all settings for this plugin and re-initialize.', 'auto-load-next-post'),
144 144
 						'id'    => 'auto_load_next_post_reset_data',
145 145
 						'class' => 'reset-settings',
146
-						'value' => esc_html__( 'Reset', 'auto-load-next-post' ),
147
-						'url'   => add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => esc_attr( $this->id ), 'reset-alnp' => 'yes' ), admin_url( 'options-general.php' ) ),
146
+						'value' => esc_html__('Reset', 'auto-load-next-post'),
147
+						'url'   => add_query_arg(array('page' => 'auto-load-next-post', 'view' => esc_attr($this->id), 'reset-alnp' => 'yes'), admin_url('options-general.php')),
148 148
 						'type'  => 'button'
149 149
 					),
150 150
 
151 151
 					'uninstall' => array(
152
-						'title'    => esc_html__( 'Remove all data on uninstall?', 'auto-load-next-post' ),
153
-						'desc'     => esc_html__( 'If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post' ),
152
+						'title'    => esc_html__('Remove all data on uninstall?', 'auto-load-next-post'),
153
+						'desc'     => esc_html__('If enabled, all settings for this plugin will all be deleted when uninstalling via Plugins > Delete.', 'auto-load-next-post'),
154 154
 						'id'       => 'auto_load_next_post_uninstall_data',
155 155
 						'default'  => 'no',
156 156
 						'type'     => 'checkbox',
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		public function output() {
175 175
 			$settings = $this->get_settings();
176 176
 
177
-			ALNP_Admin_Settings::output_fields( $settings );
177
+			ALNP_Admin_Settings::output_fields($settings);
178 178
 		} // END output()
179 179
 
180 180
 		/**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 		public function save() {
187 187
 			$settings = $this->get_settings();
188 188
 
189
-			ALNP_Admin_Settings::save_fields( $settings );
189
+			ALNP_Admin_Settings::save_fields($settings);
190 190
 		} // END save()
191 191
 
192 192
 	} // END class
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-theme-selectors.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( 'ALNP_Settings_Theme_Selectors' ) ) {
18
+if ( ! class_exists('ALNP_Settings_Theme_Selectors')) {
19 19
 
20 20
 	class ALNP_Settings_Theme_Selectors extends ALNP_Settings_Page {
21 21
 
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 		 */
29 29
 		public function __construct() {
30 30
 			$this->id    = 'theme-selectors';
31
-			$this->label = esc_html__( 'Theme Selectors', 'auto-load-next-post' );
31
+			$this->label = esc_html__('Theme Selectors', 'auto-load-next-post');
32 32
 
33 33
 			parent::__construct();
34 34
 
35
-			add_action( 'auto_load_next_post_settings_theme-selectors', array( __CLASS__, 'is_theme_supported' ), 0 );
36
-			add_action( 'auto_load_next_post_settings_theme-selectors', array( __CLASS__, 'no_theme_selectors_set' ), 0 );
35
+			add_action('auto_load_next_post_settings_theme-selectors', array(__CLASS__, 'is_theme_supported'), 0);
36
+			add_action('auto_load_next_post_settings_theme-selectors', array(__CLASS__, 'no_theme_selectors_set'), 0);
37 37
 		} // END __construct()
38 38
 
39 39
 		/**
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 		 * @since  1.5.10
45 45
 		 */
46 46
 		public static function is_theme_supported() {
47
-			if ( is_alnp_supported() ) {
48
-				$plugin_supported = alnp_get_theme_support( 'plugin_support' );
47
+			if (is_alnp_supported()) {
48
+				$plugin_supported = alnp_get_theme_support('plugin_support');
49 49
 
50 50
 				// Is the theme supported by theme or plugin?
51
-				if ( ! empty( $plugin_supported ) && $plugin_supported == 'yes' ) {
52
-					include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-plugin-supported.php' );
51
+				if ( ! empty($plugin_supported) && $plugin_supported == 'yes') {
52
+					include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-plugin-supported.php');
53 53
 				} else {
54
-					include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-is-supported.php' );
54
+					include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-is-supported.php');
55 55
 				}
56 56
 			}
57 57
 		} // END is_theme_supported()
@@ -66,24 +66,24 @@  discard block
 block discarded – undo
66 66
 		public static function no_theme_selectors_set() {
67 67
 			$set_selectors = array();
68 68
 
69
-			$content_container    = get_option( 'auto_load_next_post_content_container' );
70
-			$title_selector       = get_option( 'auto_load_next_post_title_selector' );
71
-			$navigation_container = get_option( 'auto_load_next_post_navigation_container' );
69
+			$content_container    = get_option('auto_load_next_post_content_container');
70
+			$title_selector       = get_option('auto_load_next_post_title_selector');
71
+			$navigation_container = get_option('auto_load_next_post_navigation_container');
72 72
 
73
-			if ( ! empty( $content_container ) ) {
73
+			if ( ! empty($content_container)) {
74 74
 				$set_selectors[] = $content_container;
75 75
 			}
76 76
 
77
-			if ( ! empty( $title_selector ) ) {
77
+			if ( ! empty($title_selector)) {
78 78
 				$set_selectors[] = $title_selector;
79 79
 			}
80 80
 
81
-			if ( ! empty( $navigation_container ) ) {
81
+			if ( ! empty($navigation_container)) {
82 82
 				$set_selectors[] = $navigation_container;
83 83
 			}
84 84
 
85
-			if ( empty( $set_selectors ) || is_array( $set_selectors ) && count( $set_selectors ) < 3 ) {
86
-				include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-no-theme-selectors.php' );
85
+			if (empty($set_selectors) || is_array($set_selectors) && count($set_selectors) < 3) {
86
+				include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-no-theme-selectors.php');
87 87
 			}
88 88
 		} // END no_theme_selectors_set()
89 89
 
@@ -102,27 +102,27 @@  discard block
 block discarded – undo
102 102
 			$settings = array();
103 103
 
104 104
 			$settings[] = array(
105
-				'title' => esc_html__( 'Theme Selectors', 'auto-load-next-post' ),
105
+				'title' => esc_html__('Theme Selectors', 'auto-load-next-post'),
106 106
 				'type'  => 'title',
107
-				'desc'  => sprintf( esc_html__( 'Here you set the theme selectors below according to your active theme. All are required for %s to work.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) ),
107
+				'desc'  => sprintf(esc_html__('Here you set the theme selectors below according to your active theme. All are required for %s to work.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post')),
108 108
 				'id'    => 'theme_selectors_options'
109 109
 			);
110 110
 
111 111
 			// Provide the theme customizer option if theme is not already supported.
112
-			if ( ! is_alnp_supported() ) {
112
+			if ( ! is_alnp_supported()) {
113 113
 				$query = array(
114 114
 					'autofocus[panel]'   => 'alnp',
115 115
 					'autofocus[section]' => 'auto_load_next_post_theme_selectors',
116 116
 					'url'                => alnp_get_random_page_permalink(),
117
-					'return'             => add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'theme-selectors' ), admin_url( 'options-general.php' ) ),
117
+					'return'             => add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'theme-selectors'), admin_url('options-general.php')),
118 118
 				);
119
-				$customizer_link = add_query_arg( $query, admin_url( 'customize.php' ) );
119
+				$customizer_link = add_query_arg($query, admin_url('customize.php'));
120 120
 
121 121
 				$settings[] = array(
122
-					'title'   => esc_html__( 'Theme Customizer', 'auto-load-next-post' ),
123
-					'desc'    => esc_html__( 'Use the theme customizer to enter the theme selectors while you inspect the theme.', 'auto-load-next-post' ),
122
+					'title'   => esc_html__('Theme Customizer', 'auto-load-next-post'),
123
+					'desc'    => esc_html__('Use the theme customizer to enter the theme selectors while you inspect the theme.', 'auto-load-next-post'),
124 124
 					'id'      => 'auto_load_next_post_customizer',
125
-					'value'   => esc_html__( 'Open Theme Customizer', 'auto-load-next-post' ),
125
+					'value'   => esc_html__('Open Theme Customizer', 'auto-load-next-post'),
126 126
 					'url'     => $customizer_link,
127 127
 					'type'    => 'button'
128 128
 				);
@@ -141,18 +141,18 @@  discard block
 block discarded – undo
141 141
 			$comments_container_default = '';
142 142
 
143 143
 			// Checks if the Content Container selector has been set by theme support.
144
-			if ( ! empty( alnp_get_theme_support( 'content_container' ) ) ) {
144
+			if ( ! empty(alnp_get_theme_support('content_container'))) {
145 145
 				$container_readonly = 'yes';
146 146
 			} else {
147
-				$container_default = sprintf( __( 'Default: %s', 'auto-load-next-post' ), '<code>main.site-main</code>' );
147
+				$container_default = sprintf(__('Default: %s', 'auto-load-next-post'), '<code>main.site-main</code>');
148 148
 			}
149 149
 
150 150
 			$settings[] = array(
151
-				'title'       => esc_html__( 'Content Container', 'auto-load-next-post' ),
152
-				'desc'        => sprintf( __( 'The primary container where the post content is loaded in. %s', 'auto-load-next-post' ), $container_default ),
151
+				'title'       => esc_html__('Content Container', 'auto-load-next-post'),
152
+				'desc'        => sprintf(__('The primary container where the post content is loaded in. %s', 'auto-load-next-post'), $container_default),
153 153
 				'id'          => 'auto_load_next_post_content_container',
154 154
 				'default'     => 'main.site-main',
155
-				'placeholder' => sprintf( esc_html__( 'e.g. %s', 'auto-load-next-post' ), 'main.site-main' ),
155
+				'placeholder' => sprintf(esc_html__('e.g. %s', 'auto-load-next-post'), 'main.site-main'),
156 156
 				'readonly'    => $container_readonly,
157 157
 				'type'        => 'text',
158 158
 				'css'         => 'min-width:300px;',
@@ -161,18 +161,18 @@  discard block
 block discarded – undo
161 161
 			);
162 162
 
163 163
 			// Checks if the Post Title selector has been set by theme support.
164
-			if ( ! empty( alnp_get_theme_support( 'title_selector' ) ) ) {
164
+			if ( ! empty(alnp_get_theme_support('title_selector'))) {
165 165
 				$post_title_readonly = 'yes';
166 166
 			} else {
167
-				$post_title_default = sprintf( __( 'Default: %s', 'auto-load-next-post' ), '<code>h1.entry-title</code>' );
167
+				$post_title_default = sprintf(__('Default: %s', 'auto-load-next-post'), '<code>h1.entry-title</code>');
168 168
 			}
169 169
 
170 170
 			$settings[] = array(
171
-				'title'       => esc_html__( 'Post Title', 'auto-load-next-post' ),
172
-				'desc'        => sprintf( __( 'Used to identify which article the user is reading and track should Google Analytics or other analytics be enabled. %s', 'auto-load-next-post' ), $post_title_default ),
171
+				'title'       => esc_html__('Post Title', 'auto-load-next-post'),
172
+				'desc'        => sprintf(__('Used to identify which article the user is reading and track should Google Analytics or other analytics be enabled. %s', 'auto-load-next-post'), $post_title_default),
173 173
 				'id'          => 'auto_load_next_post_title_selector',
174 174
 				'default'     => 'h1.entry-title',
175
-				'placeholder' => sprintf( esc_html__( 'e.g. %s', 'auto-load-next-post' ), 'h1.entry-title' ),
175
+				'placeholder' => sprintf(esc_html__('e.g. %s', 'auto-load-next-post'), 'h1.entry-title'),
176 176
 				'readonly'    => $post_title_readonly,
177 177
 				'type'        => 'text',
178 178
 				'css'         => 'min-width:300px;',
@@ -181,18 +181,18 @@  discard block
 block discarded – undo
181 181
 			);
182 182
 
183 183
 			// Checks if the Post Navigation selector has been set by theme support.
184
-			if ( ! empty( alnp_get_theme_support( 'navigation_container' ) ) ) {
184
+			if ( ! empty(alnp_get_theme_support('navigation_container'))) {
185 185
 				$post_navigation_readonly = 'yes';
186 186
 			} else {
187
-				$post_navigation_default = sprintf( __( 'Default: %s', 'auto-load-next-post' ), '<code>nav.post-navigation</code>' );
187
+				$post_navigation_default = sprintf(__('Default: %s', 'auto-load-next-post'), '<code>nav.post-navigation</code>');
188 188
 			}
189 189
 
190 190
 			$settings[] = array(
191
-				'title'       => esc_html__( 'Post Navigation', 'auto-load-next-post' ),
192
-				'desc'        => sprintf( __( 'Used to identify which post to load next if any. %s', 'auto-load-next-post' ), $post_navigation_default ),
191
+				'title'       => esc_html__('Post Navigation', 'auto-load-next-post'),
192
+				'desc'        => sprintf(__('Used to identify which post to load next if any. %s', 'auto-load-next-post'), $post_navigation_default),
193 193
 				'id'          => 'auto_load_next_post_navigation_container',
194 194
 				'default'     => 'nav.post-navigation',
195
-				'placeholder' => sprintf( esc_html__( 'e.g. %s', 'auto-load-next-post' ), 'nav.post-navigation' ),
195
+				'placeholder' => sprintf(esc_html__('e.g. %s', 'auto-load-next-post'), 'nav.post-navigation'),
196 196
 				'readonly'    => $post_navigation_readonly,
197 197
 				'type'        => 'text',
198 198
 				'css'         => 'min-width:300px;',
@@ -201,18 +201,18 @@  discard block
 block discarded – undo
201 201
 			);
202 202
 
203 203
 			// Checks if the Comments Container selector has been set by theme support.
204
-			if ( ! empty( alnp_get_theme_support( 'comments_container' ) ) ) {
204
+			if ( ! empty(alnp_get_theme_support('comments_container'))) {
205 205
 				$comments_container_readonly = 'yes';
206 206
 			} else {
207
-				$comments_container_default = sprintf( __( 'Default: %s', 'auto-load-next-post' ), '<code>div#comments</code>' );
207
+				$comments_container_default = sprintf(__('Default: %s', 'auto-load-next-post'), '<code>div#comments</code>');
208 208
 			}
209 209
 
210 210
 			$settings[] = array(
211
-				'title'       => esc_html__( 'Comments Container', 'auto-load-next-post' ),
212
-				'desc'        => sprintf( __( 'Used to remove comments if enabled under %1$sMisc%2$s settings. %3$s', 'auto-load-next-post' ), '<strong><a href="' . add_query_arg( array( 'page' => 'auto-load-next-post', 'view' => 'misc' ), get_admin_url( $blog_id, 'options-general.php' ) ) . '">', '</a></strong>', $comments_container_default ),
211
+				'title'       => esc_html__('Comments Container', 'auto-load-next-post'),
212
+				'desc'        => sprintf(__('Used to remove comments if enabled under %1$sMisc%2$s settings. %3$s', 'auto-load-next-post'), '<strong><a href="'.add_query_arg(array('page' => 'auto-load-next-post', 'view' => 'misc'), get_admin_url($blog_id, 'options-general.php')).'">', '</a></strong>', $comments_container_default),
213 213
 				'id'          => 'auto_load_next_post_comments_container',
214 214
 				'default'     => 'div#comments',
215
-				'placeholder' => sprintf( esc_html__( 'e.g. %s', 'auto-load-next-post' ), 'div#comments' ),
215
+				'placeholder' => sprintf(esc_html__('e.g. %s', 'auto-load-next-post'), 'div#comments'),
216 216
 				'readonly'    => $comments_container_readonly,
217 217
 				'type'        => 'text',
218 218
 				'css'         => 'min-width:300px;',
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 				'id'   => 'theme_selectors_options'
225 225
 			);
226 226
 
227
-			return apply_filters( 'alnp_selectors_settings', $settings );
227
+			return apply_filters('alnp_selectors_settings', $settings);
228 228
 		} // END get_settings()
229 229
 
230 230
 		/**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 		public function output() {
237 237
 			$settings = $this->get_settings();
238 238
 
239
-			ALNP_Admin_Settings::output_fields( $settings );
239
+			ALNP_Admin_Settings::output_fields($settings);
240 240
 		} // END output()
241 241
 
242 242
 		/**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		public function save() {
250 250
 			$settings = $this->get_settings();
251 251
 
252
-			ALNP_Admin_Settings::save_fields( $settings );
252
+			ALNP_Admin_Settings::save_fields($settings);
253 253
 		} // END save()
254 254
 
255 255
 	} // END class
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-templates.php 1 patch
Spacing   +21 added lines, -21 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_Settings_Templates' ) ) {
17
+if ( ! class_exists('ALNP_Settings_Templates')) {
18 18
 
19 19
 	class ALNP_Settings_Templates extends ALNP_Settings_Page {
20 20
 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 		 */
26 26
 		public function __construct() {
27 27
 			$this->id    = 'templates';
28
-			$this->label = esc_html__( 'Templates', 'auto-load-next-post' );
28
+			$this->label = esc_html__('Templates', 'auto-load-next-post');
29 29
 
30 30
 			parent::__construct();
31 31
 
32
-			add_action( 'auto_load_next_post_settings_templates', array( __CLASS__, 'template_location' ), 0 );
32
+			add_action('auto_load_next_post_settings_templates', array(__CLASS__, 'template_location'), 0);
33 33
 		} // END __construct()
34 34
 
35 35
 		/**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		 * @static
42 42
 		 */
43 43
 		public static function template_location() {
44
-			include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-template-location.php' );
44
+			include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-template-location.php');
45 45
 		} // END template_location()
46 46
 
47 47
 		/**
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 		public function get_settings() {
54 54
 			$settings = array();
55 55
 
56
-			$description = sprintf( __( 'This helps fine tune %s to locate your theme templates directory in order to display content in the same style as your theme.', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ) );
56
+			$description = sprintf(__('This helps fine tune %s to locate your theme templates directory in order to display content in the same style as your theme.', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'));
57 57
 
58
-			if ( is_alnp_pro_version_installed() ) {
59
-				$description .= ' ' . sprintf( __( 'Set the location for each post type if they are located in their own template directory. Otherwise just enter the location for %1$sPosts%2$s.', 'auto-load-next-post' ), '<strong>', '</strong>' );
58
+			if (is_alnp_pro_version_installed()) {
59
+				$description .= ' '.sprintf(__('Set the location for each post type if they are located in their own template directory. Otherwise just enter the location for %1$sPosts%2$s.', 'auto-load-next-post'), '<strong>', '</strong>');
60 60
 			}
61 61
 
62 62
 			$settings[] = array(
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 			$locate_single = alnp_get_template();
70 70
 
71 71
 			// Only show fallback support option if template location was found. May be required should theme structure fail.
72
-			if ( ! empty( $locate_single ) ) {
72
+			if ( ! empty($locate_single)) {
73 73
 				$settings[] = array(
74
-					'title'    => esc_html__( 'Use Fallback?', 'auto-load-next-post' ),
75
-					'desc'     => sprintf( __( 'Enabling this will force the use of fallback support should your active theme not have a great structure. %1$sSee help for more information%2$s.', 'auto-load-next-post' ), '<strong class="red">', '</strong>' ),
74
+					'title'    => esc_html__('Use Fallback?', 'auto-load-next-post'),
75
+					'desc'     => sprintf(__('Enabling this will force the use of fallback support should your active theme not have a great structure. %1$sSee help for more information%2$s.', 'auto-load-next-post'), '<strong class="red">', '</strong>'),
76 76
 					'id'       => 'auto_load_next_post_use_fallback',
77 77
 					'default'  => 'no',
78 78
 					'type'     => 'checkbox',
@@ -80,28 +80,28 @@  discard block
 block discarded – undo
80 80
 				);
81 81
 			}
82 82
 
83
-			foreach( alnp_get_post_types() as $post_type ) {
83
+			foreach (alnp_get_post_types() as $post_type) {
84 84
 				$default  = '';
85 85
 				$readonly = 'no';
86 86
 
87 87
 				// Checks if the filter has been used already and disable posts only if true.
88
-				if ( has_filter( 'alnp_template_location' ) && strtolower( $post_type ) == 'post' ) {
88
+				if (has_filter('alnp_template_location') && strtolower($post_type) == 'post') {
89 89
 					$default  = alnp_template_location();
90 90
 					$readonly = 'yes';
91 91
 				}
92 92
 
93 93
 				// Checks if theme support provided directory location for post and disable posts only if true.
94
-				else if ( ! empty( alnp_get_theme_support( 'directory_post' ) ) && strtolower( $post_type ) == 'post' ) {
95
-					$default  = alnp_get_theme_support( 'directory_post' );
94
+				else if ( ! empty(alnp_get_theme_support('directory_post')) && strtolower($post_type) == 'post') {
95
+					$default  = alnp_get_theme_support('directory_post');
96 96
 					$readonly = 'yes';
97 97
 				}
98 98
 
99 99
 				$settings[] = array(
100
-					'title'       => ucfirst( $post_type ),
101
-					'desc'        => sprintf( __( 'Enter the folder location where the theme template for %s are stored.', 'auto-load-next-post' ), $post_type ),
102
-					'id'          => 'auto_load_next_post_directory_' . strtolower( $post_type ),
100
+					'title'       => ucfirst($post_type),
101
+					'desc'        => sprintf(__('Enter the folder location where the theme template for %s are stored.', 'auto-load-next-post'), $post_type),
102
+					'id'          => 'auto_load_next_post_directory_'.strtolower($post_type),
103 103
 					'default'     => $default,
104
-					'placeholder' => sprintf( esc_html__( 'e.g. %s', 'auto-load-next-post' ), 'template-parts/' ),
104
+					'placeholder' => sprintf(esc_html__('e.g. %s', 'auto-load-next-post'), 'template-parts/'),
105 105
 					'readonly'    => $readonly,
106 106
 					'type'        => 'text',
107 107
 					'css'         => 'min-width:300px;',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		public function output() {
126 126
 			$settings = $this->get_settings();
127 127
 
128
-			ALNP_Admin_Settings::output_fields( $settings );
128
+			ALNP_Admin_Settings::output_fields($settings);
129 129
 		} // END output()
130 130
 
131 131
 		/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 			$settings = $this->get_settings();
141 141
 
142
-			ALNP_Admin_Settings::save_fields( $settings, $current_view );
142
+			ALNP_Admin_Settings::save_fields($settings, $current_view);
143 143
 		} // END save()
144 144
 
145 145
 	} // END class
Please login to merge, or discard this patch.
includes/admin/settings/class-alnp-settings-events.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
18
-if ( ! class_exists( 'ALNP_Settings_Events' ) ) {
18
+if ( ! class_exists('ALNP_Settings_Events')) {
19 19
 
20 20
 	class ALNP_Settings_Events extends ALNP_Settings_Page {
21 21
 
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 		 */
27 27
 		public function __construct() {
28 28
 			$this->id    = 'events';
29
-			$this->label = esc_html__( 'Events', 'auto-load-next-post' );
29
+			$this->label = esc_html__('Events', 'auto-load-next-post');
30 30
 
31 31
 			parent::__construct();
32 32
 
33
-			add_action( 'auto_load_next_post_settings_events', array( __CLASS__, 'is_jetpack_lazy_images_active' ), 0 );
33
+			add_action('auto_load_next_post_settings_events', array(__CLASS__, 'is_jetpack_lazy_images_active'), 0);
34 34
 		} // END __construct()
35 35
 
36 36
 		/**
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 		 * @static
42 42
 		 */
43 43
 		public static function is_jetpack_lazy_images_active() {
44
-			if ( alnp_check_jetpack() == 'yes' ) {
45
-				if ( Jetpack::is_module_active( 'lazy-images' ) ) {
46
-					include( dirname( AUTO_LOAD_NEXT_POST_FILE ) . '/includes/admin/views/html-notice-jetpack-lazy-images-module.php' );
44
+			if (alnp_check_jetpack() == 'yes') {
45
+				if (Jetpack::is_module_active('lazy-images')) {
46
+					include(dirname(AUTO_LOAD_NEXT_POST_FILE).'/includes/admin/views/html-notice-jetpack-lazy-images-module.php');
47 47
 				}
48 48
 			}
49 49
 		} // END is_jetpack_lazy_images_active()
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 					array(
62 62
 						'title' => $this->label,
63 63
 						'type'  => 'title',
64
-						'desc'  => sprintf( __( 'Below you can enter external JavaScript events to be triggered alongside %1$s native events. Separate each event like so: %2$s', 'auto-load-next-post' ), esc_html__( 'Auto Load Next Post', 'auto-load-next-post' ), '<code>event1, event2,</code>' ),
64
+						'desc'  => sprintf(__('Below you can enter external JavaScript events to be triggered alongside %1$s native events. Separate each event like so: %2$s', 'auto-load-next-post'), esc_html__('Auto Load Next Post', 'auto-load-next-post'), '<code>event1, event2,</code>'),
65 65
 						'id'    => 'events_options'
66 66
 					),
67 67
 
68 68
 					array(
69
-						'title'    => esc_html__( 'Post loaded', 'auto-load-next-post' ),
70
-						'desc'     => esc_html__( 'Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post' ),
69
+						'title'    => esc_html__('Post loaded', 'auto-load-next-post'),
70
+						'desc'     => esc_html__('Events listed here will be triggered after a new post has loaded.', 'auto-load-next-post'),
71 71
 						'id'       => 'auto_load_next_post_on_load_event',
72 72
 						'default'  => '',
73 73
 						'type'     => 'textarea',
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 					),
77 77
 
78 78
 					array(
79
-						'title'    => esc_html__( 'Entering a Post', 'auto-load-next-post' ),
80
-						'desc'     => esc_html__( 'Events listed here will be triggered when entering a post.', 'auto-load-next-post' ),
79
+						'title'    => esc_html__('Entering a Post', 'auto-load-next-post'),
80
+						'desc'     => esc_html__('Events listed here will be triggered when entering a post.', 'auto-load-next-post'),
81 81
 						'id'       => 'auto_load_next_post_on_entering_event',
82 82
 						'default'  => '',
83 83
 						'type'     => 'textarea',
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		public function output() {
101 101
 			$settings = $this->get_settings();
102 102
 
103
-			ALNP_Admin_Settings::output_fields( $settings );
103
+			ALNP_Admin_Settings::output_fields($settings);
104 104
 		} // END output()
105 105
 
106 106
 		/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		public function save() {
112 112
 			$settings = $this->get_settings();
113 113
 
114
-			ALNP_Admin_Settings::save_fields( $settings );
114
+			ALNP_Admin_Settings::save_fields($settings);
115 115
 		} // END save()
116 116
 
117 117
 	} // END class
Please login to merge, or discard this patch.
includes/admin/class-alnp-sidebar.php 1 patch
Spacing   +11 added lines, -11 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_Sidebar' ) ) {
19
+if ( ! class_exists('ALNP_Sidebar')) {
20 20
 
21 21
 	class ALNP_Sidebar {
22 22
 
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 		 * @access  public
27 27
 		 */
28 28
 		public function __construct() {
29
-			add_action( 'auto_load_next_post_sidebar', array( $this, 'sidebar_top' ), 0 );
30
-			add_action( 'auto_load_next_post_sidebar', array( $this, 'upgrade_details' ), 1 );
31
-			add_action( 'auto_load_next_post_sidebar', array( $this, 'sidebar_bottom' ), 999 );
29
+			add_action('auto_load_next_post_sidebar', array($this, 'sidebar_top'), 0);
30
+			add_action('auto_load_next_post_sidebar', array($this, 'upgrade_details'), 1);
31
+			add_action('auto_load_next_post_sidebar', array($this, 'sidebar_bottom'), 999);
32 32
 		} // END __construct()
33 33
 
34 34
 		/**
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 		 * @access public
38 38
 		 */
39 39
 		public function sidebar_top() {
40
-			include_once( dirname( __FILE__ ) . '/views/html-admin-sidebar-logo.php' );
40
+			include_once(dirname(__FILE__).'/views/html-admin-sidebar-logo.php');
41 41
 
42
-			do_action( 'auto_load_next_post_sidebar_top' );
42
+			do_action('auto_load_next_post_sidebar_top');
43 43
 		} // END sidebar_top()
44 44
 
45 45
 		/**
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 		 * @access public
50 50
 		 */
51 51
 		public function upgrade_details() {
52
-			if ( ! is_alnp_pro_version_installed() ) {
53
-				include_once( dirname( __FILE__ ) . '/views/html-admin-sidebar.php' );
52
+			if ( ! is_alnp_pro_version_installed()) {
53
+				include_once(dirname(__FILE__).'/views/html-admin-sidebar.php');
54 54
 			}
55 55
 		} // END upgrade_details()
56 56
 
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 		 * @access public
61 61
 		 */
62 62
 		public function sidebar_bottom() {
63
-			do_action( 'auto_load_next_post_sidebar_bottom' );
63
+			do_action('auto_load_next_post_sidebar_bottom');
64 64
 
65
-			include_once( dirname( __FILE__ ) . '/views/html-admin-sidebar-credits.php' );
65
+			include_once(dirname(__FILE__).'/views/html-admin-sidebar-credits.php');
66 66
 		} // END sidebar_bottom()
67 67
 
68 68
 	} // END class
Please login to merge, or discard this patch.
includes/theme-support/class-alnp-oceanwp.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  */
14 14
 
15 15
 // Exit if accessed directly.
16
-if ( ! defined( 'ABSPATH' ) ) {
16
+if ( ! defined('ABSPATH')) {
17 17
 	exit;
18 18
 }
19 19
 
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public static function init() {
32 32
 		// Add theme support and preset the theme selectors.
33
-		add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) );
33
+		add_action('after_setup_theme', array(__CLASS__, 'add_theme_support'));
34 34
 
35 35
 		// Filters the location of the repeater template.
36
-		add_filter( 'alnp_template_redirect', array( __CLASS__, 'template_redirect' ) );
36
+		add_filter('alnp_template_redirect', array(__CLASS__, 'template_redirect'));
37 37
 
38 38
 		// Filters the repeater template location.
39 39
 		//add_filter( 'alnp_template_location', array( __CLASS__, 'alnp_oceanwp_template_location' ) );
40 40
 
41 41
 		// Remove Auto Load Next Post compatible post navigation.
42
-		remove_action( 'alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10 );
42
+		remove_action('alnp_load_after_content', 'auto_load_next_post_navigation', 1, 10);
43 43
 	} // END init()
44 44
 
45 45
 	/**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @return string
50 50
 	 */
51 51
 	public static function template_redirect() {
52
-		return AUTO_LOAD_NEXT_POST_FILE_PATH . '/template/theme-support/oceanwp/content-alnp.php';
52
+		return AUTO_LOAD_NEXT_POST_FILE_PATH.'/template/theme-support/oceanwp/content-alnp.php';
53 53
 	} // END template_redirect()
54 54
 
55 55
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @static
71 71
 	 */
72 72
 	public static function add_theme_support() {
73
-		add_theme_support( 'auto-load-next-post', array(
73
+		add_theme_support('auto-load-next-post', array(
74 74
 			'content_container'    => 'div.site-content',
75 75
 			'title_selector'       => '.entry-title',
76 76
 			'navigation_container' => 'nav.post-navigation',
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			'load_js_in_footer'    => 'no',
79 79
 			'lock_js_in_footer'    => 'no',
80 80
 			'directory_post'       => 'partials/single/'
81
-		) );
81
+		));
82 82
 	} // END add_theme_support()
83 83
 
84 84
 } // END class
Please login to merge, or discard this patch.
includes/theme-support/class-alnp-poseidon.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  */
14 14
 
15 15
 // Exit if accessed directly.
16
-if ( ! defined( 'ABSPATH' ) ) {
16
+if ( ! defined('ABSPATH')) {
17 17
 	exit;
18 18
 }
19 19
 
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 	 */
31 31
 	public static function init() {
32 32
 		// Add theme support and preset the theme selectors.
33
-		add_action( 'after_setup_theme', array( __CLASS__, 'add_theme_support' ) );
33
+		add_action('after_setup_theme', array(__CLASS__, 'add_theme_support'));
34 34
 
35 35
 		// Display the post thumbnail before the content.
36
-		add_action( 'alnp_load_before_content', array( __CLASS__, 'the_post_thumbnail' ), 10 );
36
+		add_action('alnp_load_before_content', array(__CLASS__, 'the_post_thumbnail'), 10);
37 37
 
38 38
 		// Filters the repeater template location.
39 39
 		//add_filter( 'alnp_template_location', array( __CLASS__, 'alnp_poseidon_template_location' ) );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		// Get theme options from database.
53 53
 		$theme_options = poseidon_theme_options();
54 54
 
55
-		if ( is_single() && has_post_thumbnail() && 'header' == $theme_options['post_layout_single'] ) {
55
+		if (is_single() && has_post_thumbnail() && 'header' == $theme_options['post_layout_single']) {
56 56
 			the_post_thumbnail();
57 57
 		}
58 58
 	} // END the_post_thumbnail()
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * @version 1.6.0
78 78
 	 */
79 79
 	public static function add_theme_support() {
80
-		add_theme_support( 'auto-load-next-post', array(
80
+		add_theme_support('auto-load-next-post', array(
81 81
 			'content_container'    => 'main.site-main',
82 82
 			'title_selector'       => 'h1.entry-title',
83 83
 			'navigation_container' => 'nav.post-navigation',
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			'load_js_in_footer'    => 'no',
86 86
 			'lock_js_in_footer'    => 'no',
87 87
 			'directory_post'       => 'template-parts/'
88
-		) );
88
+		));
89 89
 	} // END add_theme_support()
90 90
 
91 91
 } // END class
Please login to merge, or discard this patch.