@@ -335,6 +335,9 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | + /** |
|
339 | + * @param boolean $render |
|
340 | + */ |
|
338 | 341 | public static function ao_ccss_key_status( $render ) { |
339 | 342 | // Provide key status |
340 | 343 | // Get key and key status. |
@@ -539,6 +542,9 @@ discard block |
||
539 | 542 | return true; |
540 | 543 | } |
541 | 544 | |
545 | + /** |
|
546 | + * @param integer $lvl |
|
547 | + */ |
|
542 | 548 | public static function ao_ccss_log( $msg, $lvl ) { |
543 | 549 | // Commom logging facility |
544 | 550 | // Attach debug option. |
@@ -423,6 +423,9 @@ discard block |
||
423 | 423 | } |
424 | 424 | } |
425 | 425 | |
426 | + /** |
|
427 | + * @param boolean|string $debug |
|
428 | + */ |
|
426 | 429 | public function ao_ccss_api_generate( $path, $debug, $dcode ) { |
427 | 430 | // POST jobs to criticalcss.com and return responses |
428 | 431 | // Get key and key status. |
@@ -559,6 +562,9 @@ discard block |
||
559 | 562 | } |
560 | 563 | } |
561 | 564 | |
565 | + /** |
|
566 | + * @param boolean $debug |
|
567 | + */ |
|
562 | 568 | public function ao_ccss_api_results( $jobid, $debug, $dcode ) { |
563 | 569 | // GET jobs from criticalcss.com and return responses |
564 | 570 | // Get key. |
@@ -625,6 +631,9 @@ discard block |
||
625 | 631 | } |
626 | 632 | } |
627 | 633 | |
634 | + /** |
|
635 | + * @param boolean $review |
|
636 | + */ |
|
628 | 637 | public function ao_ccss_save_file( $ccss, $target, $review ) { |
629 | 638 | // Save critical CSS into the filesystem and return its filename |
630 | 639 | // Prepare review mark. |
@@ -221,6 +221,11 @@ |
||
221 | 221 | return $page_type; |
222 | 222 | } |
223 | 223 | |
224 | + /** |
|
225 | + * @param string $path |
|
226 | + * @param false|string $target |
|
227 | + * @param boolean $create |
|
228 | + */ |
|
224 | 229 | public function ao_ccss_define_job( $path, $target, $type, $hash, $file, $jid, $jrstat, $jvstat, $create ) { |
225 | 230 | // Define a job entry to be created or updated |
226 | 231 | // Define commom job properties. |
@@ -676,6 +676,9 @@ discard block |
||
676 | 676 | return true; |
677 | 677 | } |
678 | 678 | |
679 | + /** |
|
680 | + * @param string $tag |
|
681 | + */ |
|
679 | 682 | private function movetolast( $tag ) |
680 | 683 | { |
681 | 684 | if ( empty( $tag ) ) { |
@@ -733,7 +736,7 @@ discard block |
||
733 | 736 | * @param string $filepath Filepath. |
734 | 737 | * @param bool $cache_miss Optional. Force a cache miss. Default false. |
735 | 738 | * |
736 | - * @return bool|string Url pointing to the minified js file or false. |
|
739 | + * @return false|string Url pointing to the minified js file or false. |
|
737 | 740 | */ |
738 | 741 | public function minify_single( $filepath, $cache_miss = false ) |
739 | 742 | { |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | * be inlined into a data: URI. Defaults to 4096, passed through |
440 | 440 | * `autoptimize_filter_css_datauri_maxsize` filter. |
441 | 441 | * |
442 | - * @return mixed |
|
442 | + * @return integer|null |
|
443 | 443 | */ |
444 | 444 | private function get_datauri_maxsize() |
445 | 445 | { |
@@ -460,6 +460,9 @@ discard block |
||
460 | 460 | return $max_size; |
461 | 461 | } |
462 | 462 | |
463 | + /** |
|
464 | + * @param false|string $url |
|
465 | + */ |
|
463 | 466 | private function check_datauri_exclude_list( $url ) |
464 | 467 | { |
465 | 468 | static $exclude_list = null; |
@@ -485,6 +488,9 @@ discard block |
||
485 | 488 | return $matched; |
486 | 489 | } |
487 | 490 | |
491 | + /** |
|
492 | + * @param false|string $path |
|
493 | + */ |
|
488 | 494 | private function build_or_get_datauri_image( $path ) |
489 | 495 | { |
490 | 496 | /** |
@@ -914,6 +920,11 @@ discard block |
||
914 | 920 | return true; |
915 | 921 | } |
916 | 922 | |
923 | + /** |
|
924 | + * @param string $code |
|
925 | + * |
|
926 | + * @return string |
|
927 | + */ |
|
917 | 928 | public function run_minifier_on( $code ) |
918 | 929 | { |
919 | 930 | if ( ! $this->alreadyminified ) { |
@@ -1135,6 +1146,9 @@ discard block |
||
1135 | 1146 | return $code; |
1136 | 1147 | } |
1137 | 1148 | |
1149 | + /** |
|
1150 | + * @param string $tag |
|
1151 | + */ |
|
1138 | 1152 | private function ismovable( $tag ) |
1139 | 1153 | { |
1140 | 1154 | if ( ! $this->aggregate ) { |
@@ -1164,6 +1178,9 @@ discard block |
||
1164 | 1178 | } |
1165 | 1179 | } |
1166 | 1180 | |
1181 | + /** |
|
1182 | + * @param string $css |
|
1183 | + */ |
|
1167 | 1184 | private function can_inject_late( $css_path, $css ) |
1168 | 1185 | { |
1169 | 1186 | $consider_minified_array = apply_filters( 'autoptimize_filter_css_consider_minified', false, $css_path ); |
@@ -1195,7 +1212,7 @@ discard block |
||
1195 | 1212 | * @param string $filepath Filepath. |
1196 | 1213 | * @param bool $cache_miss Optional. Force a cache miss. Default false. |
1197 | 1214 | * |
1198 | - * @return bool|string Url pointing to the minified css file or false. |
|
1215 | + * @return false|string Url pointing to the minified css file or false. |
|
1199 | 1216 | */ |
1200 | 1217 | public function minify_single( $filepath, $cache_miss = false ) |
1201 | 1218 | { |
@@ -1256,6 +1273,9 @@ discard block |
||
1256 | 1273 | $this->options = $options; |
1257 | 1274 | } |
1258 | 1275 | |
1276 | + /** |
|
1277 | + * @param string $name |
|
1278 | + */ |
|
1259 | 1279 | public function setOption( $name, $value ) |
1260 | 1280 | { |
1261 | 1281 | $this->options[ $name ] = $value; |