Action
uncanny-automator-pro
uapro_plugin_loaded
Fires after the UA Pro plugin has been completely loaded and is ready for use.
add_action( 'uapro_plugin_loaded', $callback, 10, 1 );
Description
Fires after Uncanny Automator Pro has been fully loaded and initialized. Developers can use this hook to safely interact with Automator Pro's core functionality, register custom actions or triggers, or perform other setup tasks that depend on the plugin being ready. It runs very early in the WordPress load cycle.
Usage
add_action( 'uapro_plugin_loaded', 'your_function_name', 10, 1 );
Examples
// Register a function to run after the Uncanny Automator Pro plugin has loaded.
// This can be used to initialize custom integrations or perform actions that depend on Automator Pro being fully available.
add_action( 'uapro_plugin_loaded', 'my_custom_automator_pro_integration', 10, 0 );
/**
* Initializes custom integration with Uncanny Automator Pro.
*
* This function is called after Uncanny Automator Pro has finished loading its core components.
* It can be used to register new triggers, actions, conditions, or other custom elements
* that rely on Uncanny Automator Pro's API being ready.
*
* @since 1.0.0
*/
function my_custom_automator_pro_integration() {
// For example, you might want to check if a specific Automator Pro feature is enabled
// before proceeding with your integration.
if ( class_exists( 'Uncanny_Automator_ProAutomator_Pro_Loader' ) ) {
// Get the main Automator Pro instance if needed.
// Note: Accessing internal classes like this can be fragile across updates.
// Always check if Uncanny Automator provides a public API for such interactions.
$automator_pro = Uncanny_Automator_ProAutomator_Pro_Loader::get_instance();
// Here you would typically register your custom Automator Pro elements.
// This is a placeholder; actual registration methods would depend on Automator Pro's SDK.
// For demonstration, let's just log a message.
error_log( 'My Custom Integration: Uncanny Automator Pro plugin has loaded. Ready to register custom elements.' );
// Example: Register a custom trigger (this is hypothetical, as the actual method is unknown)
// Automator_Pro_Triggers::register_trigger( 'my_custom_trigger', My_Custom_Trigger_Class::class );
// Example: Register a custom action
// Automator_Pro_Actions::register_action( 'my_custom_action', My_Custom_Action_Class::class );
} else {
error_log( 'My Custom Integration: Uncanny Automator Pro plugin class not found. Integration may not function correctly.' );
}
}
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
uncanny-automator-pro/src/class-automator-pro-load.php:88
private function boot_plugin() {
include_once __DIR__ . DIRECTORY_SEPARATOR . 'boot.php';
Boot::get_instance();
do_action( 'uapro_plugin_loaded' );
}