@@ -43,21 +43,21 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function column_default( $item, $column_name ) { |
| 45 | 45 | switch ( $column_name ) { |
| 46 | - case 'date': |
|
| 47 | - case 'post_title': |
|
| 48 | - return $item[ $column_name ]; |
|
| 49 | - case 'content': |
|
| 50 | - $content = $item[ $column_name ]; |
|
| 51 | - return $content; |
|
| 52 | - case 'image': |
|
| 53 | - if ( ! empty( $item['image_url'] ) ) { |
|
| 54 | - $content = '<img src="' . $item['image_url'] . '" />'; |
|
| 55 | - } else { |
|
| 56 | - $content = __( 'None', 'ppp-txt' ); |
|
| 57 | - } |
|
| 58 | - return $content; |
|
| 59 | - default: |
|
| 60 | - return; |
|
| 46 | + case 'date': |
|
| 47 | + case 'post_title': |
|
| 48 | + return $item[ $column_name ]; |
|
| 49 | + case 'content': |
|
| 50 | + $content = $item[ $column_name ]; |
|
| 51 | + return $content; |
|
| 52 | + case 'image': |
|
| 53 | + if ( ! empty( $item['image_url'] ) ) { |
|
| 54 | + $content = '<img src="' . $item['image_url'] . '" />'; |
|
| 55 | + } else { |
|
| 56 | + $content = __( 'None', 'ppp-txt' ); |
|
| 57 | + } |
|
| 58 | + return $content; |
|
| 59 | + default: |
|
| 60 | + return; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
@@ -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"> |
@@ -146,16 +146,16 @@ |
||
| 146 | 146 | // If last connection failed don't display authorization link. |
| 147 | 147 | switch( $this->twitter->http_code ) { |
| 148 | 148 | |
| 149 | - case 200: |
|
| 150 | - $_SESSION['ppp_twt_oauth_token'] = $request_token['oauth_token']; |
|
| 151 | - $_SESSION['ppp_twt_oauth_token_secret'] = $request_token['oauth_token_secret']; |
|
| 152 | - |
|
| 153 | - $token = $request_token['oauth_token']; |
|
| 154 | - $url = $this->twitter->getAuthorizeURL( $token, NULL ); |
|
| 155 | - break; |
|
| 156 | - default: |
|
| 157 | - $url = ''; |
|
| 158 | - break; |
|
| 149 | + case 200: |
|
| 150 | + $_SESSION['ppp_twt_oauth_token'] = $request_token['oauth_token']; |
|
| 151 | + $_SESSION['ppp_twt_oauth_token_secret'] = $request_token['oauth_token_secret']; |
|
| 152 | + |
|
| 153 | + $token = $request_token['oauth_token']; |
|
| 154 | + $url = $this->twitter->getAuthorizeURL( $token, NULL ); |
|
| 155 | + break; |
|
| 156 | + default: |
|
| 157 | + $url = ''; |
|
| 158 | + break; |
|
| 159 | 159 | } |
| 160 | 160 | return $url; |
| 161 | 161 | } |
@@ -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> |
@@ -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 | |