@@ -64,7 +64,7 @@ |
||
| 64 | 64 | * @uses api_request() |
| 65 | 65 | * |
| 66 | 66 | * @param array $_transient_data Update array build by WordPress. |
| 67 | - * @return array Modified update array with custom plugin data. |
|
| 67 | + * @return stdClass Modified update array with custom plugin data. |
|
| 68 | 68 | */ |
| 69 | 69 | function check_update( $_transient_data ) { |
| 70 | 70 | |
@@ -4,7 +4,9 @@ |
||
| 4 | 4 | //set_site_transient( 'update_plugins', null ); |
| 5 | 5 | |
| 6 | 6 | // Exit if accessed directly |
| 7 | -if ( ! defined( 'ABSPATH' ) ) exit; |
|
| 7 | +if ( ! defined( 'ABSPATH' ) ) { |
|
| 8 | + exit; |
|
| 9 | +} |
|
| 8 | 10 | |
| 9 | 11 | /** |
| 10 | 12 | * Allows plugins to use their own update API. |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * Checks to see if a session is set and it's appropriate to start one, and starts it if necessary |
| 10 | - * @return void |
|
| 10 | + * @return boolean |
|
| 11 | 11 | */ |
| 12 | 12 | function ppp_maybe_start_session() { |
| 13 | 13 | $ret = false; |
@@ -73,6 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * Strips slashes and html_entities_decode for sending to the networks. |
| 76 | + * @param string $string |
|
| 76 | 77 | */ |
| 77 | 78 | function ppp_entities_and_slashes( $string ) { |
| 78 | 79 | return stripslashes( html_entity_decode( $string, ENT_COMPAT, 'UTF-8' ) ); |
@@ -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'; |
@@ -370,9 +370,12 @@ |
||
| 370 | 370 | |
| 371 | 371 | <?php endforeach; ?> |
| 372 | 372 | |
| 373 | - <?php else: ?> |
|
| 373 | + <?php else { |
|
| 374 | + : ?> |
|
| 374 | 375 | |
| 375 | - <?php ppp_render_tweet_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'image' => '', 'attachment_id' => '' ), $post->ID, 1 ); ?> |
|
| 376 | + <?php ppp_render_tweet_row( 1, array( 'date' => '', 'time' => '', 'text' => '', 'image' => '', 'attachment_id' => '' ), $post->ID, 1 ); |
|
| 377 | +} |
|
| 378 | +?> |
|
| 376 | 379 | |
| 377 | 380 | <?php endif; ?> |
| 378 | 381 | |
@@ -176,8 +176,11 @@ discard block |
||
| 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 |
||
| 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"; ?> |
@@ -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"> |
@@ -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, $time ) { |
| 231 | 231 | $share_time = explode( ':', $time ); |
@@ -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> |