@@ -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; |
@@ -50,6 +50,9 @@ |
||
| 50 | 50 | return sprintf( '%s-%d', self::FILTER_WIDGET_BASE, $number ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | + /** |
|
| 54 | + * @param string $widget_id |
|
| 55 | + */ |
|
| 53 | 56 | static function is_active_widget( $widget_id ) { |
| 54 | 57 | return (bool) is_active_widget( false, $widget_id, self::FILTER_WIDGET_BASE ); |
| 55 | 58 | } |
@@ -239,6 +239,9 @@ discard block |
||
| 239 | 239 | echo $args['after_widget']; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | + /** |
|
| 243 | + * @param string $order |
|
| 244 | + */ |
|
| 242 | 245 | private function maybe_render_javascript( $instance, $order, $orderby ) { |
| 243 | 246 | if ( ! empty( $instance['user_sort_enabled'] ) ): ?> |
| 244 | 247 | <!-- |
@@ -594,6 +597,7 @@ discard block |
||
| 594 | 597 | * Responsible for rendering the search box within our widget on the frontend. |
| 595 | 598 | * |
| 596 | 599 | * @param array $instance |
| 600 | + * @param string $order |
|
| 597 | 601 | */ |
| 598 | 602 | function render_widget_search_form( $instance, $orderby, $order ) { |
| 599 | 603 | $form = get_search_form( false ); |