Assets Manager

  1. Documentation
  2. Assets Manager
  3. Assets Manager

Описание 

Assets Manager – это и отдельный плагин и компонент плагина Clearfy, который позволит вам отключить не нужные вам ресурсы на некоторых страницах вашего сайта, где вам это не нужно. Например вам не нужен Contact Form 7 на главной странице вашего сайта, вы можете полностью отключить этот плагин на всех страницах кроме страницы контакты. Другой пример, вы хотите отключить js скрипт вашей темы, который показывает кнопку Scroll UP на всех страницах кроме главной и постов. Примеров может быть много, но вы должны быть осторожны, отключение скриптов тем или плагинов, полною отключение плагинов на странице, может повредить внешний вид вашего сайта а возможно и вызвать ошибки на той странице где вы это отключили, пожалуйста проверяйте работу вашего сайта после того как вы сохраните настройки Assets Manager.   

Assets Manager имеет 2 версии бесплатную и Pro версию. Бесплатную версию вы можете получить, установив её из репозитория WordPress. Также вы можете  установить плагин Clear из репозитория WordPress, где есть бесплатный компонент Assets Manager. 

Assets Manager Pro есть только в виде компонента Clearfy Premium, вы можете приобрести Clearfy Premium чтобы получить Assets Manager Pro.

 

С чего начать

Убедитесь что плагин Assets manager 

Assets Manager

или компонент Assets manager в Clearfy активен.

Assets Manager

Проверьте, не отключили ли вы случайно Assets Manager на фронтенде вашего сайта. 

Если вы используете плагин Assets Manager, перейдите в Setting -> Assets manager -> General. 

Если вы используете компонент Assets Manager в Clearfy то перейдите в Settings-> Performance -> Assets Manager.

Убедитесь что опция Disable Assets manager находится в состоянии Off, как и 2 другие опции ниже.

Assets Manager

Перейдите на фронтенде вашего сайта, на страницу, на которой вы хотите отключить какие либо ресурсы. В верхней части страницы, в wp toolbar вы увидите вот такой пункт, если вы используете плагин Assets Manager, нажмите на него.

Assets Manager

Если вы используете Assets Manager компонент плагина Clearfy, то все выглядит немного по другому. Найдите пункт как на скриншоте ниже

Assets Manager

Наведите на пункт и нажмите на Assets Manager

Assets Manager

Assets Manager – позволяет вам оптимизировать каждую страницу на фронтенде вашего сайта. Перейдите на нужную вам страницу и откройте на ней Assets Manager. Да оптимизация каждый страницы может занять много времени, если у вас много страниц на сайте, поэтому мы рекомендуем применять массовый правила которые позволят охватить все или некоторые группы страниц вашего сайта.

Интерфейс Assets Manager

Assets Manager Top Bar 

Assets Manager

Total requests – Количество файлов js и css скриптов загруженных на этой странице. Считаются только те скрипты, которые были подключены с помощью функций WordPress, например wp_enqueue_script(), wp_enqueue_style() и т.п. Если скрипт подключен иначе, Assets Manager его не увидит.  

Total size – объем всех скриптов на данной странице

Optimized size – объем всех скриптов на данной странице. По умолчанию он равен Total size но если вы отключите какой то скрипт на этой странице то объем Optimized size будет меньше Total size. 

Если упростить то Total size это “Было”, Optimized size “Стало”

Disabled js  – количество отключенных js скриптов

Disabled css – количество отключенных стилей

Save – сохранить сделанные вами настройки на текущей странице

Reset – сбросить настройки, которые заданы на текущей странице

Safe mode (PRO) – In test mode, you can experiment with disabling unused scripts safely for your site. The resources that you disabled will be visible only to you (the administrator), and all other users will receive an unoptimized version of the site, until you remove this tick.

 

Exit – выйти из Assets Manager

Assets Manager

left Sidebar

Assets Manager

Тут все просто, расскажем только про Misc. Здесь вы найдете некоторые скрипты ядра WordPress и внешние скрипты, например js библиотеки подключаемые из cdnjs.com, google fonts и т.п.

 

Work Area

Plugins, выберите плагин с ресурсами которого вы хотите работать. 

Assets Manager

Массовые действия с ресурсами данного плагина 

Assets Manager

Точечное отключение ресурса выбранного плагина 

Assets Manager

