Action
uncanny-automator
automator_app_settings_{$id}_before_{$status}_panel_bottom
Fires before the bottom section of an app's settings panel for a specific status is rendered, allowing for customization.
add_action( 'automator_app_settings_{$id}_before_{$status}_panel_bottom', $callback, 10, 1 );
Description
Fires before the bottom section of an app's settings panel is rendered, specific to a given app ID and status. Developers can use this action to inject custom content or modify the panel's layout just before its default bottom elements appear.
Usage
add_action( 'automator_app_settings_{$id}_before_{$status}_panel_bottom', 'your_function_name', 10, 1 );
Parameters
-
$this(mixed) - This parameter represents the instance of the object that triggered the hook, providing access to its properties and methods.
Examples
add_action( 'automator_app_settings_my_custom_app_before_draft_panel_bottom', function( $settings_object ) {
// This example hooks into the automator_app_settings_{$id}_before_{$status}_panel_bottom
// action to add a custom notice before the bottom panel content when the app
// settings are in a 'draft' status and the app ID is 'my_custom_app'.
// We can access the current app's ID and status from the passed object.
$app_id = $settings_object->get_id();
$status = $settings_object->get_hook_status_key();
// Only display this message for our specific app and status.
if ( 'my_custom_app' === $app_id && 'draft' === $status ) {
echo '<div class="notice notice-info"><p><strong>Note:</strong> You are currently editing a draft of your custom app. Changes will not be live until published.</p></div>';
}
}, 10, 1 );
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/lib/settings/trait-premium-integration-templating.php:183
public function output_panel_bottom() {
// Dynamic hook status key.
$status = $this->get_hook_status_key();
$id = $this->get_id();
// Hook before bottom panel output.
do_action( "automator_app_settings_{$id}_before_{$status}_panel_bottom", $this );
?>
<div class="uap-settings-panel-bottom-left">
<?php $this->output_panel_bottom_left(); ?>
</div>
<div class="uap-settings-panel-bottom-right">
<?php $this->output_panel_bottom_right(); ?>
</div>
<?php
// Hook after bottom panel output.
do_action( "automator_app_settings_{$id}_after_{$status}_panel_bottom", $this );
}