-
Notifications
You must be signed in to change notification settings - Fork 8
/
wp-media-categories.php
60 lines (53 loc) · 1.5 KB
/
wp-media-categories.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
<?php
/**
* Plugin Name: WP Media Categories
* Plugin URI: https://wordpress.org/plugins/wp-media-categories/
* Author: John James Jacoby
* Author URI: https://jjj.blog/
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-media-categories
* Domain Path: /wp-media-categories/lang
* Description: Categories for media & attachments
* Version: 2.1.0
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
/**
* Include the Media Categories files
*
* @since 0.1.0
*/
function _wp_media_categories() {
// Get the plugin path
$plugin_path = plugin_dir_path( __FILE__ ) . 'wp-media-categories/';
// Admin-only common files
require_once $plugin_path . 'includes/admin.php';
require_once $plugin_path . 'includes/ajax.php';
require_once $plugin_path . 'includes/functions.php';
require_once $plugin_path . 'includes/taxonomies.php';
require_once $plugin_path . 'includes/walkers.php';
require_once $plugin_path . 'includes/widgets.php';
require_once $plugin_path . 'includes/hooks.php';
}
add_action( 'plugins_loaded', '_wp_media_categories' );
/**
* Return the plugin URL
*
* @since 0.1.0
*
* @return string
*/
function wp_media_categories_get_plugin_url() {
return plugin_dir_url( __FILE__ ) . 'wp-media-categories/';
}
/**
* Return the asset version
*
* @since 0.1.0
*
* @return int
*/
function wp_media_categories_get_asset_version() {
return 202005130001;
}