-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlibrary-manager.php
More file actions
61 lines (52 loc) · 1.57 KB
/
library-manager.php
File metadata and controls
61 lines (52 loc) · 1.57 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
<?php
/**
* Plugin Name: Library Manager
* Description: Manages a collection of books with a custom database table, REST API, and a React-based admin interface.
* Version: 1.0.0
* Author: Mofizul Islam
* Author URI: https://mofizul.com
* License: GPL2+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: library-manager
* Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Currently plugin version.
* Start at version 1.0.0 and update with every release.
*
* @since 1.0.0
*/
define( 'LIBRARY_MANAGER_VERSION', '1.0.0' );
// Register WP-CLI commands.
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-library-manager-cli.php';
}
/**
* The code that runs during plugin activation.
* */
function activate_library_manager() {
require_once plugin_dir_path( __FILE__ ) . 'includes/class-library-manager-core.php';
Library_Manager_Core::activate_library_manager();
}
register_activation_hook( __FILE__, 'activate_library_manager' );
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing hooks.
*/
require plugin_dir_path( __FILE__ ) . 'includes/class-library-manager-core.php';
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then there is no need to anything else but call the run method.
*
* @since 1.0.0
*/
function run_library_manager() {
$plugin = new Library_Manager_Core();
$plugin->run();
}
run_library_manager();