@@ -42,6 +42,9 @@ discard block |
||
42 | 42 | return $this->id; |
43 | 43 | } |
44 | 44 | |
45 | + /** |
|
46 | + * @return string |
|
47 | + */ |
|
45 | 48 | public function get_share_url( $post_id ) { |
46 | 49 | /** |
47 | 50 | * Filter the sharing permalink. |
@@ -324,6 +327,9 @@ discard block |
||
324 | 327 | do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) ); |
325 | 328 | } |
326 | 329 | |
330 | + /** |
|
331 | + * @param string $name |
|
332 | + */ |
|
327 | 333 | public function js_dialog( $name, $params = array() ) { |
328 | 334 | if ( true !== $this->open_link_in_new ) { |
329 | 335 | return; |
@@ -1463,6 +1469,9 @@ discard block |
||
1463 | 1469 | return __( 'Pinterest', 'jetpack' ); |
1464 | 1470 | } |
1465 | 1471 | |
1472 | + /** |
|
1473 | + * @return string |
|
1474 | + */ |
|
1466 | 1475 | public function get_image( $post ) { |
1467 | 1476 | if ( class_exists( 'Jetpack_PostImages' ) ) { |
1468 | 1477 | $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) ); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Verifies that a user answered the math problem correctly while logging in. |
28 | 28 | * |
29 | - * @return bool Returns true if the math is correct |
|
29 | + * @return boolean|null Returns true if the math is correct |
|
30 | 30 | * @throws Error if insuffient $_POST variables are present. |
31 | 31 | * @throws Error message if the math is wrong |
32 | 32 | */ |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | /** |
110 | 110 | * Requires a user to solve a simple equation. Added to any WordPress login form. |
111 | 111 | * |
112 | - * @return VOID outputs html |
|
112 | + * @return string|null outputs html |
|
113 | 113 | */ |
114 | 114 | static function math_form() { |
115 | 115 | // Check if jpp_math_pass cookie is set and it matches valid transient |
@@ -33,6 +33,9 @@ discard block |
||
33 | 33 | public $extra_headers = array(); |
34 | 34 | |
35 | 35 | /** |
36 | + * @param string $method |
|
37 | + * @param string $url |
|
38 | + * @param string $post_body |
|
36 | 39 | * @return WPCOM_JSON_API instance |
37 | 40 | */ |
38 | 41 | static function init( $method = null, $url = null, $post_body = null ) { |
@@ -335,6 +338,9 @@ discard block |
||
335 | 338 | return call_user_func_array( array( $endpoint, 'callback' ), $path_pieces ); |
336 | 339 | } |
337 | 340 | |
341 | + /** |
|
342 | + * @param integer $status_code |
|
343 | + */ |
|
338 | 344 | function output_early( $status_code, $response = null, $content_type = 'application/json' ) { |
339 | 345 | $exit = $this->exit; |
340 | 346 | $this->exit = false; |
@@ -543,11 +549,18 @@ discard block |
||
543 | 549 | return json_encode( $data ); |
544 | 550 | } |
545 | 551 | |
552 | + /** |
|
553 | + * @param string $needle |
|
554 | + */ |
|
546 | 555 | function ends_with( $haystack, $needle ) { |
547 | 556 | return $needle === substr( $haystack, -strlen( $needle ) ); |
548 | 557 | } |
549 | 558 | |
550 | 559 | // Returns the site's blog_id in the WP.com ecosystem |
560 | + |
|
561 | + /** |
|
562 | + * @return integer |
|
563 | + */ |
|
551 | 564 | function get_blog_id_for_output() { |
552 | 565 | return $this->token_details['blog_id']; |
553 | 566 | } |
@@ -570,6 +583,10 @@ discard block |
||
570 | 583 | } |
571 | 584 | |
572 | 585 | // Returns true if the specified blog ID is a restricted blog |
586 | + |
|
587 | + /** |
|
588 | + * @param integer $blog_id |
|
589 | + */ |
|
573 | 590 | function is_restricted_blog( $blog_id ) { |
574 | 591 | /** |
575 | 592 | * Filters all REST API access and return a 403 unauthorized response for all Restricted blog IDs. |
@@ -619,7 +636,7 @@ discard block |
||
619 | 636 | /** |
620 | 637 | * Counts the number of comments on a site, excluding certain comment types. |
621 | 638 | * |
622 | - * @param $post_id int Post ID. |
|
639 | + * @param integer $post_id int Post ID. |
|
623 | 640 | * @return array Array of counts, matching the output of https://developer.wordpress.org/reference/functions/get_comment_count/. |
624 | 641 | */ |
625 | 642 | public function wp_count_comments( $post_id ) { |
@@ -162,6 +162,7 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * Get attachment images for a specified post and return them. Also make sure |
164 | 164 | * their dimensions are at or above a required minimum. |
165 | + * @param integer $post_id |
|
165 | 166 | */ |
166 | 167 | static function from_attachment( $post_id, $width = 200, $height = 200 ) { |
167 | 168 | $images = array(); |
@@ -656,7 +657,6 @@ discard block |
||
656 | 657 | * resized and cropped image. |
657 | 658 | * |
658 | 659 | * @param string $src |
659 | - * @param int $dimension |
|
660 | 660 | * @return string Transformed image URL |
661 | 661 | */ |
662 | 662 | static function fit_image_url( $src, $width, $height ) { |
@@ -703,7 +703,7 @@ discard block |
||
703 | 703 | * |
704 | 704 | * @param mixed $html_or_id The HTML string to parse for images, or a post id. |
705 | 705 | * |
706 | - * @return array $html_info { |
|
706 | + * @return integer $html_info { |
|
707 | 707 | * @type string $html Post content. |
708 | 708 | * @type string $post_url Post URL. |
709 | 709 | * } |
@@ -135,6 +135,9 @@ discard block |
||
135 | 135 | exit; |
136 | 136 | } |
137 | 137 | |
138 | + /** |
|
139 | + * @param string $version |
|
140 | + */ |
|
138 | 141 | function asset_version( $version ) { |
139 | 142 | /** |
140 | 143 | * Filter the version string used when enqueuing Carousel assets. |
@@ -508,6 +511,9 @@ discard block |
||
508 | 511 | return $attr; |
509 | 512 | } |
510 | 513 | |
514 | + /** |
|
515 | + * @param string $html |
|
516 | + */ |
|
511 | 517 | function add_data_to_container( $html ) { |
512 | 518 | global $post; |
513 | 519 | if ( Jetpack_AMP_Support::is_amp_request() ) { |
@@ -751,6 +757,9 @@ discard block |
||
751 | 757 | return ( 1 == $value ) ? 1 : 0; |
752 | 758 | } |
753 | 759 | |
760 | + /** |
|
761 | + * @param string $name |
|
762 | + */ |
|
754 | 763 | function settings_checkbox( $name, $label_text, $extra_text = '', $default_to_checked = true ) { |
755 | 764 | if ( empty( $name ) ) { |
756 | 765 | return; |
@@ -766,6 +775,9 @@ discard block |
||
766 | 775 | echo '</fieldset>'; |
767 | 776 | } |
768 | 777 | |
778 | + /** |
|
779 | + * @param string $name |
|
780 | + */ |
|
769 | 781 | function settings_select( $name, $values, $extra_text = '' ) { |
770 | 782 | if ( empty( $name ) || ! is_array( $values ) || empty( $values ) ) { |
771 | 783 | return; |
@@ -346,6 +346,9 @@ discard block |
||
346 | 346 | </div><?php |
347 | 347 | } |
348 | 348 | |
349 | + /** |
|
350 | + * @param string $service_name |
|
351 | + */ |
|
349 | 352 | public static function options_page_other( $service_name ) { |
350 | 353 | // Nonce check |
351 | 354 | check_admin_referer( "options_page_{$service_name}_" . $_REQUEST['connection'] ); |
@@ -769,7 +772,7 @@ discard block |
||
769 | 772 | * |
770 | 773 | * @param array $connections_data |
771 | 774 | * |
772 | - * @return array { |
|
775 | + * @return string { |
|
773 | 776 | * Array of content for generating connection form. |
774 | 777 | * |
775 | 778 | * @type string HTML content of form |
@@ -872,6 +875,9 @@ discard block |
||
872 | 875 | return ob_get_clean(); |
873 | 876 | } |
874 | 877 | |
878 | + /** |
|
879 | + * @return string |
|
880 | + */ |
|
875 | 881 | private function google_plus_shut_down_notice() { |
876 | 882 | return wp_kses( |
877 | 883 | sprintf( |