@@ -100,6 +100,10 @@ discard block |
||
100 | 100 | ), menu_page_url( 'sharing', false ) ); |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @param string $service_name |
|
105 | + * @param string $for |
|
106 | + */ |
|
103 | 107 | static function refresh_url( $service_name, $for ) { |
104 | 108 | return add_query_arg( array( |
105 | 109 | 'action' => 'request', |
@@ -111,6 +115,10 @@ discard block |
||
111 | 115 | ), admin_url( 'options-general.php?page=sharing' ) ); |
112 | 116 | } |
113 | 117 | |
118 | + /** |
|
119 | + * @param string $service_name |
|
120 | + * @param string $id |
|
121 | + */ |
|
114 | 122 | static function disconnect_url( $service_name, $id ) { |
115 | 123 | return add_query_arg( array( |
116 | 124 | 'action' => 'delete', |
@@ -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 |
@@ -415,7 +415,7 @@ |
||
415 | 415 | * |
416 | 416 | * @param array $connections_data |
417 | 417 | * |
418 | - * @return array { |
|
418 | + * @return string { |
|
419 | 419 | * Array of content for generating connection form. |
420 | 420 | * |
421 | 421 | * @type string HTML content of form |
@@ -682,6 +682,9 @@ |
||
682 | 682 | $this->options_save_other( 'linkedin' ); |
683 | 683 | } |
684 | 684 | |
685 | + /** |
|
686 | + * @param string $service_name |
|
687 | + */ |
|
685 | 688 | function options_save_other( $service_name ) { |
686 | 689 | // Nonce check |
687 | 690 | check_admin_referer( 'save_' . $service_name . '_token_' . $_REQUEST['connection'] ); |
@@ -244,6 +244,9 @@ |
||
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
247 | + /** |
|
248 | + * @param string $capability |
|
249 | + */ |
|
247 | 250 | protected function current_user_can( $capability, $plugin = null ) { |
248 | 251 | if ( $plugin ) { |
249 | 252 | return current_user_can( $capability, $plugin ); |
@@ -199,7 +199,7 @@ |
||
199 | 199 | * @param string $type Test type, async or direct. Optional, direct all tests. |
200 | 200 | * @param string $group Testing group to check status of. Optional, default all tests. |
201 | 201 | * |
202 | - * @return true|array True if all tests pass. Array of failed tests. |
|
202 | + * @return boolean True if all tests pass. Array of failed tests. |
|
203 | 203 | */ |
204 | 204 | public function pass( $type = 'all', $group = 'all' ) { |
205 | 205 | $results = $this->raw_results( $type, $group ); |
@@ -129,6 +129,9 @@ discard block |
||
129 | 129 | return apply_filters( 'jp_carousel_load_for_images_linked_to_file', false ); |
130 | 130 | } |
131 | 131 | |
132 | + /** |
|
133 | + * @param string $version |
|
134 | + */ |
|
132 | 135 | function asset_version( $version ) { |
133 | 136 | /** |
134 | 137 | * Filter the version string used when enqueuing Carousel assets. |
@@ -511,6 +514,9 @@ discard block |
||
511 | 514 | return $attr; |
512 | 515 | } |
513 | 516 | |
517 | + /** |
|
518 | + * @param string $html |
|
519 | + */ |
|
514 | 520 | function add_data_to_container( $html ) { |
515 | 521 | global $post; |
516 | 522 | if ( |
@@ -757,6 +763,9 @@ discard block |
||
757 | 763 | return ( 1 == $value ) ? 1 : 0; |
758 | 764 | } |
759 | 765 | |
766 | + /** |
|
767 | + * @param string $name |
|
768 | + */ |
|
760 | 769 | function settings_checkbox( $name, $label_text, $extra_text = '', $default_to_checked = true ) { |
761 | 770 | if ( empty( $name ) ) { |
762 | 771 | return; |
@@ -772,6 +781,9 @@ discard block |
||
772 | 781 | echo '</fieldset>'; |
773 | 782 | } |
774 | 783 | |
784 | + /** |
|
785 | + * @param string $name |
|
786 | + */ |
|
775 | 787 | function settings_select( $name, $values, $extra_text = '' ) { |
776 | 788 | if ( empty( $name ) || ! is_array( $values ) || empty( $values ) ) { |
777 | 789 | return; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * Plugin options getter |
144 | 144 | * |
145 | - * @param string|array $option Option name. |
|
145 | + * @param string $option Option name. |
|
146 | 146 | * @param mixed $default Default value. |
147 | 147 | * |
148 | 148 | * @return mixed Option value |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * |
159 | 159 | * @param string $url Soundcloud URL. |
160 | 160 | * |
161 | - * @return boolean |
|
161 | + * @return integer |
|
162 | 162 | */ |
163 | 163 | function soundcloud_url_has_tracklist( $url ) { |
164 | 164 | return preg_match( '/^(.+?)\/(sets|groups|playlists)\/(.+?)$/', $url ); |
@@ -339,6 +339,9 @@ discard block |
||
339 | 339 | do_action( 'sharing_bump_stats', array( 'service' => $this, 'post' => $post ) ); |
340 | 340 | } |
341 | 341 | |
342 | + /** |
|
343 | + * @param string $name |
|
344 | + */ |
|
342 | 345 | public function js_dialog( $name, $params = array() ) { |
343 | 346 | if ( true !== $this->open_link_in_new ) { |
344 | 347 | return; |
@@ -1458,6 +1461,9 @@ discard block |
||
1458 | 1461 | return __( 'Pinterest', 'jetpack' ); |
1459 | 1462 | } |
1460 | 1463 | |
1464 | + /** |
|
1465 | + * @return string |
|
1466 | + */ |
|
1461 | 1467 | public function get_image( $post ) { |
1462 | 1468 | if ( class_exists( 'Jetpack_PostImages' ) ) { |
1463 | 1469 | $image = Jetpack_PostImages::get_image( $post->ID, array( 'fallback_to_avatars' => true ) ); |