GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#208)
by Dan
21:20
created
includes/admin/actions.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // Exit if accessed directly
3
-if ( ! defined( 'ABSPATH' ) ) {
3
+if ( ! defined( 'ABSPATH' )) {
4 4
 	exit;
5 5
 }
6 6
 
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function ppp_disconnect_social() {
16 16
 
17
-	if ( isset( $_GET['ppp_social_disconnect'] ) && isset( $_GET['ppp_network'] ) ) {
17
+	if (isset($_GET['ppp_social_disconnect']) && isset($_GET['ppp_network'])) {
18 18
 
19
-		if ( ! current_user_can( 'manage_options' ) ) {
19
+		if ( ! current_user_can( 'manage_options' )) {
20 20
 			wp_die( __( 'You do not have permission to view this page', 'ppp-txt' ) );
21 21
 		}
22 22
 
23 23
 		$network = $_GET['ppp_network'];
24
-		do_action( 'ppp_disconnect-' . $network );
24
+		do_action( 'ppp_disconnect-'.$network );
25 25
 	}
26 26
 }
27 27
 add_action( 'admin_init', 'ppp_disconnect_social', 10 );
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
 	$tabs = apply_filters( 'ppp_metabox_tabs', array() );
37 37
 	$i = 0;
38
-	foreach ( $tabs as $key => $values ) {
39
-		if ( $i === 0 ) {
38
+	foreach ($tabs as $key => $values) {
39
+		if ($i === 0) {
40 40
 			$visibleKey = $key;
41 41
 			$class = 'tabs';
42 42
 		} else {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		}
45 45
 
46 46
 		?><li class="<?php echo $class; ?>"><a href="#<?php echo $key; ?>"><?php
47
-		if ( $values['class'] !== false ) {
47
+		if ($values['class'] !== false) {
48 48
 			?>
49 49
 			<span class="dashicons <?php echo $values['class']; ?>"></span>&nbsp;
50 50
 			<?php
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
 	$tabs = apply_filters( 'ppp_admin_tabs', array() );
66 66
 	$i = 0;
67 67
 	?><h2 id="ppp-social-connect-tabs" class="nav-tab-wrapper"><?php
68
-	foreach ( $tabs as $key => $values ) {
69
-		if ( $i === 0 ) {
68
+	foreach ($tabs as $key => $values) {
69
+		if ($i === 0) {
70 70
 			$visibleSettingTab = $key;
71 71
 			$class = ' nav-tab-active';
72 72
 		} else {
73 73
 			$class = '';
74 74
 		}
75 75
 		?><a class="nav-tab<?php echo $class; ?>" href='#<?php echo $key; ?>'><?php
76
-		if ( $values['class'] !== false ) {
76
+		if ($values['class'] !== false) {
77 77
 			?>
78 78
 			<span class="dashicons <?php echo $values['class']; ?>"></span>&nbsp;
79 79
 			<?php
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
 function ppp_generate_metabox_content( $post ) {
95 95
 	global $visibleKey;
96 96
 	$tab_content = apply_filters( 'ppp_metabox_content', array() );
97
-	if ( empty( $tab_content ) ) {
97
+	if (empty($tab_content)) {
98 98
 		printf( __( 'No social media accounts active. <a href="%s">Connect with your accounts now</a>.', 'ppp-txt' ), admin_url( 'admin.php?page=ppp-social-settings' ) );
99 99
 	} else {
100
-		foreach ( $tab_content as $service ) {
101
-			$hidden = ( $visibleKey == $service ) ? '' : ' hidden';
100
+		foreach ($tab_content as $service) {
101
+			$hidden = ($visibleKey == $service) ? '' : ' hidden';
102 102
 			?>
103 103
 			<div class="wp-tab-panel tabs-panel<?php echo $hidden; ?>" id="<?php echo $service; ?>">
104
-				<?php do_action( 'ppp_generate_metabox_content-' . $service, $post ); ?>
104
+				<?php do_action( 'ppp_generate_metabox_content-'.$service, $post ); ?>
105 105
 			</div>
106 106
 			<?php
107 107
 		}
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
 function ppp_generate_social_account_content() {
117 117
 	global $visibleSettingTab;
118 118
 	$tab_content = apply_filters( 'ppp_admin_social_content', array() );
119
-	if ( empty( $tab_content ) ) {
119
+	if (empty($tab_content)) {
120 120
 		printf( __( 'No social media accounts active. <a href="%s">Connect with your accounts now</a>.', 'ppp-txt' ), admin_url( 'admin.php?page=ppp-social-settings' ) );
121 121
 	} else {
122
-		foreach ( $tab_content as $service ) {
123
-			$hidden = ( $visibleSettingTab == $service ) ? '' : ' hidden';
122
+		foreach ($tab_content as $service) {
123
+			$hidden = ($visibleSettingTab == $service) ? '' : ' hidden';
124 124
 			?>
125 125
 			<div class="ppp-social-connect<?php echo $hidden; ?>" id="<?php echo $service; ?>">
126
-				<?php do_action( 'ppp_connect_display-' . $service ); ?>
126
+				<?php do_action( 'ppp_connect_display-'.$service ); ?>
127 127
 			</div>
128 128
 			<?php
129 129
 		}
@@ -136,30 +136,30 @@  discard block
 block discarded – undo
136 136
  * @return void
137 137
  */
138 138
 function ppp_list_view_maybe_take_action() {
139
-	if ( ! isset( $_GET['page'] ) || $_GET['page'] !== 'ppp-schedule-info' ) {
139
+	if ( ! isset($_GET['page']) || $_GET['page'] !== 'ppp-schedule-info') {
140 140
 		return;
141 141
 	}
142 142
 
143
-	if ( ! isset( $_GET['action'] ) ) {
143
+	if ( ! isset($_GET['action'])) {
144 144
 		return;
145 145
 	}
146 146
 
147 147
 	// Get the necessary info for the actions
148
-	$post_id = isset( $_GET['post_id'] ) ? $_GET['post_id'] : 0;
149
-	$name    = isset( $_GET['name'] ) ? $_GET['name'] : '';
150
-	$index   = isset( $_GET['index'] ) ? $_GET['index'] : 0;
151
-	$delete  = isset( $_GET['delete_too'] ) ? true : false;
148
+	$post_id = isset($_GET['post_id']) ? $_GET['post_id'] : 0;
149
+	$name    = isset($_GET['name']) ? $_GET['name'] : '';
150
+	$index   = isset($_GET['index']) ? $_GET['index'] : 0;
151
+	$delete  = isset($_GET['delete_too']) ? true : false;
152 152
 
153
-	switch( $_GET['action'] ) {
153
+	switch ($_GET['action']) {
154 154
 		case 'delete_item':
155
-			if ( ! empty( $post_id ) && ! empty( $name ) || empty( $index ) ) {
156
-				ppp_remove_scheduled_share( array( (int)$post_id, $name ) ); // Remove the item in cron
155
+			if ( ! empty($post_id) && ! empty($name) || empty($index)) {
156
+				ppp_remove_scheduled_share( array( (int) $post_id, $name ) ); // Remove the item in cron
157 157
 
158 158
 				// Remove the item from postmeta if it exists.
159 159
 				$current_post_meta = get_post_meta( $post_id, '_ppp_tweets', true );
160 160
 
161
-				if ( isset( $current_post_meta[$index] ) ) {
162
-					unset( $current_post_meta[$index] );
161
+				if (isset($current_post_meta[$index])) {
162
+					unset($current_post_meta[$index]);
163 163
 					update_post_meta( $post_id, '_ppp_tweets', $current_post_meta );
164 164
 				}
165 165
 
@@ -168,17 +168,17 @@  discard block
 block discarded – undo
168 168
 			}
169 169
 			break;
170 170
 		case 'share_now':
171
-			if ( ! empty( $post_id ) && ! empty( $name ) ) {
171
+			if ( ! empty($post_id) && ! empty($name)) {
172 172
 				ppp_share_post( $post_id, $name );
173 173
 
174
-				if ( $delete && ! empty( $index ) ) {
175
-					ppp_remove_scheduled_share( array( (int)$post_id, $name ) ); // Remove the item in cron
174
+				if ($delete && ! empty($index)) {
175
+					ppp_remove_scheduled_share( array( (int) $post_id, $name ) ); // Remove the item in cron
176 176
 
177 177
 					// Remove the item from postmeta if it exists.
178 178
 					$current_post_meta = get_post_meta( $post_id, '_ppp_tweets', true );
179 179
 
180
-					if ( isset( $current_post_meta[$index] ) ) {
181
-						unset( $current_post_meta[$index] );
180
+					if (isset($current_post_meta[$index])) {
181
+						unset($current_post_meta[$index]);
182 182
 						update_post_meta( $post_id, '_ppp_tweets', $current_post_meta );
183 183
 					}
184 184
 
Please login to merge, or discard this patch.
includes/admin/admin-ajax.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) {
4
+if ( ! defined( 'ABSPATH' )) {
5 5
 	exit;
6 6
 }
7 7
 
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 	$date = sanitize_text_field( $_POST['date'] );
11 11
 	$time = sanitize_text_field( $_POST['time'] );
12 12
 
13
-	$offset = (int) -( get_option( 'gmt_offset' ) ); // Make the timestamp in the users' timezone, b/c that makes more sense
13
+	$offset = (int) -(get_option( 'gmt_offset' )); // Make the timestamp in the users' timezone, b/c that makes more sense
14 14
 
15 15
 	$share_time = explode( ':', $time );
16 16
 
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	$minutes = (int) substr( $share_time[1], 0, 2 );
19 19
 	$ampm = strtolower( substr( $share_time[1], -2 ) );
20 20
 
21
-	if ( $ampm == 'pm' && $hours != 12 ) {
21
+	if ($ampm == 'pm' && $hours != 12) {
22 22
 		$hours = $hours + 12;
23 23
 	}
24 24
 
25
-	if ( $ampm == 'am' && $hours == 12 ) {
25
+	if ($ampm == 'am' && $hours == 12) {
26 26
 		$hours = 00;
27 27
 	}
28 28
 
Please login to merge, or discard this patch.
includes/admin/admin-pages.php 2 patches
Braces   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -176,8 +176,11 @@  discard block
 block discarded – undo
176 176
 							<?php $post = wp_get_recent_posts( array( 'numberposts' => 1 ) ); ?>
177 177
 							<?php if( count( $post ) > 0 ): ?>
178 178
 								<code><?php echo ppp_generate_link( $post[0]['ID'], 'sharedate_1_' . $post[0]['ID'], false ); ?></code></small>
179
-							<?php else: ?>
180
-								<em><?php _e( 'No posts available to generate link from.', 'ppp-txt' ); ?></em>
179
+							<?php else {
180
+	: ?>
181
+								<em><?php _e( 'No posts available to generate link from.', 'ppp-txt' );
182
+}
183
+?></em>
181 184
 							<?php endif; ?>
182 185
 						</p>
183 186
 					</td>
@@ -384,8 +387,14 @@  discard block
 block discarded – undo
384 387
 	Use Cookies:              <?php echo ini_get( 'session.use_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
385 388
 	Use Only Cookies:         <?php echo ini_get( 'session.use_only_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
386 389
 
387
-	UPLOAD_MAX_FILESIZE:      <?php if ( function_exists( 'phpversion' ) ) echo ini_get( 'upload_max_filesize' ); ?><?php echo "\n"; ?>
388
-	POST_MAX_SIZE:            <?php if ( function_exists( 'phpversion' ) ) echo ini_get( 'post_max_size' ); ?><?php echo "\n"; ?>
390
+	UPLOAD_MAX_FILESIZE:      <?php if ( function_exists( 'phpversion' ) ) {
391
+	echo ini_get( 'upload_max_filesize' );
392
+}
393
+?><?php echo "\n"; ?>
394
+	POST_MAX_SIZE:            <?php if ( function_exists( 'phpversion' ) ) {
395
+	echo ini_get( 'post_max_size' );
396
+}
397
+?><?php echo "\n"; ?>
389 398
 	WordPress Memory Limit:   <?php echo WP_MEMORY_LIMIT; ?><?php echo "\n"; ?>
390 399
 	DISPLAY ERRORS:           <?php echo ( ini_get( 'display_errors' ) ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A'; ?><?php echo "\n"; ?>
391 400
 	FSOCKOPEN:                <?php echo ( function_exists( 'fsockopen' ) ) ? __( 'Your server supports fsockopen.', 'ppp-txt' ) : __( 'Your server does not support fsockopen.', 'ppp-txt' ); ?><?php echo "\n"; ?>
Please login to merge, or discard this patch.
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) {
4
+if ( ! defined( 'ABSPATH' )) {
5 5
 	exit;
6 6
 }
7 7
 
@@ -26,18 +26,18 @@  discard block
 block discarded – undo
26 26
 						<?php _e( 'License Key', 'ppp-txt' ); ?><br /><span style="font-size: x-small;"><?php _e( 'Enter your license key', 'ppp-txt' ); ?></span>
27 27
 					</th>
28 28
 					<td>
29
-						<input id="ppp_license_key" name="_ppp_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $license ); ?>" /><?php if( $status !== false && $status == 'valid' ) { ?>
29
+						<input id="ppp_license_key" name="_ppp_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $license ); ?>" /><?php if ($status !== false && $status == 'valid') { ?>
30 30
 						<span style="color:green;">&nbsp;<?php _e( 'active', 'ppp-txt' ); ?></span><?php } ?>
31 31
 					</td>
32 32
 				</tr>
33 33
 
34
-				<?php if( false !== $license ) { ?>
34
+				<?php if (false !== $license) { ?>
35 35
 					<tr valign="top">
36 36
 						<th scope="row" valign="top">
37 37
 							<?php _e( 'Activate License', 'ppp-txt' ); ?>
38 38
 						</th>
39 39
 						<td>
40
-							<?php if( $status !== false && $status == 'valid' ) { ?>
40
+							<?php if ($status !== false && $status == 'valid') { ?>
41 41
 								<?php wp_nonce_field( 'ppp_deactivate_nonce', 'ppp_deactivate_nonce' ); ?>
42 42
 								<input type="submit" class="button-secondary" name="ppp_license_deactivate" value="<?php _e( 'Deactivate License', 'ppp-txt' ); ?>"/>
43 43
 							<?php } else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 						<span style="font-size: x-small;"><a href="#" onclick="jQuery('#ppp-text-helper').toggle(); return false;"><?php _e( 'Default Text Tips', 'ppp-txt' ); ?></a></span>
54 54
 					</th>
55 55
 					<td>
56
-						<?php $default_text = isset( $ppp_options['default_text'] ) ? $ppp_options['default_text'] : ''; ?>
56
+						<?php $default_text = isset($ppp_options['default_text']) ? $ppp_options['default_text'] : ''; ?>
57 57
 						<input type="text" class="regular-text" name="ppp_options[default_text]" value="<?php echo $default_text; ?>" placeholder="Post Title will be used if empty" size="50" />
58 58
 						<p id="ppp-text-helper" style="display: none">
59 59
 							<small>
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 							<br />
64 64
 							<?php _e( 'Possible Replacements:', 'ppp-txt' ); ?>
65 65
 							<br />
66
-							<?php foreach( ppp_get_text_tokens() as $token ): ?>
66
+							<?php foreach (ppp_get_text_tokens() as $token): ?>
67 67
 								<code>{<?php echo $token['token']; ?>}</code> - <?php echo $token['description']; ?><br />
68 68
 							<?php endforeach; ?>
69 69
 							</small>
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 					<th scope="row"><?php _e( 'Post Types', 'ppp-txt' ); ?><br /><span style="font-size: x-small;"><?php _e( 'What post types do you want to schedule for?', 'ppp-txt' ); ?></span></th>
76 76
 					<td>
77 77
 						<?php $post_types = ppp_supported_post_types(); ?>
78
-						<?php foreach ( $post_types as $post_type => $type_data ): ?>
79
-							<?php $value = ( isset( $ppp_options['post_types'] ) && isset( $ppp_options['post_types'][$post_type] ) ) ? true : false; ?>
78
+						<?php foreach ($post_types as $post_type => $type_data): ?>
79
+							<?php $value = (isset($ppp_options['post_types']) && isset($ppp_options['post_types'][$post_type])) ? true : false; ?>
80 80
 							<input type="checkbox" name="ppp_options[post_types][<?php echo $post_type; ?>]" value="1" id="<?php echo $post_type; ?>" <?php checked( true, $value, true ); ?> />&nbsp;
81 81
 							<label for="<?php echo $post_type; ?>"><?php echo $type_data->labels->name; ?></label></br />
82 82
 						<?php endforeach; ?>
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 					<th scope="row"><?php _e( 'Advanced', 'ppp-txt' ); ?><br /><span style="font-size: x-small;"><?php _e( 'Tools for troubleshooting and advanced usage', 'ppp-txt' ); ?></span></th>
88 88
 					<td>
89 89
 						<p>
90
-						<?php $debug_enabled = isset( $ppp_options['enable_debug'] ) ? true : false; ?>
90
+						<?php $debug_enabled = isset($ppp_options['enable_debug']) ? true : false; ?>
91 91
 						<input type="checkbox" name="ppp_options[enable_debug]" <?php checked( true, $debug_enabled, true ); ?> value="1" /> <?php _e( 'Enable Debug', 'ppp-txt' ); ?>
92 92
 						</p>
93 93
 						<p>
94
-						<?php $delete_on_uninstall = isset( $ppp_options['delete_on_uninstall'] ) ? true : false; ?>
94
+						<?php $delete_on_uninstall = isset($ppp_options['delete_on_uninstall']) ? true : false; ?>
95 95
 						<input type="checkbox" name="ppp_options[delete_on_uninstall]" <?php checked( true, $delete_on_uninstall, true ); ?> value="1" /> <?php _e( 'Delete All Data On Uninstall', 'ppp-txt' ); ?>
96 96
 						</p>
97 97
 					</td>
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			<?php wp_nonce_field( 'ppp-share-settings' ); ?>
127 127
 			<h3><?php _e( 'Social Media Accounts', 'ppp-txt' ); ?></h3>
128 128
 			<?php
129
-			require_once PPP_PATH . 'includes/admin/class-accounts-table.php';
129
+			require_once PPP_PATH.'includes/admin/class-accounts-table.php';
130 130
 
131 131
 			$accounts_table = new PPP_Accounts_Table();
132 132
 			$accounts_table->prepare_items();
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 			$accounts_table->display();
135 135
 			?>
136 136
 			<table class="form-table">
137
-				<?php $analytics_option = isset( $ppp_share_settings['analytics'] ) ? $ppp_share_settings['analytics'] : 0; ?>
137
+				<?php $analytics_option = isset($ppp_share_settings['analytics']) ? $ppp_share_settings['analytics'] : 0; ?>
138 138
 				<tr valign="top">
139 139
 					<th scope="row" valign="top">
140 140
 						<?php _e( 'Analytics', 'ppp-txt' ); ?></span>
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 						<hr />
174 174
 						<small><?php _e( 'Here is an example of what your link will look like', 'ppp-txt' ); ?>: <br />
175 175
 							<?php $post = wp_get_recent_posts( array( 'numberposts' => 1 ) ); ?>
176
-							<?php if( count( $post ) > 0 ): ?>
177
-								<code><?php echo ppp_generate_link( $post[0]['ID'], 'sharedate_1_' . $post[0]['ID'], false ); ?></code></small>
176
+							<?php if (count( $post ) > 0): ?>
177
+								<code><?php echo ppp_generate_link( $post[0]['ID'], 'sharedate_1_'.$post[0]['ID'], false ); ?></code></small>
178 178
 							<?php else: ?>
179 179
 								<em><?php _e( 'No posts available to generate link from.', 'ppp-txt' ); ?></em>
180 180
 							<?php endif; ?>
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
 				</tr>
184 184
 
185 185
 				<?php
186
-				$tw_sop = ! empty( $ppp_share_settings['twitter']['share_on_publish'] ) ? true : false;
187
-				$fb_sop = ! empty( $ppp_share_settings['facebook']['share_on_publish'] ) ? true : false;
188
-				$li_sop = ! empty( $ppp_share_settings['linkedin']['share_on_publish'] ) ? true : false;
186
+				$tw_sop = ! empty($ppp_share_settings['twitter']['share_on_publish']) ? true : false;
187
+				$fb_sop = ! empty($ppp_share_settings['facebook']['share_on_publish']) ? true : false;
188
+				$li_sop = ! empty($ppp_share_settings['linkedin']['share_on_publish']) ? true : false;
189 189
 				?>
190 190
 				<tr valign="top">
191 191
 					<th scope="row" valign="top">
@@ -193,21 +193,21 @@  discard block
 block discarded – undo
193 193
 						<small><em><?php _e( 'Enabled sharing on publish by default', 'ppp-txt' ); ?></em></small>
194 194
 					</th>
195 195
 					<td id="ppp-share-on-publish-wrapper">
196
-						<?php if ( ppp_twitter_enabled() ) : ?>
196
+						<?php if (ppp_twitter_enabled()) : ?>
197 197
 						<p>
198 198
 							<input type="checkbox" id="twitter-share-on-publish" value="1" <?php checked( true, $tw_sop, true ); ?> name="ppp_share_settings[twitter][share_on_publish]" />
199 199
 							<label for="twitter-share-on-publish"><?php _e( 'Twitter', 'ppp-txt' ); ?></label>
200 200
 						</p>
201 201
 						<?php endif; ?>
202 202
 
203
-						<?php if ( ppp_facebook_enabled() ) : ?>
203
+						<?php if (ppp_facebook_enabled()) : ?>
204 204
 						<p>
205 205
 							<input type="checkbox" id="facebook-share-on-publish" value="1" <?php checked( true, $fb_sop, true ); ?> name="ppp_share_settings[facebook][share_on_publish]" />
206 206
 							<label for="facebook-share-on-publish"><?php _e( 'Facebook', 'ppp-txt' ); ?></label>
207 207
 						</p>
208 208
 						<?php endif; ?>
209 209
 
210
-						<?php if ( ppp_linkedin_enabled() ) : ?>
210
+						<?php if (ppp_linkedin_enabled()) : ?>
211 211
 						<p>
212 212
 							<input type="checkbox" id="linkedin-share-on-publish" value="1" <?php checked( true, $li_sop, true ); ?> name="ppp_share_settings[linkedin][share_on_publish]" />
213 213
 							<label for="linkedin-share-on-publish"><?php _e( 'LinkedIn', 'ppp-txt' ); ?></label>
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 				</tr>
235 235
 
236 236
 				<?php
237
-				$shortener = isset( $ppp_share_settings['shortener'] ) ? $ppp_share_settings['shortener'] : false;
237
+				$shortener = isset($ppp_share_settings['shortener']) ? $ppp_share_settings['shortener'] : false;
238 238
 				?>
239 239
 				<tr valign="top">
240 240
 					<th scope="row" valign="top">
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 								<?php do_action( 'ppp_url_shorteners', $shortener ); ?>
248 248
 							</select>
249 249
 						</p>
250
-						<?php if ( $shortener ) : ?>
251
-							<?php do_action( 'ppp_shortener_settings-' . $shortener ); ?>
250
+						<?php if ($shortener) : ?>
251
+							<?php do_action( 'ppp_shortener_settings-'.$shortener ); ?>
252 252
 						<?php endif; ?>
253 253
 					</td>
254 254
 				</tr>
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 		.wp-list-table .column-content { width: 50%; }
282 282
 	</style>
283 283
 	<?php
284
-	require_once PPP_PATH . 'includes/admin/class-schedule-table.php';
284
+	require_once PPP_PATH.'includes/admin/class-schedule-table.php';
285 285
 	$schedule_table = new PPP_Schedule_Table();
286 286
 	$schedule_table->prepare_items();
287 287
 	?>
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		<div id="icon-options-general" class="icon32"></div><h1><?php _e( 'Post Promoter Pro - Scheduled Shares', 'ppp-txt' ); ?></h1>
290 290
 		<?php $schedule_table->display() ?>
291 291
 	</div>
292
-	<?php if ( ppp_is_shortener_enabled() ): ?>
292
+	<?php if (ppp_is_shortener_enabled()): ?>
293 293
 	<p>
294 294
 		<small><?php _e( 'NOTICE: Schedule view does not show shortened links, they will be shortened at the time of sharing', 'ppp-txt' ); ?></small>
295 295
 	</p>
@@ -307,24 +307,24 @@  discard block
 block discarded – undo
307 307
 	<div class="wrap">
308 308
 		<div id="icon-options-general" class="icon32"></div><h1><?php _e( 'Post Promoter Pro - System Info', 'ppp-txt' ); ?></h1>
309 309
 		<textarea style="font-family: Menlo, Monaco, monospace; white-space: pre" onclick="this.focus();this.select()" readonly cols="150" rows="35">
310
-	SITE_URL:                 <?php echo site_url() . "\n"; ?>
311
-	HOME_URL:                 <?php echo home_url() . "\n"; ?>
310
+	SITE_URL:                 <?php echo site_url()."\n"; ?>
311
+	HOME_URL:                 <?php echo home_url()."\n"; ?>
312 312
 
313
-	PPP Version:             <?php echo PPP_VERSION . "\n"; ?>
314
-	WordPress Version:        <?php echo get_bloginfo( 'version' ) . "\n"; ?>
313
+	PPP Version:             <?php echo PPP_VERSION."\n"; ?>
314
+	WordPress Version:        <?php echo get_bloginfo( 'version' )."\n"; ?>
315 315
 
316 316
 	PPP SETTINGS:
317 317
 	<?php
318
-	foreach ( $ppp_options as $name => $value ) {
319
-	if ( $value == false ) {
318
+	foreach ($ppp_options as $name => $value) {
319
+	if ($value == false) {
320 320
 		$value = 'false';
321 321
 	}
322 322
 
323
-	if ( $value == '1' ) {
323
+	if ($value == '1') {
324 324
 		$value = 'true';
325 325
 	}
326 326
 
327
-	echo $name . ': ' . maybe_serialize( $value ) . "\n\t";
327
+	echo $name.': '.maybe_serialize( $value )."\n\t";
328 328
 	}
329 329
 	?>
330 330
 
@@ -333,61 +333,61 @@  discard block
 block discarded – undo
333 333
 	$plugins = get_plugins();
334 334
 	$active_plugins = get_option( 'active_plugins', array() );
335 335
 
336
-	foreach ( $plugins as $plugin_path => $plugin ) {
336
+	foreach ($plugins as $plugin_path => $plugin) {
337 337
 		// If the plugin isn't active, don't show it.
338
-		if ( ! in_array( $plugin_path, $active_plugins ) ) {
338
+		if ( ! in_array( $plugin_path, $active_plugins )) {
339 339
 			continue;
340 340
 		}
341 341
 
342
-		echo $plugin['Name']; ?>: <?php echo $plugin['Version'] ."\n\t";
342
+		echo $plugin['Name']; ?>: <?php echo $plugin['Version']."\n\t";
343 343
 
344 344
 	}
345 345
 	?>
346 346
 
347 347
 	CURRENT THEME:
348 348
 	<?php
349
-	if ( get_bloginfo( 'version' ) < '3.4' ) {
350
-		$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
351
-		echo $theme_data['Name'] . ': ' . $theme_data['Version'];
349
+	if (get_bloginfo( 'version' ) < '3.4') {
350
+		$theme_data = get_theme_data( get_stylesheet_directory().'/style.css' );
351
+		echo $theme_data['Name'].': '.$theme_data['Version'];
352 352
 	} else {
353 353
 		$theme_data = wp_get_theme();
354
-		echo $theme_data->Name . ': ' . $theme_data->Version;
354
+		echo $theme_data->Name.': '.$theme_data->Version;
355 355
 	}
356 356
 	?>
357 357
 
358 358
 
359
-	Multi-site:               <?php echo is_multisite() ? 'Yes' . "\n" : 'No' . "\n" ?>
359
+	Multi-site:               <?php echo is_multisite() ? 'Yes'."\n" : 'No'."\n" ?>
360 360
 
361 361
 	ADVANCED INFO:
362
-	PHP Version:              <?php echo PHP_VERSION . "\n"; ?>
363
-	MySQL Version:            <?php echo $wpdb->db_version() . "\n"; ?>
364
-	Web Server Info:          <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
362
+	PHP Version:              <?php echo PHP_VERSION."\n"; ?>
363
+	MySQL Version:            <?php echo $wpdb->db_version()."\n"; ?>
364
+	Web Server Info:          <?php echo $_SERVER['SERVER_SOFTWARE']."\n"; ?>
365 365
 
366
-	PHP Memory Limit:         <?php echo ini_get( 'memory_limit' ) . "\n"; ?>
367
-	PHP Post Max Size:        <?php echo ini_get( 'post_max_size' ) . "\n"; ?>
368
-	PHP Time Limit:           <?php echo ini_get( 'max_execution_time' ) . "\n"; ?>
366
+	PHP Memory Limit:         <?php echo ini_get( 'memory_limit' )."\n"; ?>
367
+	PHP Post Max Size:        <?php echo ini_get( 'post_max_size' )."\n"; ?>
368
+	PHP Time Limit:           <?php echo ini_get( 'max_execution_time' )."\n"; ?>
369 369
 
370
-	WP_DEBUG:                 <?php echo defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n" ?>
371
-	SCRIPT_DEBUG:             <?php echo defined( 'SCRIPT_DEBUG' ) ? SCRIPT_DEBUG ? 'Enabled' . "\n" : 'Disabled' . "\n" : 'Not set' . "\n" ?>
370
+	WP_DEBUG:                 <?php echo defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled'."\n" : 'Disabled'."\n" : 'Not set'."\n" ?>
371
+	SCRIPT_DEBUG:             <?php echo defined( 'SCRIPT_DEBUG' ) ? SCRIPT_DEBUG ? 'Enabled'."\n" : 'Disabled'."\n" : 'Not set'."\n" ?>
372 372
 
373
-	WP Table Prefix:          <?php echo "Length: ". strlen( $wpdb->prefix ); echo " Status:"; if ( strlen( $wpdb->prefix )>16 ) {echo " ERROR: Too Long";} else {echo " Acceptable";} echo "\n"; ?>
373
+	WP Table Prefix:          <?php echo "Length: ".strlen( $wpdb->prefix ); echo " Status:"; if (strlen( $wpdb->prefix ) > 16) {echo " ERROR: Too Long"; } else {echo " Acceptable"; } echo "\n"; ?>
374 374
 
375
-	Show On Front:            <?php echo get_option( 'show_on_front' ) . "\n" ?>
376
-	Page On Front:            <?php $id = get_option( 'page_on_front' ); echo get_the_title( $id ) . ' #' . $id . "\n" ?>
377
-	Page For Posts:           <?php $id = get_option( 'page_on_front' ); echo get_the_title( $id ) . ' #' . $id . "\n" ?>
375
+	Show On Front:            <?php echo get_option( 'show_on_front' )."\n" ?>
376
+	Page On Front:            <?php $id = get_option( 'page_on_front' ); echo get_the_title( $id ).' #'.$id."\n" ?>
377
+	Page For Posts:           <?php $id = get_option( 'page_on_front' ); echo get_the_title( $id ).' #'.$id."\n" ?>
378 378
 
379
-	Session:                  <?php echo isset( $_SESSION ) ? 'Enabled' : 'Disabled'; ?><?php echo "\n"; ?>
379
+	Session:                  <?php echo isset($_SESSION) ? 'Enabled' : 'Disabled'; ?><?php echo "\n"; ?>
380 380
 	Session Name:             <?php echo esc_html( ini_get( 'session.name' ) ); ?><?php echo "\n"; ?>
381 381
 	Cookie Path:              <?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?><?php echo "\n"; ?>
382 382
 	Save Path:                <?php echo esc_html( ini_get( 'session.save_path' ) ); ?><?php echo "\n"; ?>
383 383
 	Use Cookies:              <?php echo ini_get( 'session.use_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
384 384
 	Use Only Cookies:         <?php echo ini_get( 'session.use_only_cookies' ) ? 'On' : 'Off'; ?><?php echo "\n"; ?>
385 385
 
386
-	UPLOAD_MAX_FILESIZE:      <?php if ( function_exists( 'phpversion' ) ) echo ini_get( 'upload_max_filesize' ); ?><?php echo "\n"; ?>
387
-	POST_MAX_SIZE:            <?php if ( function_exists( 'phpversion' ) ) echo ini_get( 'post_max_size' ); ?><?php echo "\n"; ?>
386
+	UPLOAD_MAX_FILESIZE:      <?php if (function_exists( 'phpversion' )) echo ini_get( 'upload_max_filesize' ); ?><?php echo "\n"; ?>
387
+	POST_MAX_SIZE:            <?php if (function_exists( 'phpversion' )) echo ini_get( 'post_max_size' ); ?><?php echo "\n"; ?>
388 388
 	WordPress Memory Limit:   <?php echo WP_MEMORY_LIMIT; ?><?php echo "\n"; ?>
389
-	DISPLAY ERRORS:           <?php echo ( ini_get( 'display_errors' ) ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A'; ?><?php echo "\n"; ?>
390
-	FSOCKOPEN:                <?php echo ( function_exists( 'fsockopen' ) ) ? __( 'Your server supports fsockopen.', 'ppp-txt' ) : __( 'Your server does not support fsockopen.', 'ppp-txt' ); ?><?php echo "\n"; ?>
389
+	DISPLAY ERRORS:           <?php echo (ini_get( 'display_errors' )) ? 'On ('.ini_get( 'display_errors' ).')' : 'N/A'; ?><?php echo "\n"; ?>
390
+	FSOCKOPEN:                <?php echo (function_exists( 'fsockopen' )) ? __( 'Your server supports fsockopen.', 'ppp-txt' ) : __( 'Your server does not support fsockopen.', 'ppp-txt' ); ?><?php echo "\n"; ?>
391 391
 		</textarea>
392 392
 	</div>
393 393
 	<?php
Please login to merge, or discard this patch.
includes/admin/class-accounts-table.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) {
4
+if ( ! defined( 'ABSPATH' )) {
5 5
 	exit;
6 6
 }
7 7
 
8
-if ( ! class_exists( 'WP_List_Table' ) ) {
9
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
8
+if ( ! class_exists( 'WP_List_Table' )) {
9
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
10 10
 }
11 11
 
12 12
 /**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @return string              The Content to display
43 43
 	 */
44 44
 	public function column_default( $item, $column_name ) {
45
-		return $item[ $column_name ];
45
+		return $item[$column_name];
46 46
 	}
47 47
 
48 48
 	/**
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 
75 75
 		$accounts = apply_filters( 'ppp_register_social_service', array() );
76 76
 
77
-		foreach ( $accounts as $account ) {
77
+		foreach ($accounts as $account) {
78 78
 			$data[$account] = array(
79
-				'icon'    => apply_filters( 'ppp_account_list_icon-' . $account, '' ),
80
-				'avatar'  => apply_filters( 'ppp_account_list_avatar-' . $account, '' ),
81
-				'name'    => apply_filters( 'ppp_account_list_name-' . $account, '' ),
82
-				'actions' => apply_filters( 'ppp_account_list_actions-' . $account, '' ),
83
-				'extras'  => apply_filters( 'ppp_account_list_extras-' . $account, '' ),
79
+				'icon'    => apply_filters( 'ppp_account_list_icon-'.$account, '' ),
80
+				'avatar'  => apply_filters( 'ppp_account_list_avatar-'.$account, '' ),
81
+				'name'    => apply_filters( 'ppp_account_list_name-'.$account, '' ),
82
+				'actions' => apply_filters( 'ppp_account_list_actions-'.$account, '' ),
83
+				'extras'  => apply_filters( 'ppp_account_list_extras-'.$account, '' ),
84 84
 			);
85 85
 		}
86 86
 
Please login to merge, or discard this patch.
includes/admin/do-upgrades.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( !defined( 'ABSPATH' ) ) exit;
13
+if ( ! defined( 'ABSPATH' )) exit;
14 14
 
15 15
 /**
16 16
  * Render Upgrades Screen
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
  * @return void
20 20
 */
21 21
 function ppp_upgrades_screen() {
22
-	$action = isset( $_GET['ppp-upgrade'] ) ? sanitize_text_field( $_GET['ppp-upgrade'] ) : '';
23
-	$step   = isset( $_GET['step'] )        ? absint( $_GET['step'] )                     : 1;
24
-	$total  = isset( $_GET['total'] )       ? absint( $_GET['total'] )                    : false;
25
-	$custom = isset( $_GET['custom'] )      ? absint( $_GET['custom'] )                   : 0;
26
-	$number = isset( $_GET['number'] )      ? absint( $_GET['number'] )                   : 100;
27
-	$steps  = round( ( $total / $number ), 0 );
22
+	$action = isset($_GET['ppp-upgrade']) ? sanitize_text_field( $_GET['ppp-upgrade'] ) : '';
23
+	$step   = isset($_GET['step']) ? absint( $_GET['step'] ) : 1;
24
+	$total  = isset($_GET['total']) ? absint( $_GET['total'] ) : false;
25
+	$custom = isset($_GET['custom']) ? absint( $_GET['custom'] ) : 0;
26
+	$number = isset($_GET['number']) ? absint( $_GET['number'] ) : 100;
27
+	$steps  = round( ($total / $number), 0 );
28 28
 
29 29
 	$doing_upgrade_args = array(
30 30
 		'page'        => 'ppp-upgrades',
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	);
37 37
 
38 38
 	update_option( 'ppp_doing_upgrade', $doing_upgrade_args );
39
-	if ( $step > $steps ) {
39
+	if ($step > $steps) {
40 40
 		// Prevent a weird case where the estimate was off. Usually only a couple.
41 41
 		$steps = $step;
42 42
 	}
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	<div class="wrap">
45 45
 		<h1><?php _e( 'Post Promoter Pro - Upgrades', 'ppp-txt' ); ?></h1>
46 46
 
47
-		<?php if( ! empty( $action ) ) : ?>
47
+		<?php if ( ! empty($action)) : ?>
48 48
 
49 49
 			<div id="ppp-upgrade-status">
50 50
 				<p><?php _e( 'The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished.', 'ppp-txt' ); ?></p>
51 51
 
52
-				<?php if( ! empty( $total ) ) : ?>
52
+				<?php if ( ! empty($total)) : ?>
53 53
 					<p><strong><?php printf( __( 'Step %d of approximately %d running', 'ppp-txt' ), $step, $steps ); ?></strong></p>
54 54
 				<?php endif; ?>
55 55
 			</div>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly
13
-if ( !defined( 'ABSPATH' ) ) exit;
13
+if ( !defined( 'ABSPATH' ) ) {
14
+	exit;
15
+}
14 16
 
15 17
 /**
16 18
  * Render Upgrades Screen
@@ -57,11 +59,14 @@  discard block
 block discarded – undo
57 59
 				setTimeout(function() { document.location.href = "index.php?ppp_action=<?php echo $action; ?>&step=<?php echo $step; ?>&total=<?php echo $total; ?>&custom=<?php echo $custom; ?>"; }, 250);
58 60
 			</script>
59 61
 
60
-		<?php else : ?>
62
+		<?php else {
63
+	: ?>
61 64
 
62 65
 			<div id="ppp-upgrade-status">
63 66
 				<p>
64
-					<?php _e( 'The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished.', 'ppp-txt' ); ?>
67
+					<?php _e( 'The upgrade process has started, please be patient. This could take several minutes. You will be automatically redirected when the upgrade is finished.', 'ppp-txt' );
68
+}
69
+?>
65 70
 				</p>
66 71
 			</div>
67 72
 			<script type="text/javascript">
Please login to merge, or discard this patch.
includes/admin/meta-boxes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) {
4
+if ( ! defined( 'ABSPATH' )) {
5 5
 	exit;
6 6
 }
7 7
 
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 function ppp_register_meta_boxes() {
13 13
 	global $post, $ppp_options;
14 14
 
15
-	if ( !isset( $ppp_options['post_types'] ) || !is_array( $ppp_options['post_types'] ) ) {
15
+	if ( ! isset($ppp_options['post_types']) || ! is_array( $ppp_options['post_types'] )) {
16 16
 		return;
17 17
 	}
18 18
 
19
-	foreach ( $ppp_options['post_types'] as $post_type => $value ) {
19
+	foreach ($ppp_options['post_types'] as $post_type => $value) {
20 20
 		add_meta_box( 'ppp_schedule_metabox', 'Post Promoter Pro', 'ppp_schedule_callback', $post_type, 'normal', 'high' );
21 21
 	}
22 22
 }
Please login to merge, or discard this patch.
includes/admin/welcome.php 1 patch
Spacing   +30 added lines, -30 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
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @since 1.2
36 36
 	 */
37 37
 	public function __construct() {
38
-		add_action( 'admin_menu', array( $this, 'admin_menus') );
38
+		add_action( 'admin_menu', array( $this, 'admin_menus' ) );
39 39
 		add_action( 'admin_head', array( $this, 'admin_head' ) );
40
-		add_action( 'admin_init', array( $this, 'welcome'    ) );
40
+		add_action( 'admin_init', array( $this, 'welcome' ) );
41 41
 	}
42 42
 
43 43
 	/**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		remove_submenu_page( 'index.php', 'ppp-getting-started' );
82 82
 
83 83
 		// Badge for welcome page
84
-		$badge_url = PPP_URL . 'includes/images/ppp-badge.png';
84
+		$badge_url = PPP_URL.'includes/images/ppp-badge.png';
85 85
 		?>
86 86
 		<style type="text/css" media="screen">
87 87
 		/*<![CDATA[*/
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 * @return void
122 122
 	 */
123 123
 	public function tabs() {
124
-		$selected = isset( $_GET['page'] ) ? $_GET['page'] : 'ppp-about';
124
+		$selected = isset($_GET['page']) ? $_GET['page'] : 'ppp-about';
125 125
 		?>
126 126
 		<h1 class="nav-tab-wrapper">
127 127
 			<a class="nav-tab <?php echo $selected == 'ppp-about' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'ppp-about' ), 'index.php' ) ) ); ?>">
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 * @return void
140 140
 	 */
141 141
 	public function about_screen() {
142
-		list( $display_version ) = explode( '-', PPP_VERSION );
142
+		list($display_version) = explode( '-', PPP_VERSION );
143 143
 		?>
144 144
 		<div class="wrap about-wrap">
145 145
 			<h1><?php printf( __( 'Post Promoter Pro %s', 'ppp-txt' ), $display_version ); ?></h1>
@@ -149,59 +149,59 @@  discard block
 block discarded – undo
149 149
 			<?php $this->tabs(); ?>
150 150
 
151 151
 			<div class="changelog">
152
-				<h3><?php _e( 'Free Form Tweet Scheduling', 'ppp-txt' );?></h3>
152
+				<h3><?php _e( 'Free Form Tweet Scheduling', 'ppp-txt' ); ?></h3>
153 153
 
154 154
 				<div class="feature-section">
155 155
 
156
-					<img src="<?php echo PPP_URL . '/includes/images/screenshots/free-form-tweets.jpg'; ?>" class="ppp-welcome-screenshots"/>
156
+					<img src="<?php echo PPP_URL.'/includes/images/screenshots/free-form-tweets.jpg'; ?>" class="ppp-welcome-screenshots"/>
157 157
 
158
-					<h4><?php _e( 'More effective, and user friendly.', 'ppp-txt' );?></h4>
159
-					<p><?php _e( 'No longer do you have to figure out what "Day 1" means. With free form scheduling, you can now create Tweets, days, weeks, or months in the future. Even multiples a day.', 'ppp-txt' );?></p>
160
-					<p><?php _e( 'Have an old post that you want to promote again? No problem, just go back and add another Scheduled Tweet to the list!', 'ppp-txt' );?></p>
158
+					<h4><?php _e( 'More effective, and user friendly.', 'ppp-txt' ); ?></h4>
159
+					<p><?php _e( 'No longer do you have to figure out what "Day 1" means. With free form scheduling, you can now create Tweets, days, weeks, or months in the future. Even multiples a day.', 'ppp-txt' ); ?></p>
160
+					<p><?php _e( 'Have an old post that you want to promote again? No problem, just go back and add another Scheduled Tweet to the list!', 'ppp-txt' ); ?></p>
161 161
 
162 162
 				</div>
163 163
 			</div>
164 164
 
165 165
 			<div class="changelog">
166
-				<h3><?php _e( 'Twitter Cards Support', 'ppp-txt' );?></h3>
166
+				<h3><?php _e( 'Twitter Cards Support', 'ppp-txt' ); ?></h3>
167 167
 
168 168
 				<div class="feature-section">
169 169
 
170
-					<img src="<?php echo PPP_URL . '/includes/images/screenshots/twitter-cards.jpg'; ?>" class="ppp-welcome-screenshots"/>
170
+					<img src="<?php echo PPP_URL.'/includes/images/screenshots/twitter-cards.jpg'; ?>" class="ppp-welcome-screenshots"/>
171 171
 
172
-					<h4><?php _e( 'Increased visibility on Twitter','ppp-txt' );?></h4>
173
-					<p><?php _e( 'Enable this feature if you want your Tweets to look the best they can.', 'ppp-txt' );?></p>
174
-					<p><?php _e( 'This is an opt-in setting, so if you have a plugin that already does this, no conflicts will arise upon upgrade.', 'ppp-txt' );?></p>
172
+					<h4><?php _e( 'Increased visibility on Twitter', 'ppp-txt' ); ?></h4>
173
+					<p><?php _e( 'Enable this feature if you want your Tweets to look the best they can.', 'ppp-txt' ); ?></p>
174
+					<p><?php _e( 'This is an opt-in setting, so if you have a plugin that already does this, no conflicts will arise upon upgrade.', 'ppp-txt' ); ?></p>
175 175
 
176 176
 				</div>
177 177
 			</div>
178 178
 
179 179
 			<div class="changelog">
180
-				<h3><?php _e( 'Variable Twitter Images', 'ppp-txt' );?></h3>
180
+				<h3><?php _e( 'Variable Twitter Images', 'ppp-txt' ); ?></h3>
181 181
 
182 182
 				<div class="feature-section">
183 183
 
184
-					<h4><?php _e( 'Change the image attached to each Tweet','ppp-txt' );?></h4>
185
-					<p><?php _e( 'Have a few rotating images you want to use for your scheduled Tweets? No problem, Version 2.2 supports changing this for every scheduled Tweet.', 'ppp-txt' );?></p>
184
+					<h4><?php _e( 'Change the image attached to each Tweet', 'ppp-txt' ); ?></h4>
185
+					<p><?php _e( 'Have a few rotating images you want to use for your scheduled Tweets? No problem, Version 2.2 supports changing this for every scheduled Tweet.', 'ppp-txt' ); ?></p>
186 186
 
187 187
 				</div>
188 188
 			</div>
189 189
 
190 190
 			<div class="changelog">
191
-				<h3><?php _e( 'Additional Updates', 'ppp-txt' );?></h3>
191
+				<h3><?php _e( 'Additional Updates', 'ppp-txt' ); ?></h3>
192 192
 
193 193
 				<div class="feature-section col three-col">
194 194
 					<div>
195
-						<h4><?php _e( 'Updated image sizes', 'ppp-txt' );?></h4>
196
-						<p><?php _e( 'Changed the optimal thumbnail image sizes to meet the 2015 network standards.', 'ppp-txt' );?></p>
195
+						<h4><?php _e( 'Updated image sizes', 'ppp-txt' ); ?></h4>
196
+						<p><?php _e( 'Changed the optimal thumbnail image sizes to meet the 2015 network standards.', 'ppp-txt' ); ?></p>
197 197
 
198
-						<h4><?php _e( 'CSS Updates', 'ppp-txt' );?></h4>
199
-						<p><?php _e( 'Fixed a conflict in the media library CSS.', 'ppp-txt' );?></p>
198
+						<h4><?php _e( 'CSS Updates', 'ppp-txt' ); ?></h4>
199
+						<p><?php _e( 'Fixed a conflict in the media library CSS.', 'ppp-txt' ); ?></p>
200 200
 					</div>
201 201
 
202 202
 					<div class="last-feature">
203
-						<h4><?php _e( 'Improved Facebook Token Refresh', 'ppp-txt' );?></h4>
204
-						<p><?php _e( 'Fixed a bug with the Facebook token refresh resetting the "Post As", dropdown.', 'ppp-txt' );?></p>
203
+						<h4><?php _e( 'Improved Facebook Token Refresh', 'ppp-txt' ); ?></h4>
204
+						<p><?php _e( 'Fixed a bug with the Facebook token refresh resetting the "Post As", dropdown.', 'ppp-txt' ); ?></p>
205 205
 					</div>
206 206
 				</div>
207 207
 			</div>
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 * @return void
222 222
 	 */
223 223
 	public function getting_started_screen() {
224
-		list( $display_version ) = explode( '-', PPP_VERSION );
224
+		list($display_version) = explode( '-', PPP_VERSION );
225 225
 		?>
226 226
 		<div class="wrap about-wrap">
227 227
 			<h1><?php printf( __( 'Welcome to Post Promoter Pro %s', 'ppp-txt' ), $display_version ); ?></h1>
@@ -247,12 +247,12 @@  discard block
 block discarded – undo
247 247
 	public function welcome() {
248 248
 
249 249
 		$version_level = explode( '.', PPP_VERSION );
250
-		if ( count( $version_level > 2 ) ) {
250
+		if (count( $version_level > 2 )) {
251 251
 			return;
252 252
 		}
253 253
 
254 254
 		// Bail if no activation redirect
255
-		if ( ! get_transient( '_ppp_activation_redirect' ) ) {
255
+		if ( ! get_transient( '_ppp_activation_redirect' )) {
256 256
 			return;
257 257
 		}
258 258
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 		delete_transient( '_ppp_activation_redirect' );
261 261
 
262 262
 		// Bail if activating from network, or bulk
263
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
263
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
264 264
 			return;
265 265
 		}
266 266
 
Please login to merge, or discard this patch.
includes/bitly-functions.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( ! defined( 'ABSPATH' ) ) {
4
+if ( ! defined( 'ABSPATH' )) {
5 5
 	exit;
6 6
 }
7 7
 
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 function ppp_bitly_enabled() {
13 13
 	global $ppp_social_settings;
14 14
 
15
-	if ( isset( $ppp_social_settings['bitly'] ) && !empty( $ppp_social_settings['bitly'] ) ) {
15
+	if (isset($ppp_social_settings['bitly']) && ! empty($ppp_social_settings['bitly'])) {
16 16
 		return true;
17 17
 	}
18 18
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	global $ppp_bitly_oauth, $ppp_social_settings;
38 38
 	?>
39 39
 	<p>
40
-		<?php if ( !ppp_bitly_enabled() ) : ?>
40
+		<?php if ( ! ppp_bitly_enabled()) : ?>
41 41
 		<form autocomplete="off">
42 42
 			<input id="bitly-username" name="ppp-bitly-username" autocomplete="off" type="text" value="" placeholder="Bit.ly Username" size="25" /><br />
43 43
 			<input id="bitly-password" name="ppp-bitly-password" autocomplete="off" type="password" value="" placeholder="Bit.ly Password" size="25" /><br />
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 			<input type="hidden" id="bitly-redirect-url" value="<?php echo admin_url( 'admin.php?page=ppp-social-settings' ); ?>" />
49 49
 		</form>
50 50
 		<?php endif; ?>
51
-		<?php if ( ppp_bitly_enabled() ) : ?>
51
+		<?php if (ppp_bitly_enabled()) : ?>
52 52
 			<div class="ppp-social-profile ppp-bitly-profile">
53 53
 				<img class="ppp-social-icon" src="<?php echo $ppp_social_settings['bitly']['avatar']; ?>" />
54 54
 				<div class="ppp-bitly-info">
@@ -72,15 +72,15 @@  discard block
 block discarded – undo
72 72
 function ppp_disconnect_bitly() {
73 73
 	global $ppp_social_settings;
74 74
 	$ppp_social_settings = get_option( 'ppp_social_settings' );
75
-	if ( isset( $ppp_social_settings['bitly'] ) ) {
76
-		unset( $ppp_social_settings['bitly'] );
75
+	if (isset($ppp_social_settings['bitly'])) {
76
+		unset($ppp_social_settings['bitly']);
77 77
 		update_option( 'ppp_social_settings', $ppp_social_settings );
78 78
 	}
79 79
 }
80 80
 add_action( 'ppp_disconnect-bitly', 'ppp_disconnect_bitly', 10 );
81 81
 
82 82
 function ppp_set_bitly_token_constants( $social_tokens ) {
83
-	if ( !empty( $social_tokens ) && property_exists( $social_tokens, 'bitly' ) ) {
83
+	if ( ! empty($social_tokens) && property_exists( $social_tokens, 'bitly' )) {
84 84
 		define( 'bitly_clientid', $social_tokens->bitly->client_id );
85 85
 		define( 'bitly_secret', $social_tokens->bitly->client_secret );
86 86
 	}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	$result = $ppp_bitly_oauth->ppp_make_bitly_link( $link );
99 99
 	$result = json_decode( $result, true );
100 100
 
101
-	if ( isset ( $result['status_code'] ) && $result['status_code'] == 200 ) {
101
+	if (isset ($result['status_code']) && $result['status_code'] == 200) {
102 102
 		return $result['data']['url'];
103 103
 	} else {
104 104
 		return $link;
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 	$url = 'https://api-ssl.bitly.com/oauth/access_token';
117 117
 	$username = $_POST['username'];
118 118
 	$password = $_POST['password'];
119
-	$headers = array( 'Authorization' => 'Basic ' . base64_encode( bitly_clientid . ':' . bitly_secret ) );
120
-	$body = 'grant_type=password&username=' . $username . '&password=' . $password;
119
+	$headers = array( 'Authorization' => 'Basic '.base64_encode( bitly_clientid.':'.bitly_secret ) );
120
+	$body = 'grant_type=password&username='.$username.'&password='.$password;
121 121
 	$result = wp_remote_post( $url, array( 'headers' => $headers, 'body' => $body ) );
122 122
 	$body = wp_remote_retrieve_body( $result );
123 123
 	$data = json_decode( $body );
124 124
 
125
-	if ( isset( $data->access_token ) ) {
125
+	if (isset($data->access_token)) {
126 126
 		global $ppp_social_settings;
127 127
 		$ppp_social_settings['bitly']['access_token'] = $data->access_token;
128 128
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
 		update_option( 'ppp_social_settings', $ppp_social_settings );
135 135
 		echo 1;
136
-	} elseif ( $body == 'INVALID_LOGIN' ) {
136
+	} elseif ($body == 'INVALID_LOGIN') {
137 137
 		echo 'INVALID_LOGIN';
138 138
 	} else {
139 139
 		echo 0;
Please login to merge, or discard this patch.
includes/libs/bitly.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Exit if accessed directly
4
-if ( !defined( 'ABSPATH' ) ) {
4
+if ( ! defined( 'ABSPATH' )) {
5 5
 	exit;
6 6
 }
7 7
 
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
  * Handles all bitly functions
12 12
  *
13 13
  */
14
-if( !class_exists( 'PPP_Bitly' ) ) {
14
+if ( ! class_exists( 'PPP_Bitly' )) {
15 15
 
16 16
 	class PPP_Bitly {
17 17
 
18 18
 		var $bitly;
19 19
 
20
-		public function __construct(){
20
+		public function __construct() {
21 21
 			ppp_maybe_start_session();
22 22
 		}
23 23
 
@@ -27,20 +27,20 @@  discard block
 block discarded – undo
27 27
 		 * Handles to load twitter class
28 28
 		 */
29 29
 		public function ppp_load_bitly() {
30
-				if( !class_exists( 'Bitly' ) ) {
31
-					require_once ( PPP_PATH . '/includes/libs/bitly/bitly.php' );
30
+				if ( ! class_exists( 'Bitly' )) {
31
+					require_once (PPP_PATH.'/includes/libs/bitly/bitly.php');
32 32
 				}
33 33
 
34 34
 				ppp_set_social_tokens();
35 35
 
36
-				if ( ! defined( 'bitly_clientid' ) || ! defined( 'bitly_secret' ) ) {
36
+				if ( ! defined( 'bitly_clientid' ) || ! defined( 'bitly_secret' )) {
37 37
 					return false;
38 38
 				}
39 39
 
40 40
 				global $ppp_social_settings;
41 41
 
42
-				if ( isset( $ppp_social_settings['bitly'] ) ) {
43
-					if ( !defined( 'bitly_accesstoken' ) ) {
42
+				if (isset($ppp_social_settings['bitly'])) {
43
+					if ( ! defined( 'bitly_accesstoken' )) {
44 44
 						define( 'bitly_accesstoken', $ppp_social_settings['bitly']['access_token'] );
45 45
 					}
46 46
 					$this->bitly = new Bitly( bitly_clientid, bitly_secret, bitly_accesstoken );
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		public function revoke_access() {
55 55
 			global $ppp_social_settings;
56 56
 
57
-			unset( $ppp_social_settings['bitly'] );
57
+			unset($ppp_social_settings['bitly']);
58 58
 
59 59
 			update_option( 'ppp_social_settings', $ppp_social_settings );
60 60
 		}
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 		 * Get auth codes for Bitly
64 64
 		 *
65 65
 		 */
66
-		public function ppp_get_bitly_auth_url () {
66
+		public function ppp_get_bitly_auth_url() {
67 67
 			//load bitly class
68 68
 			$bitly = $this->ppp_load_bitly();
69 69
 
70 70
 			//check bitly class is loaded or not
71
-			if( !$bitly ) {
71
+			if ( ! $bitly) {
72 72
 				return false;
73 73
 			}
74 74
 
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 		}
78 78
 
79 79
 		public function ppp_make_bitly_link( $link = null ) {
80
-			if ( empty( $link ) ) {
80
+			if (empty($link)) {
81 81
 				return false;
82 82
 			}
83 83
 
84 84
 			$bitly = $this->ppp_load_bitly();
85 85
 
86
-			if ( !$bitly ) {
86
+			if ( ! $bitly) {
87 87
 				return false;
88 88
 			}
89 89
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		public function ppp_bitly_user_info() {
94 94
 			$bitly = $this->ppp_load_bitly();
95 95
 
96
-			if ( !$bitly ) {
96
+			if ( ! $bitly) {
97 97
 				return false;
98 98
 			}
99 99
 
Please login to merge, or discard this patch.