-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwp-motive.php
82 lines (75 loc) · 2.14 KB
/
wp-motive.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
* This is the plugin example for the "Developer Applicant Challenge" as requested on the website
* https://awesomemotive.com/career/developer-applicant-challenge/
*
* @link http://behstant.com/blog
* @since 1.0.0
* @package Wp_Motive
* @since 29-Nov-2019
*
* @wordpress-plugin
* Plugin Name: Awesome Motive Challenge
* Plugin URI: https://awesomemotive.com/plugin-test
* Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
* Version: 1.0.0
* Author: reedyseth
* Author URI: http://behstant.com/blog
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: wp-motive
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
if( file_exists( dirname( __FILE__ ) ) . '/vendor/autoload.php' ) {
require_once dirname( __FILE__ ) . '/vendor/autoload.php';
}
/**
* Currently plugin version.
* Start at version 1.0.0 and use SemVer - https://semver.org
*/
define( 'PLUGIN_VERSION_VERSION','1.0.0' );
/**
* The slug of the plugin, on this case wp-motive
*/
define( 'SLUG', "wp-motive" );
/**
* The code that runs during plugin activation.
*/
function activate_wp_motive() {
Wp_Motive\Wp_Motive_Activate::activate();
}
//
///**
// * The code that runs during plugin deactivation.
// */
function deactivate_wp_motive() {
Wp_Motive\Wp_Motive_Deactivate::deactivate();
}
//
register_activation_hook( __FILE__, 'activate_wp_motive' );
register_deactivation_hook( __FILE__, 'deactivate_wp_motive' );
/**
* Begins execution of the plugin.
*
* @version 1.0.0
*/
function run_wp_motive() {
$plugin = new Wp_Motive\Wp_Motive();
$plugin->run();
}
run_wp_motive();
/**
* Load the CLI commands just when WP_CLI is defined.
*
* @since 11-Dic-2019
* @version 1.0.0
* @author Israel Barragan (Reedyseth) <[email protected]>
*/
if ( defined( 'WP_CLI' ) && WP_CLI ) {
$cli_instance = new Wp_Motive\Wp_Motive_Wp_Cli();
WP_CLI::add_command( 'motive', $cli_instance );
}