PluginProbe
Posts Table with Search & Sort / 1.4.7
Posts Table with Search & Sort v1.4.7
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 1.3.8 All 39 releases
posts-data-table / src / Plugin.php

Plugin.php in Posts Table with Search & Sort 1.4.7, at src/Plugin.php

59 lines 1.8 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;
4
5 use Barn2\Plugin\Posts_Table_Search_Sort\Admin\Settings_Page;
6 use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Plugin\Simple_Plugin;
7 use Barn2\Plugin\Posts_Table_Search_Sort\Dependencies\Lib\Util;
8
9 /**
10 * The main plugin class.
11 *
12 * @package Barn2\posts-table-search-sort
13 * @author Barn2 Plugins <support@barn2.com>
14 * @license GPL-3.0
15 * @copyright Barn2 Media Ltd
16 */
17 class Plugin extends Simple_Plugin {
18
19 const NAME = 'Posts Table with Search and Sort';
20 const ITEM_ID = 8006;
21
22
23 /**
24 * Constructs and initializes posts table plugin instance.
25 *
26 * @param string $file The main plugin __FILE__
27 * @param string $version The current plugin version
28 */
29 public function __construct( $file = null, $version = '1.0' ) {
30 parent::__construct(
31 [
32 'id' => self::ITEM_ID,
33 'name' => self::NAME,
34 'version' => $version,
35 'file' => $file,
36 'documentation_path' => '/kb-categories/posts-table-search-sort-free-kb/',
37 'settings_path' => 'options-general.php?page=' . Settings_Page::MENU_SLUG
38 ]
39 );
40 }
41
42
43 public function maybe_load_plugin() {
44 // Don't load plugin if Pro version active
45 if ( ! Util::is_barn2_plugin_active('\\Barn2\\Plugin\\Posts_Table_Pro\\ptp') ) {
46 add_action('after_setup_theme', [$this, 'start_standard_services']);
47 }
48 }
49
50 public function add_services() {
51 $this->add_service( 'plugin_setup', new Plugin_Setup( $this->get_file(), $this ), true );
52 $this->add_service( 'shortcode', new Table_Shortcode() );
53 $this->add_service( 'scripts', new Frontend_Scripts( $this ) );
54 $this->add_service( 'setup_wizard', new Admin\Wizard\Setup_Wizard( $this ) );
55 $this->add_service( 'admin', new Admin\Admin_Controller( $this ) );
56 }
57
58 }
59