@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * Register Twitter as a servcie |
| 24 | 24 | * @param array $services The registered services |
| 25 | - * @return array With Twitter added |
|
| 25 | + * @return string[] With Twitter added |
|
| 26 | 26 | */ |
| 27 | 27 | function ppp_tw_register_service( $services = array() ) { |
| 28 | 28 | $services[] = 'tw'; |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | /** |
| 241 | 241 | * Register the Twitter connection area for the Social Media Accounts section |
| 242 | 242 | * @param array $content The existing content tokens |
| 243 | - * @return array The content tokens with Twitter added |
|
| 243 | + * @return string[] The content tokens with Twitter added |
|
| 244 | 244 | */ |
| 245 | 245 | function ppp_tw_register_admin_social_content( $content ) { |
| 246 | 246 | $content[] = 'tw'; |
@@ -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 | |
@@ -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"> |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * Register Facebook as a service |
| 24 | 24 | * @param array $services The Currently registered services |
| 25 | - * @return array The services with Facebook added |
|
| 25 | + * @return string[] The services with Facebook added |
|
| 26 | 26 | */ |
| 27 | 27 | function ppp_fb_register_service( $services = array() ) { |
| 28 | 28 | $services[] = 'fb'; |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | /** |
| 191 | 191 | * Add query vars for Facebook |
| 192 | 192 | * @param array $vars Currenty Query Vars |
| 193 | - * @return array Query vars array with facebook added |
|
| 193 | + * @return string[] Query vars array with facebook added |
|
| 194 | 194 | */ |
| 195 | 195 | function ppp_fb_query_vars( $vars ) { |
| 196 | 196 | $vars[] = 'fb_access_token'; |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | * @since 2.3 |
| 749 | 749 | * @param int $post_id Post ID |
| 750 | 750 | * @param string $name The cron name |
| 751 | - * @param boolean $scheduled If the item is being fired by a schedule (default, true), or retrieved for display (false) |
|
| 751 | + * @param boolean $is_scheduled If the item is being fired by a schedule (default, true), or retrieved for display (false) |
|
| 752 | 752 | * @return string The formatted link to the post |
| 753 | 753 | */ |
| 754 | 754 | function ppp_fb_generate_share_content( $post_id, $name, $is_scheduled = true ) { |
@@ -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> |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * @since 1.0 |
| 202 | 202 | * |
| 203 | 203 | * |
| 204 | - * @return array |
|
| 204 | + * @return boolean |
|
| 205 | 205 | */ |
| 206 | 206 | |
| 207 | 207 | private static function valid_type( $type ) { |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * @uses wp_update_post() |
| 300 | 300 | * @uses update_post_meta() |
| 301 | 301 | * |
| 302 | - * @return bool True if successful, false otherwise |
|
| 302 | + * @return boolean|null True if successful, false otherwise |
|
| 303 | 303 | */ |
| 304 | 304 | public static function update_log( $log_data = array(), $log_meta = array() ) { |
| 305 | 305 | |
@@ -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; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * Registers LinkedIn as a service |
| 24 | 24 | * @param array $services The registered servcies |
| 25 | - * @return array With LinkedIn added |
|
| 25 | + * @return string[] With LinkedIn added |
|
| 26 | 26 | */ |
| 27 | 27 | function ppp_li_register_service( $services = array() ) { |
| 28 | 28 | $services[] = 'li'; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | /** |
| 157 | 157 | * Add query vars for Linkedin |
| 158 | 158 | * @param array $vars Currenty Query Vars |
| 159 | - * @return array Query vars array with linkedin added |
|
| 159 | + * @return string[] Query vars array with linkedin added |
|
| 160 | 160 | */ |
| 161 | 161 | function ppp_li_query_vars( $vars ) { |
| 162 | 162 | $vars[] = 'li_access_token'; |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | /** |
| 287 | 287 | * Add the content box for LinkedIn in the social media settings |
| 288 | 288 | * @param array $content The existing content blocks |
| 289 | - * @return array With LinkedIn |
|
| 289 | + * @return string[] With LinkedIn |
|
| 290 | 290 | */ |
| 291 | 291 | function ppp_li_register_admin_social_content( $content ) { |
| 292 | 292 | $content[] = 'li'; |
@@ -497,7 +497,6 @@ discard block |
||
| 497 | 497 | * @since 2.3 |
| 498 | 498 | * @param int $key The key in the array |
| 499 | 499 | * @param array $args Arguements for the current post's share data |
| 500 | - * @param int $post_id The post ID being edited |
|
| 501 | 500 | * @return void |
| 502 | 501 | */ |
| 503 | 502 | function ppp_render_li_share_row( $key, $args = array() ) { |
@@ -740,7 +739,7 @@ discard block |
||
| 740 | 739 | * @since 2.3 |
| 741 | 740 | * @param int $post_id Post ID |
| 742 | 741 | * @param string $name The cron name |
| 743 | - * @param boolean $scheduled If the item is being fired by a schedule (default, true), or retrieved for display (false) |
|
| 742 | + * @param boolean $is_scheduled If the item is being fired by a schedule (default, true), or retrieved for display (false) |
|
| 744 | 743 | * @return string The formatted link to the post |
| 745 | 744 | */ |
| 746 | 745 | function ppp_li_generate_share_content( $post_id, $name, $is_scheduled = true ) { |
@@ -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> |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | |
| 321 | 321 | /** |
| 322 | 322 | * Deactivates the license key |
| 323 | - * @return void |
|
| 323 | + * @return null|false |
|
| 324 | 324 | */ |
| 325 | 325 | public function deactivate_license() { |
| 326 | 326 | // listen for our activate button to be clicked |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | /** |
| 366 | 366 | * Activates the license key provided |
| 367 | - * @return void |
|
| 367 | + * @return null|false |
|
| 368 | 368 | */ |
| 369 | 369 | public function activate_license() { |
| 370 | 370 | // listen for our activate button to be clicked |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | * |
| 435 | 435 | * @since 2.3 |
| 436 | 436 | * @param array $log_types Array of log types |
| 437 | - * @return array |
|
| 437 | + * @return string[] |
|
| 438 | 438 | */ |
| 439 | 439 | public function register_log_type( $log_types ) { |
| 440 | 440 | $types[] = 'ppp_share'; |
@@ -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> |
@@ -225,7 +225,7 @@ |
||
| 225 | 225 | * @since 2.3 |
| 226 | 226 | * @param string $date The Date |
| 227 | 227 | * @param string $time The time |
| 228 | - * @return long A timestamp |
|
| 228 | + * @return integer A timestamp |
|
| 229 | 229 | */ |
| 230 | 230 | function ppp_generate_timestamp( $date = false, $time = false ) { |
| 231 | 231 | // Just in case we need this, let's set it once |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | * @uses api_request() |
| 78 | 78 | * |
| 79 | 79 | * @param array $_transient_data Update array build by WordPress. |
| 80 | - * @return array Modified update array with custom plugin data. |
|
| 80 | + * @return stdClass Modified update array with custom plugin data. |
|
| 81 | 81 | */ |
| 82 | 82 | public function check_update( $_transient_data ) { |
| 83 | 83 | |
@@ -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. |