-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcmb2-field-widget-selector.php
51 lines (40 loc) · 1.73 KB
/
cmb2-field-widget-selector.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @package CMB2\Field_Widget_Selector
* @author scottsawyer
* @copyright Copyright (c) scottsawyer
*
* Plugin Name: CMB2 Field Type: Widget Selector
* Plugin URI: https://github.com/scottsawyer/cmb2-field-widget-selector
* Github Plugin URI: https://github.com/scottsawyer/cmb2-field-widget-selector
* Description: CMB2 field type that allows you to select a widget.
* Version: 1.0
* Author: scottsawyer
* Author URI: https://www.scottsawyerconsulting.com
* License: GPLv2+
*/
namespace CMB2_Field_Widget_Selector;
if ( !defined( 'ABSPATH' ) ) exit;
/**
* Current plugin version.
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
if ( !defined( 'CMB2_FIELD_WIDGET_SELECTOR_VERSION' ) ) define( 'CMB2_FIELD_WIDGET_SELECTOR_VERSION', '1.0.0' );
if ( !defined( 'PLUGIN_URL' ) ) define( 'PLUGIN_URL', __FILE__ );
function cmb2_field_widget_selector_activate() {
// require_once plugin_dir_path( __FILE__ ) . 'includes/class-sidebar.php';
// $sidebar = new \CMB2_Field_Widget_Selector\Sidebar();
}
function cmb2_field_widget_selector_deactivate() {
// require_once plugin_dir_path( __FILE__ ) . 'includes/class-sidebar.php';
// Sidebar::unregister_sidebar();
}
register_activation_hook( PLUGIN_URL, __NAMESPACE__ . '\cmb2_field_widget_selector_activate' );
register_deactivation_hook( __FILE__, __NAMESPACE__ . '\cmb2_field_widget_selector_deactivate' );
require plugin_dir_path( __FILE__ ) . 'includes/class-cmb2-field-widget-selector.php';
function run_cmb2_field_widget_selector() {
$plugin = new \CMB2_Field_Widget_Selector\CMB2_Field_Widget_Selector();
$plugin->run();
}
run_cmb2_field_widget_selector();