Action
uncanny-automator
automator_configuration_complete
Fires when an Automator configuration is successfully completed and saved, allowing for custom actions.
add_action( 'automator_configuration_complete', $callback, 10, 1 );
Description
Fires after the Automator core configuration is complete, including service and overwrite loading. Developers can use this hook to perform actions that depend on Automator's core setup being finalized. It's ideal for adding custom integrations or performing late-stage setup tasks after the plugin is ready.
Usage
add_action( 'automator_configuration_complete', 'your_function_name', 10, 1 );
Examples
// Example of how to hook into the 'automator_configuration_complete' action.
// This function will be executed after the Automator plugin has finished its core configuration.
// We can use this to perform additional setup or integrations.
add_action( 'automator_configuration_complete', 'my_custom_automator_setup', 10, 0 );
/**
* Performs custom setup after Automator configuration is complete.
*
* @since 1.0.0
*/
function my_custom_automator_setup() {
// Check if a specific custom post type is registered by our theme or another plugin.
$custom_post_type_slug = 'my_custom_data';
if ( post_type_exists( $custom_post_type_slug ) ) {
// If the custom post type exists, we might want to ensure it's available
// for Automator triggers or actions if Automator supports custom post types.
// This is a hypothetical example, as Automator's specific capabilities would determine the actual logic.
// For instance, we might need to register it with Automator's internal systems.
error_log( "Custom post type '{$custom_post_type_slug}' exists. Performing additional setup for Automator integration." );
// Hypothetical: If Automator has a function to register post types for its features:
// if ( function_exists( 'automator_register_post_type_for_triggers' ) ) {
// automator_register_post_type_for_triggers( $custom_post_type_slug );
// }
}
// Another example: If we have a specific option set by our theme that Automator needs to be aware of.
$my_theme_setting = get_option( 'my_theme_advanced_feature_enabled' );
if ( $my_theme_setting === 'yes' ) {
// We might need to adjust Automator's behavior based on this theme setting.
error_log( "My theme's advanced feature is enabled. Adjusting Automator behavior if necessary." );
// Hypothetical: If Automator has a setting that can be influenced:
// update_option( 'automator_feature_x_behavior', 'advanced' );
}
}
Placement
This code should be placed in the functions.php file of your active theme, a custom plugin, or using a code snippets plugin.
Source Code
src/class-automator-load.php:404
src/core/classes/class-initialize-automator.php:126
public function load_automator() {
// If it's not required to load automator, bail
if ( false === LOAD_AUTOMATOR ) {
return;
}
do_action( 'automator_before_configure' );
// Load Utilities
$this->initialize_utilities();
// Load Configuration
$this->initialize_automator_db();
// Load the core files
$this->initialize_core_automator();
// Load the services.
$this->load_services();
// Load system overwrites.
$this->load_overwrites();
do_action( 'automator_configuration_complete' );
add_action( 'wpforms_loaded', array( $this, 'wpforms_integration' ) );
}