PluginProbe
Posts Table with Search & Sort / 1.4.13
Posts Table with Search & Sort v1.4.13
1.4.13 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2 1.3 1.3.1 1.3.1-v2 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 40 releases
posts-data-table / src / Admin / Wizard / Setup_Wizard.php

Setup_Wizard.php in Posts Table with Search & Sort 1.4.13, at src/Admin/Wizard/Setup_Wizard.php

71 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Barn2\Plugin\Posts_Table_Search_Sort\Admin\Wizard;
4
5 use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Setup_Wizard\Setup_Wizard as Wizard;
6 use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Plugin\Plugin;
7 use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Registerable;
8 use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Service\Standard_Service;
9
10 /**
11 * Setup wizard service.
12 *
13 * @package Barn2\posts-data-table
14 * @author Barn2 Plugins <info@barn2.com>
15 * @license GPL-3.0
16 * @copyright Barn2 Media Ltd
17 */
18 class Setup_Wizard implements Registerable, Standard_Service {
19
20 /**
21 * Plugin instance
22 *
23 * @var Plugin
24 */
25 private $plugin;
26
27 /**
28 * Wizard instance
29 *
30 * @var Wizard
31 */
32 private $wizard;
33
34 /**
35 * Get things started.
36 *
37 * @param Plugin $plugin
38 */
39 public function __construct( Plugin $plugin ) {
40 $this->plugin = $plugin;
41 $steps = [
42 new Steps\Welcome(),
43 new Steps\Layout(),
44 new Steps\Loading(),
45 new Steps\Search(),
46 new Steps\Upsell(),
47 new Steps\Completed(),
48 ];
49
50 $wizard = new Wizard( $this->plugin, $steps );
51
52 $wizard->configure(
53 [
54 'skip_url' => admin_url( 'options-general.php?page=posts_table_search_sort' ),
55 'plugin_slug' => 'posts-table-with-search-and-sort',
56 ]
57 );
58
59 $wizard->add_restart_link( '', '' );
60
61 $this->wizard = $wizard;
62 }
63
64 /**
65 * {@inheritdoc}
66 */
67 public function register() {
68 $this->wizard->boot();
69 }
70 }
71