-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeathershare.php
More file actions
90 lines (80 loc) · 2.31 KB
/
feathershare.php
File metadata and controls
90 lines (80 loc) · 2.31 KB
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
83
84
85
86
87
88
89
90
<?php
/**
* Plugin Name: FeatherShare
* Plugin URI: https://chrisnov.com/plugins/feathershare/
* Description: A clean, modular, and object-oriented plugin following WordPress coding standards.
* Version: 1.3.1
* Requires at least: 5.0
* Requires PHP: 7.4
* Author: Reynov Christian
* Author URI: https://chrisnov.com/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: feathershare
* Domain Path: /languages
*/
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Current plugin version.
*/
define( 'FEATHERSHARE_VERSION', '1.3.1' );
/**
* Define constants for the plugin's main file, directory path, and URL.
*/
define( 'FEATHERSHARE_FILE', __FILE__ );
define( 'FEATHERSHARE_DIR', plugin_dir_path( __FILE__ ) );
define( 'FEATHERSHARE_URL', plugin_dir_url( __FILE__ ) );
/**
* Runs during plugin activation.
*
* @since 1.0.0
* @return void
*/
function activate_feathershare() {
require_once FEATHERSHARE_DIR . 'includes/class-feathershare-activator.php';
FeatherShare_Activator::activate();
}
/**
* Runs during plugin deactivation.
*
* @since 1.0.0
* @return void
*/
function deactivate_feathershare() {
require_once FEATHERSHARE_DIR . 'includes/class-feathershare-deactivator.php';
FeatherShare_Deactivator::deactivate();
}
register_activation_hook( FEATHERSHARE_FILE, 'activate_feathershare' );
register_deactivation_hook( FEATHERSHARE_FILE, 'deactivate_feathershare' );
register_uninstall_hook( FEATHERSHARE_FILE, 'uninstall_feathershare' );
/**
* Runs during plugin uninstall (delete).
*
* Delegates to the static uninstaller class to keep the main file lean.
*
* @since 1.3.1
* @return void
*/
function uninstall_feathershare() {
require_once plugin_dir_path( FEATHERSHARE_FILE ) . 'includes/class-feathershare-uninstaller.php';
FeatherShare_Uninstaller::uninstall();
}
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
require FEATHERSHARE_DIR . 'includes/class-feathershare.php';
/**
* Begins execution of the plugin.
*
* @since 1.0.0
* @return void
*/
function run_feathershare() {
$plugin = new FeatherShare();
$plugin->run();
}
run_feathershare();