Action uncanny-automator

automator_tools_header_after

Fires after the Automator Tools header section has been displayed on the admin page.

add_action( 'automator_tools_header_after', $callback, 10, 1 );

Description

Fires after the main header on Automator admin tools pages. This hook allows developers to add custom content, notifications, or functionality directly below the header but before the main tabbed content of the admin tools section. It's ideal for displaying site-wide alerts or tool-specific summaries.


Usage

add_action( 'automator_tools_header_after', 'your_function_name', 10, 1 );

Examples

add_action( 'automator_tools_header_after', 'my_custom_automator_tools_header_info', 10 );

/**
 * Displays a custom message or information in the Automator Tools header.
 *
 * This function demonstrates how to hook into 'automator_tools_header_after'
 * to add custom content to the Automator plugin's admin tools header.
 *
 * @since 1.0.0
 */
function my_custom_automator_tools_header_info() {
    // Check if we are in the admin area and on an Automator Tools page for context
    if ( is_admin() && isset( $_GET['page'] ) && strpos( $_GET['page'], 'automator' ) !== false ) {
        // Example: Display a subtle informational message
        echo '<div class="notice notice-info is-dismissible">';
        echo '<p><strong>Note:</strong> You are currently viewing the Automator Tools section. Remember to check your recent activity logs.</p>';
        echo '</div>';

        // Example: Conditionally display a link based on a plugin setting or user role
        if ( current_user_can( 'manage_options' ) ) {
            echo '<p><a href="' . esc_url( admin_url( 'admin.php?page=automator-plugin-settings' ) ) . '">Manage Automator Settings</a></p>';
        }
    }
}

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/core/views/admin-logs/admin-logs.php:23
src/core/views/admin-tools/admin-tools.php:23
src/core/views/admin-tools-header.php:20

float: none!important;
	padding-bottom: 0!important;
}
</style>

<div id="uap-settings" class="uap uap-settings" >

	<?php do_action( 'automator_tools_header_after' ); ?>

	<div id="uap-settings-content" class="uap-settings-content">

		<uo-tabs tab="settings" class="uap-settings-content-main-tabs">

			<?php if ( 'focus' !== $layout_version ) { ?>


Internal Usage

Found in src/core/admin/class-activity-log.php:45:

add_action( 'automator_tools_header_after', array( $this, 'recipe_run_cleared' ) );

Found in src/core/admin/notifications/notifications.php:74:

add_action( 'automator_tools_header_after', array( $this, 'show_notifications' ) );
Scroll to Top