Introduction

The Scripts UI allows developers to manage and run advanced PHP scripts on their server. One of the main advantage of the module is that it run tasks recursively in ajax, which means it can handle dozen of thousands of posts without hitting the server’s resources limit.

The module is located in the “Tools > Scripts” admin menu and comes bundled with useful builtin scripts.

ACF Extended
Howdy, ACF Extended
Scripts
Events
00:00:00
Ready
Orphan Meta Cleaner
Clean orphan meta from Posts, Pages and Custom Post Type.
PHP Max Execution Time: 60
PHP Memory Limit: 4096M
Settings

Builtin Scripts

Orphan Meta Cleaner

The Orphan Meta Cleaner script will clean ACF metadata which don’t exist anymore (deleted from Field Groups) or which aren’t supposed to be used since the related Field Group Locations Rules doesn’t match the said object anymore. It is compatible with all WordPress objects: Post Types, Taxonomies, Users and Options Pages.

Script Launcher

The Script Launcher allows to easily & quickly launch scripts using PHP hooks, without the hassle of registering a complete class. Useful to run simple maintenance scripts while enjoying all the benefits of the recursive approach and tools. Learn more.

Performance Converter

The Performance Converter Script allows developers to convert WordPress objects (Post Types, Taxonomies, Users and Options Pages) metadata into the Performance Engine format, or back to Normal Meta in batch.

Custom Scripts

The powerful part of the Scripts UI is that it comes with a fully fleshed API, allowing developers to create their own script with its own set of settings and behavior.

Learn more

Demo Scripts

The module also features demo scripts which allow developers to take a look at different possible implementation of complex scripts. The following demo scripts are available: Count Posts, Export Posts and Import Posts.

Demo Scripts are disabled by default. It can be enabled and disabled in the Settings UIPRO, or with the following code:

add_action('acf/init', 'my_acfe_modules');
function my_acfe_modules(){

    // enable demo scripts
    acf_update_setting('acfe/modules/scripts/demo', true);
    
}

Hide Module Menu

ACF Extended use the native ACF setting show_admin to determine if the module menu should be displayed or not. You can read more about that setting on the ACF article How to hide ACF menu from clients. Usage example:

add_filter('acf/settings/show_admin', '__return_false');

Disable The Module

The Scripts UI module is enabled by default. It can be enabled and disabled in the Settings UIPRO, or with the following code:

Using acf/init

add_action('acf/init', 'my_acfe_modules');
function my_acfe_modules(){

    // disable scripts
    acf_update_setting('acfe/modules/scripts', false);
    
}

Using acfe/init

add_action('acfe/init', 'my_acfe_modules');
function my_acfe_modules(){
    
    // disable scripts
    acfe_update_setting('modules/scripts', false);
    
}