@@ -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 ) { |
@@ -424,7 +424,7 @@ |
||
| 424 | 424 | * Only enqueue block assets when needed. |
| 425 | 425 | * |
| 426 | 426 | * @param string $type Slug of the block. |
| 427 | - * @param array $script_dependencies An array of view-side Javascript dependencies to be enqueued. |
|
| 427 | + * @param string[] $script_dependencies An array of view-side Javascript dependencies to be enqueued. |
|
| 428 | 428 | * |
| 429 | 429 | * @return void |
| 430 | 430 | */ |
@@ -410,7 +410,7 @@ |
||
| 410 | 410 | * |
| 411 | 411 | * @param Mixed $needle the needle. |
| 412 | 412 | * @param Array $haystack the haystack. |
| 413 | - * @return is the needle not in the haystack? |
|
| 413 | + * @return boolean the needle not in the haystack? |
|
| 414 | 414 | */ |
| 415 | 415 | protected function negative_in_array( $needle, $haystack ) { |
| 416 | 416 | if ( in_array( $needle, $haystack, true ) ) { |
@@ -42,6 +42,9 @@ discard block |
||
| 42 | 42 | return array(); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | + /** |
|
| 46 | + * @param string[] $actions_to_count |
|
| 47 | + */ |
|
| 45 | 48 | protected function count_actions( $action_names, $actions_to_count ) { |
| 46 | 49 | return count( array_intersect( $action_names, $actions_to_count ) ); |
| 47 | 50 | } |
@@ -58,6 +61,10 @@ discard block |
||
| 58 | 61 | return false; |
| 59 | 62 | } |
| 60 | 63 | |
| 64 | + /** |
|
| 65 | + * @param string $action_name |
|
| 66 | + * @param string $id_field |
|
| 67 | + */ |
|
| 61 | 68 | protected function enqueue_all_ids_as_action( $action_name, $table_name, $id_field, $where_sql, $max_items_to_enqueue, $state ) { |
| 62 | 69 | global $wpdb; |
| 63 | 70 | |
@@ -111,6 +118,9 @@ discard block |
||
| 111 | 118 | return $chunks_with_ends; |
| 112 | 119 | } |
| 113 | 120 | |
| 121 | + /** |
|
| 122 | + * @param string $meta_type |
|
| 123 | + */ |
|
| 114 | 124 | protected function get_metadata( $ids, $meta_type, $meta_key_whitelist ) { |
| 115 | 125 | global $wpdb; |
| 116 | 126 | $table = _get_meta_table( $meta_type ); |
@@ -131,12 +141,18 @@ discard block |
||
| 131 | 141 | ); |
| 132 | 142 | } |
| 133 | 143 | |
| 144 | + /** |
|
| 145 | + * @param string $meta_type |
|
| 146 | + */ |
|
| 134 | 147 | public function init_listeners_for_meta_type( $meta_type, $callable ) { |
| 135 | 148 | add_action( "added_{$meta_type}_meta", $callable, 10, 4 ); |
| 136 | 149 | add_action( "updated_{$meta_type}_meta", $callable, 10, 4 ); |
| 137 | 150 | add_action( "deleted_{$meta_type}_meta", $callable, 10, 4 ); |
| 138 | 151 | } |
| 139 | 152 | |
| 153 | + /** |
|
| 154 | + * @param string $meta_type |
|
| 155 | + */ |
|
| 140 | 156 | public function init_meta_whitelist_handler( $meta_type, $whitelist_handler ) { |
| 141 | 157 | add_filter( "jetpack_sync_before_enqueue_added_{$meta_type}_meta", $whitelist_handler ); |
| 142 | 158 | add_filter( "jetpack_sync_before_enqueue_updated_{$meta_type}_meta", $whitelist_handler ); |