@@ -10,7 +10,9 @@ discard block |
||
| 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 |
||
| 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"> |
@@ -141,9 +141,9 @@ |
||
| 141 | 141 | */ |
| 142 | 142 | function ppp_set_social_tokens() { |
| 143 | 143 | if ( ( defined( 'PPP_TW_CONSUMER_KEY' ) && defined( 'PPP_TW_CONSUMER_SECRET' ) ) || |
| 144 | - ( defined( 'LINKEDIN_KEY' ) && defined( 'LINKEDIN_SECRET' ) ) || |
|
| 145 | - ( defined( 'bitly_clientid' ) && defined( 'bitly_secret' ) ) || |
|
| 146 | - ( defined( 'PPP_FB_APP_ID' ) && defined( 'PPP_FB_APP_SECRET' ) ) |
|
| 144 | + ( defined( 'LINKEDIN_KEY' ) && defined( 'LINKEDIN_SECRET' ) ) || |
|
| 145 | + ( defined( 'bitly_clientid' ) && defined( 'bitly_secret' ) ) || |
|
| 146 | + ( defined( 'PPP_FB_APP_ID' ) && defined( 'PPP_FB_APP_SECRET' ) ) |
|
| 147 | 147 | ) { |
| 148 | 148 | return; |
| 149 | 149 | } |
@@ -429,9 +429,12 @@ |
||
| 429 | 429 | |
| 430 | 430 | <?php endforeach; ?> |
| 431 | 431 | |
| 432 | - <?php else: ?> |
|
| 432 | + <?php else { |
|
| 433 | + : ?> |
|
| 433 | 434 | |
| 434 | - <?php ppp_render_li_share_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'desc' => '', 'image' => '', 'attachment_id' => '' ) ); ?> |
|
| 435 | + <?php ppp_render_li_share_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'desc' => '', 'image' => '', 'attachment_id' => '' ) ); |
|
| 436 | +} |
|
| 437 | +?> |
|
| 435 | 438 | |
| 436 | 439 | <?php endif; ?> |
| 437 | 440 | </tbody> |
@@ -464,9 +464,12 @@ |
||
| 464 | 464 | |
| 465 | 465 | <?php endforeach; ?> |
| 466 | 466 | |
| 467 | - <?php else: ?> |
|
| 467 | + <?php else { |
|
| 468 | + : ?> |
|
| 468 | 469 | |
| 469 | - <?php ppp_render_fb_share_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'image' => '', 'attachment_id' => '' ), $post->ID, 1 ); ?> |
|
| 470 | + <?php ppp_render_fb_share_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'image' => '', 'attachment_id' => '' ), $post->ID, 1 ); |
|
| 471 | +} |
|
| 472 | +?> |
|
| 470 | 473 | |
| 471 | 474 | <?php endif; ?> |
| 472 | 475 | </tbody> |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * @since 1.0 |
| 124 | 124 | * |
| 125 | 125 | * @return array |
| 126 | - */ |
|
| 126 | + */ |
|
| 127 | 127 | |
| 128 | 128 | private static function log_types() { |
| 129 | 129 | $terms = array( |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * @uses register_post_type() |
| 144 | 144 | * |
| 145 | 145 | * @return void |
| 146 | - */ |
|
| 146 | + */ |
|
| 147 | 147 | |
| 148 | 148 | public function register_post_type() { |
| 149 | 149 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * @uses wp_insert_term() |
| 177 | 177 | * |
| 178 | 178 | * @return void |
| 179 | - */ |
|
| 179 | + */ |
|
| 180 | 180 | |
| 181 | 181 | public function register_taxonomy() { |
| 182 | 182 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * |
| 203 | 203 | * |
| 204 | 204 | * @return array |
| 205 | - */ |
|
| 205 | + */ |
|
| 206 | 206 | |
| 207 | 207 | private static function valid_type( $type ) { |
| 208 | 208 | return in_array( $type, self::log_types() ); |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * @uses self::insert_log() |
| 222 | 222 | * |
| 223 | 223 | * @return int The ID of the new log entry |
| 224 | - */ |
|
| 224 | + */ |
|
| 225 | 225 | |
| 226 | 226 | public static function add( $title = '', $message = '', $parent = 0, $type = null ) { |
| 227 | 227 | |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | * @uses sanitize_key() |
| 251 | 251 | * |
| 252 | 252 | * @return int The ID of the newly created log item |
| 253 | - */ |
|
| 253 | + */ |
|
| 254 | 254 | |
| 255 | 255 | public static function insert_log( $log_data = array(), $log_meta = array() ) { |
| 256 | 256 | |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | * @uses update_post_meta() |
| 301 | 301 | * |
| 302 | 302 | * @return bool True if successful, false otherwise |
| 303 | - */ |
|
| 303 | + */ |
|
| 304 | 304 | public static function update_log( $log_data = array(), $log_meta = array() ) { |
| 305 | 305 | |
| 306 | 306 | do_action( 'wp_pre_update_log', $log_id ); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | * @uses self::get_connected_logs() |
| 338 | 338 | * |
| 339 | 339 | * @return array |
| 340 | - */ |
|
| 340 | + */ |
|
| 341 | 341 | |
| 342 | 342 | public static function get_logs( $object_id = 0, $type = null, $paged = null ) { |
| 343 | 343 | return self::get_connected_logs( array( 'post_parent' => $object_id, 'paged' => $paged, 'log_type' => $type ) ); |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | * @uses self::valid_type() |
| 360 | 360 | * |
| 361 | 361 | * @return array / false |
| 362 | - */ |
|
| 362 | + */ |
|
| 363 | 363 | |
| 364 | 364 | public static function get_connected_logs( $args = array() ) { |
| 365 | 365 | |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | * @uses self::valid_type() |
| 408 | 408 | * |
| 409 | 409 | * @return int |
| 410 | - */ |
|
| 410 | + */ |
|
| 411 | 411 | |
| 412 | 412 | public static function get_log_count( $object_id = 0, $type = null, $meta_query = null ) { |
| 413 | 413 | |
@@ -318,8 +318,9 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | if( $log_id && ! empty( $log_meta ) ) { |
| 320 | 320 | foreach( (array) $log_meta as $key => $meta ) { |
| 321 | - if( ! empty( $meta ) ) |
|
| 322 | - update_post_meta( $log_id, '_wp_log_' . sanitize_key( $key ), $meta ); |
|
| 321 | + if( ! empty( $meta ) ) { |
|
| 322 | + update_post_meta( $log_id, '_wp_log_' . sanitize_key( $key ), $meta ); |
|
| 323 | + } |
|
| 323 | 324 | } |
| 324 | 325 | } |
| 325 | 326 | |
@@ -388,8 +389,9 @@ discard block |
||
| 388 | 389 | |
| 389 | 390 | $logs = get_posts( $query_args ); |
| 390 | 391 | |
| 391 | - if( $logs ) |
|
| 392 | - return $logs; |
|
| 392 | + if( $logs ) { |
|
| 393 | + return $logs; |
|
| 394 | + } |
|
| 393 | 395 | |
| 394 | 396 | // no logs found |
| 395 | 397 | return false; |
@@ -177,8 +177,11 @@ |
||
| 177 | 177 | <?php $post = wp_get_recent_posts( array( 'numberposts' => 1 ) ); ?> |
| 178 | 178 | <?php if ( count( $post ) > 0 ) : ?> |
| 179 | 179 | <code><?php echo ppp_generate_link( $post[0]['ID'], 'sharedate_1_' . $post[0]['ID'], false ); ?></code></small> |
| 180 | - <?php else : ?> |
|
| 181 | - <em><?php _e( 'No posts available to generate link from.', 'ppp-txt' ); ?></em> |
|
| 180 | + <?php else { |
|
| 181 | + : ?> |
|
| 182 | + <em><?php _e( 'No posts available to generate link from.', 'ppp-txt' ); |
|
| 183 | +} |
|
| 184 | +?></em> |
|
| 182 | 185 | <?php endif; ?> |
| 183 | 186 | </p> |
| 184 | 187 | </td> |
@@ -1,7 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Exit if accessed directly |
| 4 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 4 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 5 | + exit; |
|
| 6 | +} |
|
| 5 | 7 | |
| 6 | 8 | /** |
| 7 | 9 | * Allows plugins to use their own update API. |
@@ -429,9 +429,12 @@ |
||
| 429 | 429 | } |
| 430 | 430 | ?> |
| 431 | 431 | |
| 432 | - <?php else: ?> |
|
| 432 | + <?php else { |
|
| 433 | + : ?> |
|
| 433 | 434 | |
| 434 | - <?php ppp_render_tweet_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'image' => '', 'attachment_id' => '' ), $post->ID, 1 ); ?> |
|
| 435 | + <?php ppp_render_tweet_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'image' => '', 'attachment_id' => '' ), $post->ID, 1 ); |
|
| 436 | +} |
|
| 437 | +?> |
|
| 435 | 438 | |
| 436 | 439 | <?php endif; ?> |
| 437 | 440 | |