PluginProbe
Posts Table with Search & Sort / 1.4.11
Posts Table with Search & Sort v1.4.11
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 / Starter.php

Starter.php in Posts Table with Search & Sort 1.4.11, at src/Admin/Wizard/Starter.php

37 lines 866 B
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\Starter as Setup_Wizard_Starter;
6
7 /**
8 * Setup Wizard Starter
9 *
10 * @package Barn2/posts-table-search-sort
11 * @author Barn2 Plugins <info@barn2.com>
12 * @license GPL-3.0
13 * @copyright Barn2 Media Ltd
14 */
15 class Starter extends Setup_Wizard_Starter {
16
17 /**
18 * Determine if the conditions to start the wizard are met.
19 *
20 * @return boolean
21 */
22 public function should_start() {
23 $setup_happened = get_option( 'posts-table-search-sort-setup-wizard_completed' ) ?: false;
24 return ! $setup_happened;
25 }
26
27 /**
28 * Add an option so the setup wizard doesn't run after reactivating
29 *
30 * @return void
31 */
32 public function create_option() {
33 update_option( "posts-table-search-sort-setup-wizard_completed", true );
34 }
35
36 }
37