Action
uncanny-automator
automator_settings_general_license_content
Fires after the license content is displayed on the Automator settings general page.
add_action( 'automator_settings_general_license_content', $callback, 10, 1 );
Description
Fires within the General settings tab, specifically on the License sub-section. Developers can use this hook to add custom content or modify the default license management interface before it's displayed to the user. No parameters are passed.
Usage
add_action( 'automator_settings_general_license_content', 'your_function_name', 10, 1 );
Examples
add_action(
'automator_settings_general_license_content',
function() {
// Display a custom message or additional license-related information in the Uncanny Automator Pro license section.
// This could be for promotional messages, important update notices, or links to support documentation.
$current_user = wp_get_current_user();
$is_admin = current_user_can( 'manage_options' );
if ( $is_admin && $current_user->exists() ) {
?>
<div class="uap-settings-panel-message uap-settings-panel-message--info">
<p><?php esc_html_e( 'Need help with your license? Visit our <a href="https://www.uncannyautomator.com/support/" target="_blank">support center</a> for FAQs and to submit a ticket.', 'uncanny-automator' ); ?></p>
</div>
<?php
}
},
10, // Priority: Standard priority
0 // Accepted Args: This function doesn't accept any arguments from the hook.
);
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/license.php:26
uncanny-automator-pro/src/core/views/admin-settings/tab/general/license/pro-license.php:161
<div class="uap-settings-panel-title">
<?php esc_html_e( 'License', 'uncanny-automator' ); ?>
</div>
<div class="uap-settings-panel-content">
<?php do_action( 'automator_settings_general_license_content' ); ?>
</div>
</div>
</div>
Internal Usage
Found in uncanny-automator-pro/src/core/admin/licensing/licensing.php:124:
add_action( 'automator_settings_general_license_content', array( $this, 'add_licensing_errors' ) );