Move to Footer – This function will force a script or style from the header to the footer. This can fix problems of blocking page rendering.

При отключении скрипта появляется условная логика отключения скрипта.

Assets Manager

При выборе Don’t load plugin assets или Don’t load plugin, появляется условная логика отключения. 

Assets Manager

При отключении скриптов, вы можете увидеть зависимости других скриптов от этого скрипта. Да Assets Manager не всегда понимает зависимости, но если он показывает это, вы в курсе.

Assets Manager

Assets Manager

  1. Documentation
  2. Assets Manager
  3. Assets Manager

Description

Assets Manager is a separate plugin and a Clearfy component that disables unused resources on your website pages. For example, you don’t need Contact Form 7 on a home page. In this case, you can simply disable Contact Form 7 on all pages, except for the Contacts page. Or you want to disable a js script of your theme that shows the Scroll UP button on all pages, except for the main page and posts. There are many use cases to mention. But be careful disabling scripts of themes and plugins and blocking plugins on website pages. Keep in mind that it can ruin the appearance and, in some cases, cause errors on pages. We recommend re-checking how the website works after saving the Assets Manager settings.   

Assets Manager has two versions: free and premium. You can download a free version from the WordPress repository. You can also install the Clearfy plugin with the Assets Manager free component from the repository. 

Assets Manager Pro exists only as a form of the Clearfy Premium component. To get Assets Manager Pro, you should purchase Clearfy Premium.

Getting Started

Make sure that you have an active Assets manager plugin 

Assets Manager

Or an active Assets manager component in Clearfy.

Assets Manager

Double-check that you haven’t disabled Assets Manager on your website frontend. 

If you use the Assets Manager plugin, navigate to Setting -> Assets manager -> General

If you use the Assets Manager component in Clearfy, navigate to Settings-> Performance -> Assets Manager.

The Disable Assets manager toddler should be in the OFF position as well as the two features below.

Assets Manager

Go to your website frontend and open the page where you’d like to disable resources on. The wp toolbar (the upper side of the website) in the Assets Manager plugin shows this. Click it.

Assets Manager

For the Assets Manager component in Clearfy, the procedure is a bit different. Find the option shown on the screenshot below:

Assets Manager

Hover over it and click Assets Manager.

Assets Manager

Assets Manager helps to optimize each page on your website frontend. Open the necessary page and Assets Manager on it. The optimization of each page takes time, especially if there are many pages on your website. That’s why we recommend considering bulk rules that apply to all or several groups of pages on the website.

The Assets Manager Interface

Assets Manager Top Bar 

Assets Manager

Total requests – the number of js and CSS script files loaded on the page. Here you see only scripts connected via the WordPress functions, such as wp_enqueue_script(), wp_enqueue_style(), etc. If the script was connected differently, Assets Manager wouldn’t see it.  

 

Total size – the volume of all scripts on the page.

Optimized size shows the volume of all scripts on the page. By default, it is equal to Total size. But if you disable a script on the page, the Optimized size will be less than Total size

In other words, Total size is ‘before’ and Optimized size is ‘after’.

Disabled js shows the number of disabled js scripts.

Disabled css shows the number of disabled styles.

Save saves the settings of the current page.

Reset resets all settings for the page.

Safe mode (PRO) – In test mode, you can experiment with disabling unused scripts safely for your site. The resources that you disabled will be visible only to you (the administrator), and all other users will receive an unoptimized version of the site, until you remove this tick.

Assets Manager

Exit – exit from Assets Manager.

 

left Sidebar

Assets Manager

It’s pretty simple. So let’s talk about Misc. Here you can find some WordPress core scripts and external scripts, such as js libraries connected from cdnjs.com, google fonts, etc.

 

Work Area

Plugins – select the plugin with the resources you’d like to modify. 

Assets Manager

Bulk actions with the plugin resources:

Assets Manager

Custom disabling of the plugin resources:

Assets Manager

Move to Footer – This function will force a script or style from the header to the footer. This can fix problems of blocking page rendering.

When disabling a script, you will see the conditional logic of the process.

Assets Manager

When selecting Don’t load plugin assets or Don’t load plugin, you will see the conditional logic of disabling. 

Assets Manager
When disabling a script, you can also see the dependencies of other scripts. Yes, Assets Manager may not always recognize dependencies, but at least you know about it.

Assets Manager