Action uncanny-automator

automator_settings_general_improve_automator_content

Fires on the general Automator settings page to allow customization of Automator content improvements.

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

Description

Fires within the "Improve Automator" section of the Uncanny Automator general settings tab. Developers can use this action hook to add custom content, such as additional options, links, or information, to this specific area of the WordPress admin settings. This hook provides a designated spot for extending the Improve Automator section with custom functionality.


Usage

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

Examples

<?php
/**
 * Example function to add custom content to the "Improve Automator" section
 * of the Uncanny Automator general settings page.
 *
 * This function might display a link to a survey or a feature request form
 * to gather user feedback.
 */
function uncanny_automator_add_feedback_widget() {
	// Check if the current user has the capability to manage Uncanny Automator settings.
	if ( current_user_can( 'manage_options' ) ) {
		?>
        <div class="uap-improve-automator-feedback-widget">
            <h3><?php esc_html_e( 'Your Feedback Matters!', 'uncanny-automator' ); ?></h3>
            <p><?php esc_html_e( 'Help us make Uncanny Automator even better. Share your thoughts and suggestions.', 'uncanny-automator' ); ?></p>
            <a href="https://your-feedback-link.com/uncanny-automator" class="button button-secondary" target="_blank">
                <?php esc_html_e( 'Provide Feedback', 'uncanny-automator' ); ?>
            </a>
            <a href="https://your-feature-request-link.com/uncanny-automator" class="button button-secondary" target="_blank">
                <?php esc_html_e( 'Request a Feature', 'uncanny-automator' ); ?>
            </a>
        </div>
		<?php
	}
}

// Add the function to the 'automator_settings_general_improve_automator_content' action hook.
// The third parameter '10' is the priority, and '0' indicates no arguments are passed to the callback function.
add_action( 'automator_settings_general_improve_automator_content', 'uncanny_automator_add_feedback_widget', 10, 0 );

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-settings/tab/general/improve-automator.php:26

<div class="uap-settings-panel-title">
			<?php esc_html_e( 'Improve Automator', 'uncanny-automator' ); ?>
		</div>

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

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

		</div>

	</div>

</div>

Scroll to Top