@@ -120,6 +120,9 @@ discard block |
||
| 120 | 120 | return $response; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | + /** |
|
| 124 | + * @param string $field |
|
| 125 | + */ |
|
| 123 | 126 | protected function get_sal_post_by( $field, $field_value, $context ) { |
| 124 | 127 | global $blog_id; |
| 125 | 128 | |
@@ -132,6 +135,9 @@ discard block |
||
| 132 | 135 | return $post; |
| 133 | 136 | } |
| 134 | 137 | |
| 138 | + /** |
|
| 139 | + * @param string $context |
|
| 140 | + */ |
|
| 135 | 141 | private function render_response_keys( $post, $context, $keys ) { |
| 136 | 142 | foreach ( $keys as $key ) { |
| 137 | 143 | switch ( $key ) { |
@@ -598,7 +598,6 @@ discard block |
||
| 598 | 598 | * @uses Jetpack::disconnect(); |
| 599 | 599 | * @since 4.3.0 |
| 600 | 600 | * |
| 601 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
| 602 | 601 | * |
| 603 | 602 | * @return string|WP_Error A raw URL if the connection URL could be built; error message otherwise. |
| 604 | 603 | */ |
@@ -618,7 +617,6 @@ discard block |
||
| 618 | 617 | * |
| 619 | 618 | * @since 4.3.0 |
| 620 | 619 | * |
| 621 | - * @param WP_REST_Request $request The request sent to the WP REST API. |
|
| 622 | 620 | * |
| 623 | 621 | * @return object |
| 624 | 622 | */ |
@@ -249,6 +249,9 @@ |
||
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | + /** |
|
| 253 | + * @param string $access_token |
|
| 254 | + */ |
|
| 252 | 255 | private static function verify_token( $access_token ) { |
| 253 | 256 | $request = array( |
| 254 | 257 | 'headers' => array( |
@@ -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', |
@@ -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' ); |
@@ -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 ); |
@@ -416,7 +416,7 @@ |
||
| 416 | 416 | * Only enqueue block assets when needed. |
| 417 | 417 | * |
| 418 | 418 | * @param string $type Slug of the block. |
| 419 | - * @param array $script_dependencies Script dependencies. Will be merged with automatically |
|
| 419 | + * @param string[] $script_dependencies Script dependencies. Will be merged with automatically |
|
| 420 | 420 | * detected script dependencies from the webpack build. |
| 421 | 421 | * |
| 422 | 422 | * @return void |
@@ -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; |
@@ -43,6 +43,9 @@ discard block |
||
| 43 | 43 | return array( 'scheduled' => Actions::do_full_sync( $modules ) ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @return string |
|
| 48 | + */ |
|
| 46 | 49 | protected function validate_queue( $query ) { |
| 47 | 50 | if ( ! isset( $query ) ) { |
| 48 | 51 | return new WP_Error( 'invalid_queue', 'Queue name is required', 400 ); |
@@ -233,6 +236,9 @@ discard block |
||
| 233 | 236 | ); |
| 234 | 237 | } |
| 235 | 238 | |
| 239 | + /** |
|
| 240 | + * @param Queue $queue |
|
| 241 | + */ |
|
| 236 | 242 | protected function get_buffer( $queue, $number_of_items ) { |
| 237 | 243 | $start = time(); |
| 238 | 244 | $max_duration = 5; // this will try to get the buffer |