PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / trunk
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance vtrunk
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / team-updraft / lib-onboarding-wizard / Wizard / Onboarding / readme.txt

readme.txt in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance trunk, at vendor/team-updraft/lib-onboarding-wizard/Wizard/Onboarding/readme.txt

31 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 Usage: Instantiate the onboarding as follows:
2
3 add_action( 'plugins_loaded', [ $this, 'setup_onboarding' ] );
4
5 public function setup_onboarding(): void {
6 $onboarding = new Onboarding();
7 if ( $onboarding::is_onboarding_active( 'burst' ) ) {
8 $onboarding->init();
9 }
10 }
11
12 When a user activated the plugin, or you want to start the onboarding process, you set the optioin update_option( "{$prefix}_start_onboarding", true)
13 This option is deleted when the scripts are enqueued, so the onboarding will only run once.
14 It might be a good idea to use a transient for any redirect, so in case a plugin is automatically installed, the transient expires after a few minutes.
15
16
17
18 Usually you would want to add a redirect to the settings page as well.
19
20 Onboarding_steps should return an array of steps, each step should be an array with the following keys:
21 [
22 'id' => 'intro',
23 'title' => __( 'Take a minute to configure Burst!', 'burst-statistics' ),
24 'subtitle' => __( "In a few steps we'll help you select the best options, and verify if statistics have started tracking.", 'burst-statistics' ),
25 'button' => [
26 'id' => 'start',
27 'label' => __( 'Start onboarding', 'burst-statistics' ),
28 ],
29 ],
30
31 The button key can also have an action key. The action key should match an endpoint.