Skip to content

Commit

Permalink
JS/ CSS exclusions don't need (or accept) wildcards/ regex patterns.
Browse files Browse the repository at this point in the history
  • Loading branch information
futtta committed Dec 29, 2023
1 parent c93c339 commit e01ca59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions classes/autoptimizeConfig.php
Expand Up @@ -119,7 +119,8 @@ public function show_config()
margin-top: 0;
}

input[type=url]:invalid {color: red; border-color:red;} .form-table th{font-weight:normal;}
.form-table th{font-weight:normal;}
#autoptimize_main form input:invalid {box-shadow: 0 0 1px 1px red;}
#autoptimize_main .cb_label {display: block; padding-left: 25px; text-indent: -25px;}
#autoptimize_main .form-table th {padding-top: 15px; padding-bottom: 15px;}
#autoptimize_main .js_aggregate td, #autoptimize_main .js_aggregate th, #autoptimize_main .js_not_aggregate td, #autoptimize_main .js_not_aggregate th{padding-top:0px;}
Expand Down Expand Up @@ -282,7 +283,7 @@ public function show_config()
<?php } ?>
<tr valign="top" class="js_sub">
<th scope="row"><?php esc_html_e( 'Exclude scripts from Autoptimize:', 'autoptimize' ); ?></th>
<td><label><input type="text" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo esc_attr( autoptimizeOptionWrapper::get_option( 'autoptimize_js_exclude', '' ) ); ?>"/><br />
<td><label><input type="text" pattern="[^\*]*" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo esc_attr( autoptimizeOptionWrapper::get_option( 'autoptimize_js_exclude', '' ) ); ?>"/><br />
<?php
echo esc_html__( 'A comma-separated list of scripts you do not want optimized, for example \'whatever.js, my_var\' (without the quotes).', 'autoptimize' ) . ' ' . esc_html__( 'Important: when "aggregate JS-files" is on, excluded non-minified files are still minified by Autoptimize unless that option under "misc" is disabled.', 'autoptimize' );
?>
Expand Down Expand Up @@ -352,7 +353,7 @@ public function show_config()
</tr>
<tr valign="top" class="css_sub">
<th scope="row"><?php esc_html_e( 'Exclude CSS from Autoptimize:', 'autoptimize' ); ?></th>
<td><label><input type="text" style="width:100%;" name="autoptimize_css_exclude" value="<?php echo esc_attr( $conf->get( 'autoptimize_css_exclude', '' ) ); ?>"/><br />
<td><label><input type="text" pattern="[^\*]*" style="width:100%;" name="autoptimize_css_exclude" value="<?php echo esc_attr( $conf->get( 'autoptimize_css_exclude', '' ) ); ?>"/><br />
<?php
echo esc_html__( 'A comma-separated list of CSS you want to exclude from being optimized.', 'autoptimize' ) . ' ' . esc_html__( 'Important: excluded non-minified files are still minified by Autoptimize unless that option under "misc" is disabled.', 'autoptimize' );
?>
Expand Down

0 comments on commit e01ca59

Please sign in to comment.