@@ -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; |