Recent

Settings_Wizard_APIclass

Settings_Wizard_API

Settings Wizard API class

Namespace: WebberZone\Link_Warnings\Admin\Settings
Since: 1.0.0
Source: includes/admin/settings/class-settings-wizard-api.php line 26

Methods

__construct()

Main constructor class.

Line: 134

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: 181

public function hooks(  );

set_translation_strings()

Sets translation strings.

Line: 192

public function set_translation_strings( $strings );
Type Name Description
array $strings Translation strings.

set_steps()

Set wizard steps.

Line: 218

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: 227

public function admin_menu(  );

hide_completed_wizard_submenu()

Hide wizard submenu item when the wizard is completed.

Line: 253

public function hide_completed_wizard_submenu(  ): void;

Returns: void

enqueue_scripts()

Enqueue scripts and styles for the wizard.

Line: 267

public function enqueue_scripts( $hook );
Type Name Description
string $hook Current admin page hook.

process_step()

Process wizard step submission.

Line: 329

public function process_step(  );

get_current_step()

Get the current step number.

Line: 529

public function get_current_step(  ): int;

Returns: int — Current step number.

get_current_step_config()

Get the current step configuration.

Line: 561

public function get_current_step_config(  ): array;

Returns: array — Current step configuration.

is_wizard_completed()

Check if the wizard has been completed.

Line: 578

public function is_wizard_completed(  ): bool;

Returns: bool — True if wizard is completed.

render_wizard_page()

Render the wizard page.

Line: 585

public function render_wizard_page(  );

reset_wizard()

Reset the wizard to allow it to run again.

Line: 889

public function reset_wizard(  );

should_show_wizard()

Check if the wizard should be shown (e.g., on first activation).

Line: 900

public function should_show_wizard(  ): bool;

Returns: bool — True if wizard should be shown.

trigger_wizard()

Trigger the wizard to be shown.

Line: 908

public function trigger_wizard(  );