@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * |
155 | 155 | * @since 5.3.0 |
156 | 156 | * |
157 | - * @param array $array The item to be added. |
|
157 | + * @param string $array The item to be added. |
|
158 | 158 | * |
159 | 159 | * @return bool True if the append succeeded, False if not. |
160 | 160 | */ |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * @param DOMElement $parent (optional) an element to which new children should be added. |
284 | 284 | * @param DOMDocument $root (optional) the parent document. |
285 | 285 | * |
286 | - * @return string|DOMDocument The rendered XML string or an object if root element is specified. |
|
286 | + * @return null|DOMNode The rendered XML string or an object if root element is specified. |
|
287 | 287 | */ |
288 | 288 | protected function array_to_xml_string( $array, $parent = null, $root = null ) { |
289 | 289 | $return_string = false; |
@@ -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 |
@@ -213,7 +213,6 @@ discard block |
||
213 | 213 | /** |
214 | 214 | * Inject image sizes to Jetpack REST API responses. This wraps the filter_photon_norezise_maybe_inject_sizes function. |
215 | 215 | * |
216 | - * @param array $data Attachment sizes data. |
|
217 | 216 | * @param int $attachment_id Attachment's post ID. |
218 | 217 | * |
219 | 218 | * @return array Attachment sizes array. |
@@ -1257,7 +1256,7 @@ discard block |
||
1257 | 1256 | * after ourselves without breaking anyone else's filters. |
1258 | 1257 | * |
1259 | 1258 | * @internal |
1260 | - * @return true |
|
1259 | + * @return boolean |
|
1261 | 1260 | */ |
1262 | 1261 | public function _override_image_downsize_in_rest_edit_context() { |
1263 | 1262 | return true; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * Helper function to look up the expected master user and return the local WP_User. |
54 | 54 | * |
55 | - * @return WP_User Jetpack's expected master user. |
|
55 | + * @return string Jetpack's expected master user. |
|
56 | 56 | */ |
57 | 57 | protected function helper_retrieve_local_master_user() { |
58 | 58 | $master_user = Jetpack_Options::get_option( 'master_user' ); |
@@ -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 ); |
@@ -543,6 +543,7 @@ |
||
543 | 543 | * @internal |
544 | 544 | * |
545 | 545 | * @param bool &$error Did the remote request result in an error? |
546 | + * @param boolean $error |
|
546 | 547 | * @return bool True if PSH is active. |
547 | 548 | */ |
548 | 549 | function jetpack_get_remote_is_psh_active( &$error ) { |