Title: Encute
Author: Mark Jaquith
Published: <strong>2021년 10월 26일</strong>
Last modified: 2022년 2월 17일

---

플러그인 검색

![](https://ps.w.org/encute/assets/banner-772x250.png?rev=2620522)

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://ps.w.org/encute/assets/icon-256x256.png?rev=2620522)

# Encute

 작성자: [Mark Jaquith](https://profiles.wordpress.org/markjaquith/)

[다운로드](https://downloads.wordpress.org/plugin/encute.0.8.8.zip)

 * [세부사항](https://ko.wordpress.org/plugins/encute/#description)
 * [평가](https://ko.wordpress.org/plugins/encute/#reviews)
 * [개발](https://ko.wordpress.org/plugins/encute/#developers)

 [지원](https://wordpress.org/support/plugin/encute/)

## 설명

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:

    ```
    <?php

    use CWS\Encute\{ Plugin, Script, Style };

    add_action(Plugin::class, function (Plugin $plugin) {
        $isContactPage = fn () => 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).

## 스크린샷

[⌊Code generation inside the plugin.⌉⌊Code generation inside the plugin.⌉[

Code generation inside the plugin.

## FAQ

### 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.

## 후기

![](https://secure.gravatar.com/avatar/013fd021aeb178ed6e14273f5729b815e8c53fa17d7c3e0a07163e7c0bbf8edc?
s=60&d=retro&r=g)

### 󠀁[Useful tool](https://wordpress.org/support/topic/useful-tool-98/)󠁿

 [a2d](https://profiles.wordpress.org/a2d/) 2021년 12월 12일

Given 4 stars because early days with this plugin, but it does it’s job and gives
full control of scripts/styles which many free plugins don’t. There’s a few points
that might not be clear from the documentation: The ‘plugin’ requires PHP 7.4 or
higher If you don’t have a directory at /wp-content/mu-plugins then create one and
put encute.php in it At first, tick the “Show debug HTML comments around scripts
and styles” checkbox. This outputs useful comments around script and style blocks
with the handle of each. You need this handle to set up ‘rules’. The plugin works
fine and the code generation tool is useful, but doesn’t remember ‘rules’ you add.
Would be useful if the plugin had a link (in new window) to the plugin description
page for code reference

 [ 모든 1 평가 읽기 ](https://wordpress.org/support/plugin/encute/reviews/)

## 기여자 & 개발자

“Encute”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

 *   [ Mark Jaquith ](https://profiles.wordpress.org/markjaquith/)

[자국어로 “Encute”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/encute)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/encute/)는, [SVN 저장소](https://plugins.svn.wordpress.org/encute/)
를 확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/encute/)을 [RSS](https://plugins.trac.wordpress.org/log/encute/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 기초

 *  버전 **0.8.8**
 *  최근 업데이트: **4년 전**
 *  활성화된 설치 **20+**
 *  워드프레스 버전 ** 5.8 또는 그 이상 **
 *  다음까지 시험됨: **5.8.13**
 *  PHP 버전 ** 7.4 또는 그 이상 **
 *  언어
 * [English (US)](https://wordpress.org/plugins/encute/)
 * 태그:
 * [performance](https://ko.wordpress.org/plugins/tags/performance/)[scripts](https://ko.wordpress.org/plugins/tags/scripts/)
   [styles](https://ko.wordpress.org/plugins/tags/styles/)
 *  [고급 보기](https://ko.wordpress.org/plugins/encute/advanced/)

## 평점

 별 5점 만점에 4점.

 *  [  0/5-별점 후기     ](https://wordpress.org/support/plugin/encute/reviews/?filter=5)
 *  [  1/4-별점 후기     ](https://wordpress.org/support/plugin/encute/reviews/?filter=4)
 *  [  0/3-별점 후기     ](https://wordpress.org/support/plugin/encute/reviews/?filter=3)
 *  [  0/2-별점 후기     ](https://wordpress.org/support/plugin/encute/reviews/?filter=2)
 *  [  0/1-별점 후기     ](https://wordpress.org/support/plugin/encute/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/encute/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/encute/reviews/)

## 기여자

 *   [ Mark Jaquith ](https://profiles.wordpress.org/markjaquith/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/encute/)