Action uncanny-automator

automator_after_settings_form

Fires after the Automator settings form is displayed, allowing custom modifications or additions to the form.

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

Description

Fires after the Automator settings form has been rendered and closed. Use this action to append content, add custom form fields, or perform any necessary cleanup after the main settings form. This hook is ideal for extending the settings page with additional functionalities or information.


Usage

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

Examples

<?php
/**
 * Example of using the 'automator_after_settings_form' action hook.
 * This hook fires after the main Automator settings form has been rendered.
 * It's useful for adding custom meta boxes, notifications, or other elements
 * related to settings management within the WordPress admin area.
 */
add_action( 'automator_after_settings_form', 'my_custom_automator_settings_enhancements', 10, 0 );

/**
 * Adds a custom section or notification after the Automator settings form.
 *
 * @since 1.0.0
 */
function my_custom_automator_settings_enhancements() {
    // Example: Display a custom notice or a link to further documentation.
    $documentation_url = 'https://www.example.com/automator/docs/settings/';
    ?>
    <div class="notice notice-info is-dismissible">
        <p>
            <?php
            echo esc_html__( 'For advanced configuration options, please refer to our ', 'my-textdomain' );
            echo '<a href="' . esc_url( $documentation_url ) . '" target="_blank">' . esc_html__( 'detailed documentation', 'my-textdomain' ) . '</a>.';
            ?>
        </p>
    </div>
    <?php

    // Example: If you needed to output something dynamically based on settings,
    // you might retrieve saved options here.
    // $saved_option = get_option( 'my_automator_custom_setting', 'default_value' );
    // if ( 'special_value' === $saved_option ) {
    //     echo '<p>' . esc_html__( 'A special condition is met, please review your automations carefully.', 'my-textdomain' ) . '</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/includes/automator-settings.php:173
src/core/includes/automator-settings.php:331

do_action_deprecated( 'uap_after_automator_settings', array(), '3.0', 'automator_after_settings' );
						do_action( 'automator_after_settings' );
					}
					?>
				</form>
				<?php
				do_action_deprecated( 'uap_after_automator_settings_form', array(), '3.0', 'automator_after_settings_form' );
				do_action( 'automator_after_settings_form' );
				?>
			</div>
		</div>
	</div>
	<?php
} elseif ( 'settings' === $active ) {


Scroll to Top