@@ -174,6 +174,7 @@ discard block |
||
| 174 | 174 | * @since 1.3 |
| 175 | 175 | * @var string $guid VideoPress unique identifier |
| 176 | 176 | * @var int $maxwidth maximum requested video width. final width and height are calculated on VideoPress servers based on the aspect ratio of the original video upload. |
| 177 | + * @param string $guid |
|
| 177 | 178 | */ |
| 178 | 179 | public function __construct( $guid, $maxwidth = 640 ) { |
| 179 | 180 | $this->guid = $guid; |
@@ -311,7 +312,7 @@ discard block |
||
| 311 | 312 | * |
| 312 | 313 | * @since 1.2 |
| 313 | 314 | * @param string $url absolute URL |
| 314 | - * @return bool|string host component of the URL, or false if none found |
|
| 315 | + * @return string|false host component of the URL, or false if none found |
|
| 315 | 316 | */ |
| 316 | 317 | public static function hostname( $url ) { |
| 317 | 318 | return wp_parse_url( esc_url_raw( $url ), PHP_URL_HOST ); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * |
| 47 | 47 | * These values are used in new widgets. |
| 48 | 48 | * |
| 49 | - * @return array Array of default values for the Widget's options |
|
| 49 | + * @return string Array of default values for the Widget's options |
|
| 50 | 50 | */ |
| 51 | 51 | public function defaults() { |
| 52 | 52 | return array( |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | * |
| 117 | 117 | * These values are used in new widgets. |
| 118 | 118 | * |
| 119 | - * @return array Default values for the widget options. |
|
| 119 | + * @return string Default values for the widget options. |
|
| 120 | 120 | */ |
| 121 | 121 | public function defaults() { |
| 122 | 122 | return array( |
@@ -231,6 +231,9 @@ discard block |
||
| 231 | 231 | <?php |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | + /** |
|
| 235 | + * @return string |
|
| 236 | + */ |
|
| 234 | 237 | function get_default_args() { |
| 235 | 238 | $defaults = array( |
| 236 | 239 | 'href' => '', |
@@ -292,6 +295,9 @@ discard block |
||
| 292 | 295 | return ( false !== strpos( $url, 'facebook.com' ) ) ? true : false; |
| 293 | 296 | } |
| 294 | 297 | |
| 298 | + /** |
|
| 299 | + * @param integer $value |
|
| 300 | + */ |
|
| 295 | 301 | function normalize_int_value( $value, $default = 0, $max = 0, $min = 0 ) { |
| 296 | 302 | $value = (int) $value; |
| 297 | 303 | |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | * |
| 117 | 117 | * These values are used in new widgets. |
| 118 | 118 | * |
| 119 | - * @return array Default values for the widget options. |
|
| 119 | + * @return string Default values for the widget options. |
|
| 120 | 120 | */ |
| 121 | 121 | public function defaults() { |
| 122 | 122 | return array( |
@@ -387,7 +387,7 @@ |
||
| 387 | 387 | * These values are used in new widgets as well as when sanitizing input. If a given value is not allowed, |
| 388 | 388 | * as defined in allowed_values(), that input is set to the default value defined here. |
| 389 | 389 | * |
| 390 | - * @return array Array of default values for the Widget's options |
|
| 390 | + * @return string Array of default values for the Widget's options |
|
| 391 | 391 | */ |
| 392 | 392 | public function defaults() { |
| 393 | 393 | return array( |
@@ -90,6 +90,9 @@ |
||
| 90 | 90 | echo $args['after_widget']; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $user_id |
|
| 95 | + */ |
|
| 93 | 96 | function goodreads_user_id_exists( $user_id ) { |
| 94 | 97 | $url = "https://www.goodreads.com/user/show/$user_id/"; |
| 95 | 98 | $response = wp_remote_head( |
@@ -129,6 +129,9 @@ |
||
| 129 | 129 | echo '<p>' . sprintf( _x( 'Learn more about the %s', 'the Internet Defense League', 'jetpack' ), '<a href="https://www.internetdefenseleague.org/">Internet Defense League</a>' ) . '</p>'; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | + /** |
|
| 133 | + * @param string $field_name |
|
| 134 | + */ |
|
| 132 | 135 | public function select( $field_name, $options, $default = null ) { |
| 133 | 136 | echo '<select class="widefat" name="' . $this->get_field_name( $field_name ) . '">'; |
| 134 | 137 | foreach ( $options as $option_slug => $option_name ) { |
@@ -595,7 +595,7 @@ |
||
| 595 | 595 | * |
| 596 | 596 | * @param array $dirty Unsantized data for the widget. |
| 597 | 597 | * |
| 598 | - * @return array Santized data. |
|
| 598 | + * @return integer Santized data. |
|
| 599 | 599 | */ |
| 600 | 600 | public function sanitize_instance( $dirty ) { |
| 601 | 601 | $now = (int) current_time( 'timestamp' ); // phpcs:ignore WordPress.DateTime.CurrentTimeTimestamp.Requested |