| @@ 93-95 (lines=3) @@ | ||
| 90 | public function extra_async_js( $in ) |
|
| 91 | { |
|
| 92 | $exclusions = array(); |
|
| 93 | if ( ! empty( $in ) ) { |
|
| 94 | $exclusions = array_fill_keys( array_filter( array_map( 'trim', explode( ',', $in ) ) ), '' ); |
|
| 95 | } |
|
| 96 | ||
| 97 | $settings = $this->options['autoptimize_extra_text_field_3']; |
|
| 98 | $async = array_fill_keys( array_filter( array_map( 'trim', explode( ',', $settings ) ) ), '' ); |
|
| @@ 55-57 (lines=3) @@ | ||
| 52 | ||
| 53 | // only optimize known good JS? |
|
| 54 | $whitelistJS = apply_filters( 'autoptimize_filter_js_whitelist', '', $this->content ); |
|
| 55 | if ( ! empty( $whitelistJS ) ) { |
|
| 56 | $this->whitelist = array_filter( array_map( 'trim', explode( ',', $whitelistJS ) ) ); |
|
| 57 | } |
|
| 58 | ||
| 59 | // is there JS we should simply remove? |
|
| 60 | $removableJS = apply_filters( 'autoptimize_filter_js_removables', '', $this->content ); |
|
| @@ 61-63 (lines=3) @@ | ||
| 58 | ||
| 59 | // is there JS we should simply remove? |
|
| 60 | $removableJS = apply_filters( 'autoptimize_filter_js_removables', '', $this->content ); |
|
| 61 | if (!empty($removableJS)) { |
|
| 62 | $this->jsremovables = array_filter( array_map( 'trim', explode( ',', $removableJS ) ) ); |
|
| 63 | } |
|
| 64 | ||
| 65 | // only header? |
|
| 66 | if ( apply_filters( 'autoptimize_filter_js_justhead', $options['justhead'] ) ) { |
|
| @@ 62-64 (lines=3) @@ | ||
| 59 | } |
|
| 60 | ||
| 61 | $whitelistCSS = apply_filters( 'autoptimize_filter_css_whitelist', '', $this->content ); |
|
| 62 | if ( ! empty( $whitelistCSS ) ) { |
|
| 63 | $this->whitelist = array_filter( array_map( 'trim', explode( ',', $whitelistCSS ) ) ); |
|
| 64 | } |
|
| 65 | ||
| 66 | $removableCSS = apply_filters( 'autoptimize_filter_css_removables', '' ); |
|
| 67 | if ( ! empty( $removableCSS ) ) { |
|
| @@ 67-69 (lines=3) @@ | ||
| 64 | } |
|
| 65 | ||
| 66 | $removableCSS = apply_filters( 'autoptimize_filter_css_removables', '' ); |
|
| 67 | if ( ! empty( $removableCSS ) ) { |
|
| 68 | $this->cssremovables = array_filter( array_map( 'trim', explode( ',', $removableCSS ) ) ); |
|
| 69 | } |
|
| 70 | ||
| 71 | $this->cssinlinesize = apply_filters( 'autoptimize_filter_css_inlinesize', 256 ); |
|
| 72 | ||
| @@ 780-782 (lines=3) @@ | ||
| 777 | // add from setting. |
|
| 778 | if ( array_key_exists( 'autoptimize_imgopt_text_field_5', $options ) ) { |
|
| 779 | $exclude_lazyload_option = $options['autoptimize_imgopt_text_field_5']; |
|
| 780 | if ( ! empty( $exclude_lazyload_option ) ) { |
|
| 781 | $exclude_lazyload_array = array_merge( $exclude_lazyload_array, array_filter( array_map( 'trim', explode( ',', $options['autoptimize_imgopt_text_field_5'] ) ) ) ); |
|
| 782 | } |
|
| 783 | } |
|
| 784 | ||
| 785 | // and filter for developer-initiated changes. |
|