@@ -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'; |
@@ -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 | } |
@@ -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 ) { |
@@ -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 | |
@@ -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 | |
@@ -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 ) { |
@@ -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'; |
@@ -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 | |
@@ -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 | if( !class_exists( 'TwitterOAuth' ) ) { |
@@ -77,6 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * Strips slashes and html_entities_decode for sending to the networks. |
| 80 | + * @param string $string |
|
| 80 | 81 | */ |
| 81 | 82 | function ppp_entities_and_slashes( $string ) { |
| 82 | 83 | return stripslashes( html_entity_decode( $string, ENT_COMPAT, 'UTF-8' ) ); |