@@ -15,6 +15,10 @@ |
||
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | class Jetpack_Google_Analytics_Options { |
| 18 | + |
|
| 19 | + /** |
|
| 20 | + * @param string $option_name |
|
| 21 | + */ |
|
| 18 | 22 | public static function get_option( $option_name, $default = false ) { |
| 19 | 23 | $o = get_option( 'jetpack_wga' ); |
| 20 | 24 | return isset( $o[ $option_name ] ) ? $o[ $option_name ] : $default; |
@@ -326,6 +326,9 @@ |
||
| 326 | 326 | return $contents; |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | + /** |
|
| 330 | + * @param string $message |
|
| 331 | + */ |
|
| 329 | 332 | function display_page( $title, $message, $back_button = false, $recovery_form = false ) { |
| 330 | 333 | |
| 331 | 334 | if ( ! headers_sent() ) { |
@@ -87,6 +87,9 @@ |
||
| 87 | 87 | echo $args['after_widget']; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | + /** |
|
| 91 | + * @param string $user_id |
|
| 92 | + */ |
|
| 90 | 93 | function goodreads_user_id_exists( $user_id ) { |
| 91 | 94 | $url = "https://www.goodreads.com/user/show/$user_id/"; |
| 92 | 95 | $response = wp_remote_head( $url, array( 'httpversion' => '1.1', 'timeout' => 3, 'redirection' => 2 ) ); |
@@ -94,6 +94,9 @@ |
||
| 94 | 94 | return $user; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | + /** |
|
| 98 | + * @param WP_User|null $user |
|
| 99 | + */ |
|
| 97 | 100 | public function expand_user( $user ) { |
| 98 | 101 | if ( ! is_object( $user ) ) { |
| 99 | 102 | return null; |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | * should be notified, overriding the site setting. |
| 202 | 202 | * |
| 203 | 203 | * @param int $comment_id Comment ID. |
| 204 | - * @return true Always returns true. |
|
| 204 | + * @return boolean Always returns true. |
|
| 205 | 205 | */ |
| 206 | 206 | function wp_notify_moderator( $comment_id ) { |
| 207 | 207 | global $wpdb; |
@@ -147,6 +147,10 @@ |
||
| 147 | 147 | * Take a list of field prefixes and expand them for multi-lingual |
| 148 | 148 | * with the provided boostings. |
| 149 | 149 | */ |
| 150 | + |
|
| 151 | + /** |
|
| 152 | + * @param string[] $additional_fields |
|
| 153 | + */ |
|
| 150 | 154 | public function merge_ml_fields( $fields2boosts, $additional_fields ) { |
| 151 | 155 | $flds = array(); |
| 152 | 156 | foreach( $fields2boosts as $f => $b ) { |
@@ -58,6 +58,10 @@ |
||
| 58 | 58 | return $query->is_main_query() && $query->is_search(); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | + /** |
|
| 62 | + * @param double $duration |
|
| 63 | + * @param boolean $was_jetpack_search |
|
| 64 | + */ |
|
| 61 | 65 | private function record_query_time( $duration, $was_jetpack_search ) { |
| 62 | 66 | $this->stats[] = array( $was_jetpack_search, intval( $duration * 1000 ) ); |
| 63 | 67 | } |
@@ -52,6 +52,9 @@ discard block |
||
| 52 | 52 | return sprintf( '%s-%d', self::FILTER_WIDGET_BASE, $number ); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | + /** |
|
| 56 | + * @param string $widget_id |
|
| 57 | + */ |
|
| 55 | 58 | static function is_active_widget( $widget_id ) { |
| 56 | 59 | return (bool) is_active_widget( false, $widget_id, self::FILTER_WIDGET_BASE ); |
| 57 | 60 | } |
@@ -184,7 +187,6 @@ discard block |
||
| 184 | 187 | * |
| 185 | 188 | * @since 5.8.0 |
| 186 | 189 | * |
| 187 | - * @param array $instance |
|
| 188 | 190 | * @return bool |
| 189 | 191 | */ |
| 190 | 192 | static function post_types_differ_searchable( $post_types ) { |
@@ -204,7 +206,6 @@ discard block |
||
| 204 | 206 | * |
| 205 | 207 | * @since 5.8.0 |
| 206 | 208 | * |
| 207 | - * @param array $instance |
|
| 208 | 209 | * @return bool |
| 209 | 210 | */ |
| 210 | 211 | static function post_types_differ_query( $post_types ) { |
@@ -136,7 +136,7 @@ |
||
| 136 | 136 | /** |
| 137 | 137 | * Responsible for rendering the search box within our widget on the frontend. |
| 138 | 138 | * |
| 139 | - * @param array $instance |
|
| 139 | + * @param string $order |
|
| 140 | 140 | */ |
| 141 | 141 | public static function render_widget_search_form( $post_types, $orderby, $order ) { |
| 142 | 142 | $form = get_search_form( false ); |