@@ -221,7 +221,7 @@ |
||
| 221 | 221 | /** |
| 222 | 222 | * Filter and replace HTML element. |
| 223 | 223 | * |
| 224 | - * @param array $matches Array of matches. |
|
| 224 | + * @param string[] $matches Array of matches. |
|
| 225 | 225 | */ |
| 226 | 226 | private static function dispatch( $matches ) { |
| 227 | 227 | $html = preg_replace( '%�*58;//%', '://', $matches[0] ); |
@@ -271,6 +271,9 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | + /** |
|
| 275 | + * @param string $type |
|
| 276 | + */ |
|
| 274 | 277 | static function get_video_poster( $type, $id ) { |
| 275 | 278 | if ( 'videopress' == $type ) { |
| 276 | 279 | if ( function_exists( 'video_get_highest_resolution_image_url' ) ) { |
@@ -356,6 +359,9 @@ discard block |
||
| 356 | 359 | return (int) count( self::split_content_in_words( self::clean_text( $post_content ) ) ); |
| 357 | 360 | } |
| 358 | 361 | |
| 362 | + /** |
|
| 363 | + * @param string $excerpt_content |
|
| 364 | + */ |
|
| 359 | 365 | static function get_word_remaining_count( $post_content, $excerpt_content ) { |
| 360 | 366 | $content_word_count = count( self::split_content_in_words( self::clean_text( $post_content ) ) ); |
| 361 | 367 | $excerpt_word_count = count( self::split_content_in_words( self::clean_text( $excerpt_content ) ) ); |
@@ -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; |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | /** |
| 143 | 143 | * Plugin options getter |
| 144 | 144 | * |
| 145 | - * @param string|array $option Option name. |
|
| 145 | + * @param string $option Option name. |
|
| 146 | 146 | * @param mixed $default Default value. |
| 147 | 147 | * |
| 148 | 148 | * @return mixed Option value |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | * |
| 159 | 159 | * @param string $url Soundcloud URL. |
| 160 | 160 | * |
| 161 | - * @return boolean |
|
| 161 | + * @return integer |
|
| 162 | 162 | */ |
| 163 | 163 | function soundcloud_url_has_tracklist( $url ) { |
| 164 | 164 | return preg_match( '/^(.+?)\/(sets|groups|playlists)\/(.+?)$/', $url ); |
@@ -228,6 +228,9 @@ |
||
| 228 | 228 | ); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | + /** |
|
| 232 | + * @param Queue $queue |
|
| 233 | + */ |
|
| 231 | 234 | protected function get_buffer( $queue, $number_of_items ) { |
| 232 | 235 | $start = time(); |
| 233 | 236 | $max_duration = 5; // this will try to get the buffer |
@@ -148,6 +148,7 @@ discard block |
||
| 148 | 148 | * Helper function that is used when getting home or siteurl values. Decides |
| 149 | 149 | * whether to get the raw or filtered value. |
| 150 | 150 | * |
| 151 | + * @param string $url_type |
|
| 151 | 152 | * @return string |
| 152 | 153 | */ |
| 153 | 154 | public static function get_raw_or_filtered_url( $url_type ) { |
@@ -197,6 +198,9 @@ discard block |
||
| 197 | 198 | return self::get_protocol_normalized_url( 'main_network_site_url', network_site_url() ); |
| 198 | 199 | } |
| 199 | 200 | |
| 201 | + /** |
|
| 202 | + * @param string $callable |
|
| 203 | + */ |
|
| 200 | 204 | public static function get_protocol_normalized_url( $callable, $new_value ) { |
| 201 | 205 | $option_key = self::HTTPS_CHECK_OPTION_PREFIX . $callable; |
| 202 | 206 | |
@@ -236,6 +240,9 @@ discard block |
||
| 236 | 240 | return $value; |
| 237 | 241 | } |
| 238 | 242 | |
| 243 | + /** |
|
| 244 | + * @param string $url_function |
|
| 245 | + */ |
|
| 239 | 246 | public static function normalize_www_in_url( $option, $url_function ) { |
| 240 | 247 | $url = wp_parse_url( call_user_func( $url_function ) ); |
| 241 | 248 | $option_url = wp_parse_url( get_option( $option ) ); |
@@ -177,6 +177,9 @@ |
||
| 177 | 177 | $queue->add_all( $data_to_enqueue ); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | + /** |
|
| 181 | + * @param Queue $queue |
|
| 182 | + */ |
|
| 180 | 183 | function enqueue_action( $current_filter, $args, $queue ) { |
| 181 | 184 | // don't enqueue an action during the outbound http request - this prevents recursion |
| 182 | 185 | if ( Settings::is_sending() ) { |