| @@ 128-130 (lines=3) @@ | ||
| 125 | public function extra_async_js( $in ) |
|
| 126 | { |
|
| 127 | $exclusions = array(); |
|
| 128 | if ( ! empty( $in ) ) { |
|
| 129 | $exclusions = array_fill_keys( array_filter( array_map( 'trim', explode( ',', $in ) ) ), '' ); |
|
| 130 | } |
|
| 131 | ||
| 132 | $settings = $this->options['autoptimize_extra_text_field_3']; |
|
| 133 | $async = array_fill_keys( array_filter( array_map( 'trim', explode( ',', $settings ) ) ), '' ); |
|
| @@ 838-840 (lines=3) @@ | ||
| 835 | // add from setting. |
|
| 836 | if ( array_key_exists( 'autoptimize_imgopt_text_field_5', $options ) ) { |
|
| 837 | $exclude_lazyload_option = $options['autoptimize_imgopt_text_field_5']; |
|
| 838 | if ( ! empty( $exclude_lazyload_option ) ) { |
|
| 839 | $exclude_lazyload_array = array_merge( $exclude_lazyload_array, array_filter( array_map( 'trim', explode( ',', $options['autoptimize_imgopt_text_field_5'] ) ) ) ); |
|
| 840 | } |
|
| 841 | } |
|
| 842 | ||
| 843 | // and filter for developer-initiated changes. |
|
| @@ 210-212 (lines=3) @@ | ||
| 207 | ||
| 208 | // only optimize known good JS? |
|
| 209 | $whitelist_js = apply_filters( 'autoptimize_filter_js_whitelist', '', $this->content ); |
|
| 210 | if ( ! empty( $whitelist_js ) ) { |
|
| 211 | $this->whitelist = array_filter( array_map( 'trim', explode( ',', $whitelist_js ) ) ); |
|
| 212 | } |
|
| 213 | ||
| 214 | // is there JS we should simply remove? |
|
| 215 | $removable_js = apply_filters( 'autoptimize_filter_js_removables', '', $this->content ); |
|
| @@ 216-218 (lines=3) @@ | ||
| 213 | ||
| 214 | // is there JS we should simply remove? |
|
| 215 | $removable_js = apply_filters( 'autoptimize_filter_js_removables', '', $this->content ); |
|
| 216 | if ( ! empty( $removable_js ) ) { |
|
| 217 | $this->jsremovables = array_filter( array_map( 'trim', explode( ',', $removable_js ) ) ); |
|
| 218 | } |
|
| 219 | ||
| 220 | // only header? |
|
| 221 | if ( apply_filters( 'autoptimize_filter_js_justhead', $options['justhead'] ) ) { |
|
| @@ 172-174 (lines=3) @@ | ||
| 169 | } |
|
| 170 | ||
| 171 | $whitelist_css = apply_filters( 'autoptimize_filter_css_whitelist', '', $this->content ); |
|
| 172 | if ( ! empty( $whitelist_css ) ) { |
|
| 173 | $this->whitelist = array_filter( array_map( 'trim', explode( ',', $whitelist_css ) ) ); |
|
| 174 | } |
|
| 175 | ||
| 176 | $removable_css = apply_filters( 'autoptimize_filter_css_removables', '' ); |
|
| 177 | if ( ! empty( $removable_css ) ) { |
|
| @@ 177-179 (lines=3) @@ | ||
| 174 | } |
|
| 175 | ||
| 176 | $removable_css = apply_filters( 'autoptimize_filter_css_removables', '' ); |
|
| 177 | if ( ! empty( $removable_css ) ) { |
|
| 178 | $this->cssremovables = array_filter( array_map( 'trim', explode( ',', $removable_css ) ) ); |
|
| 179 | } |
|
| 180 | ||
| 181 | $this->cssinlinesize = apply_filters( 'autoptimize_filter_css_inlinesize', 256 ); |
|
| 182 | ||