Skip to content

Commit

Permalink
Use scricto code rule for jquery script
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Dec 14, 2017
1 parent a266897 commit 61e4b31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions must_use_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function get_mu_plugins() {
foreach ( $mu_plugins as $plugin_file => $not_used ) {
// Skip files directly at root
// And skip folders starting with an underscore as we want to turn those plugins off.
if ( '.' !== dirname( $plugin_file ) && dirname($plugin_file)[0] !== '_' ) {
if ( '.' !== dirname( $plugin_file ) && dirname( $plugin_file )[0] !== '_' ) {
$plugins[] = $plugin_file;
}
}
Expand Down Expand Up @@ -293,7 +293,7 @@ public function change_view_values() {

$item = sprintf( _n( 'item', 'items', $this->mustuse_total ), number_format_i18n( $this->mustuse_total ) ); ?>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
( function( $ ) {
let text,
value,
mustuse,
Expand All @@ -312,7 +312,7 @@ public function change_view_values() {
if ( document.URL.search( /plugin_status=mustuse/ ) !== - 1 ) {
$( '.tablenav .displaying-num' ).replaceWith( mustuse );
}
} );
}( jQuery );
</script>
<?php
}
Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ define( 'WPMU_PLUGIN_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wpmu-plugins' )
```

### Exclude plugins from loader
You can remove plugins detected by the "Must Use Loader" from the loading process by using the `must_use_loader.mu_plugins` filter.
On default exclude the plugin all plugin files, there start with an underline `_`.
But you can remove plugins detected by the "Must Use Loader" from the loading process by using the `must_use_loader.mu_plugins` filter.
Example:
```php
function prefix_unset_autoloading( $mu_plugins ) {
Expand Down

0 comments on commit 61e4b31

Please sign in to comment.