Settings_Wizard_API
Settings Wizard API class
Namespace: WebberZone\WFP\Admin\Settings
Source: includes/admin/settings/class-settings-wizard-api.php line 24
Methods
__construct()
Main constructor class.
Line: 132
public function __construct( $settings_key, $prefix, $args = ... );
| Type | Name | Description |
|---|---|---|
string | $settings_key | Settings key. |
string | $prefix | Prefix. Used for actions and filters. |
array | $args | { |
hooks()
Adds the functions to the appropriate WordPress hooks.
Line: 179
public function hooks( );
set_translation_strings()
Sets translation strings.
Line: 190
public function set_translation_strings( $strings );
| Type | Name | Description |
|---|---|---|
array | $strings | Translation strings. |
set_steps()
Set wizard steps.
Line: 216
public function set_steps( $steps ): object;
| Type | Name | Description |
|---|---|---|
array | $steps | Array of wizard steps. |
Returns: object — Class object.
admin_menu()
Add admin menu for the wizard.
Line: 225
public function admin_menu( );
hide_completed_wizard_submenu()
Hide wizard submenu item when the wizard is completed.
Line: 251
public function hide_completed_wizard_submenu( ): void;
Returns: void
enqueue_scripts()
Enqueue scripts and styles for the wizard.
Line: 265
public function enqueue_scripts( $hook );
| Type | Name | Description |
|---|---|---|
string | $hook | Current admin page hook. |
process_step()
Process wizard step submission.
Line: 327
public function process_step( );
get_current_step()
Get the current step number.
Line: 527
public function get_current_step( ): int;
Returns: int — Current step number.
get_current_step_config()
Get the current step configuration.
Line: 559
public function get_current_step_config( ): array;
Returns: array — Current step configuration.
is_wizard_completed()
Check if the wizard has been completed.
Line: 576
public function is_wizard_completed( ): bool;
Returns: bool — True if wizard is completed.
render_wizard_page()
Render the wizard page.
Line: 583
public function render_wizard_page( );
reset_wizard()
Reset the wizard to allow it to run again.
Line: 887
public function reset_wizard( );
should_show_wizard()
Check if the wizard should be shown (e.g., on first activation).
Line: 898
public function should_show_wizard( ): bool;
Returns: bool — True if wizard should be shown.
trigger_wizard()
Trigger the wizard to be shown.
Line: 906
public function trigger_wizard( );