Plugin info

Total downloads: 7,806
Active installs: 20
Total reviews: 1
Average rating: 4
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 2
Last updated: 2/17/2022 (1413 days ago)
Added to WordPress: 10/26/2021 (4 years old)
Minimum WordPress version: 5.8
Tested up to WordPress version: 5.8.12
Minimum PHP version: 7.4

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 1413 days ago • 1 reviews

22/100

Is Encute abandoned?

Possibly abandoned (last update 1413 days ago).

Compatibility

Requires WordPress: 5.8
Tested up to: 5.8.12
Requires PHP: 7.4

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Scripts and Styles Manager
Rating 0.0/5 (0 reviews)Active installs 0
WP Scripts & Styles Optimizer
Rating 4.7/5 (15 reviews)Active installs 100
Enhanced Header / Footer Injections
Rating 3.3/5 (7 reviews)Active installs 100
Version Assets
Rating 5.0/5 (1 reviews)Active installs 100
Optimize Scripts & Styles
Rating 5.0/5 (2 reviews)Active installs 70

Description

Encute provides a fluent, declarative API for site owners to manipulate the scripts and styles that WordPress, themes, and plugins shove onto their site. Move things into the footer, defer loading, remove assets entirely. Or load scripts async, or as modules, or as nomodule!

Here’s an example of how you could use the plugin:

 is_page('contact');
    Script::get('contact-form-7')->keepIf($isContactPage)->footer()->defer();
    Style::get('contact-form-7')->keepIf($isContactPage)->footer()->defer();

    Style::get(['mediaelement', 'wp-mediaelement'])->footer()->defer();
    Style::get('material-icons')->defer();
    Script::get('jquery')->remove();
});

Wrapper

Always run code in this wrapper:

add_action(\CWS\Encute\Plugin::class, function (\CWS\Encute\Plugin $encute) {
    // Your code here.
});

This wrapper will be a no-op if Encute is not available, and it will both wait for Encute to be available to run, and pass you Encute’s main class instance.

Fluency

Both Script::get() and Style::get() return an instance of themselves, as do all calls to their methods, so you can just chain your calls.

Script

  • static CWS\Encute\Script::get(string $handle): CWS\Encute\Script — get a Script instance for that handle.
  • CWS\Encute\Script::module(): CWS\Encute\Script — make the script a module.
  • CWS\Encute\Script::noModule(): CWS\Encute\Script — make the script nomodule.
  • CWS\Encute\Script::footer(): CWS\Encute\Script — send the script to the footer (along with its entire dependency family).
  • CWS\Encute\Script::async(): CWS\Encute\Script — make the script async.
  • CWS\Encute\Script::defer(): CWS\Encute\Script — make the script defer.
  • CWS\Encute\Script::remove(): CWS\Encute\Script — remove the script.
  • CWS\Encute\Script::removeIf(callable $callback): CWS\Encute\Script — remove the script if the callback resolves as true.
  • CWS\Encute\Script::keepIf(callable $callback): CWS\Encute\Script — keep the script if the callback resolves as true (else remove it).

Style

  • static CWS\Encute\Style::get(string $handle): CWS\Encute\Style — get a Style instance for that handle.
  • CWS\Encute\Style::footer(): CWS\Encute\Style — send the style to the footer (along with its entire dependency family).
  • CWS\Encute\Style::defer(): CWS\Encute\Style — defer the style’s loading.
  • CWS\Encute\Style::remove(): CWS\Encute\Style — remove the style.
  • CWS\Encute\Style::removeIf(callable $callback): CWS\Encute\Style — remove the style if the callback resolves as true.
  • CWS\Encute\Style::keepIf(callable $callback): CWS\Encute\Style — keep the style if the callback resolves as true (else remove it).

Installation

No installation instructions available

Frequently Asked Questions

How do I use this?

Go to Tools > Encute and you’ll be guided through code generation.

Can’t I do this through a UI?

Not currently. This is a pro-level tool. You need to know what you’re doing. If writing code isn’t for you, then this plugin probably isn’t for you.

Review feed

No reviews available

Screenshots

  1. Code generation inside the plugin.

    Code generation inside the plugin.

Changelog

No changelog available