-
Notifications
You must be signed in to change notification settings - Fork 6
/
wp-chosen.php
61 lines (54 loc) · 1.35 KB
/
wp-chosen.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
<?php
/**
* Plugin Name: WP Chosen
* Description: Makes unwieldy select boxes more user-friendly
* Plugin URI: https://wordpress.org/plugins/wp-chosen
* Author: Triple J Software, Inc.
* Author URI: https://jjj.software
* License: GNU General Public License v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wp-chosen
* Domain Path: /wp-chosen/assets/lang/
* Requires at least: 5.7
* Requires PHP: 7.0
* Tested up to: 5.8
* Version: 6.1.2
*/
// Exit if accessed directly
defined( 'ABSPATH' ) || exit;
/**
* Include the required files
*
* @since 0.1.0
*/
function _wp_chosen() {
// Get the plugin path
$plugin_path = plugin_dir_path( __FILE__ ) . 'wp-chosen/';
// Common files
require_once $plugin_path . 'includes/admin.php';
require_once $plugin_path . 'includes/sponsor.php';
require_once $plugin_path . 'includes/hooks.php';
}
add_action( 'plugins_loaded', '_wp_chosen' );
/**
* Return the plugin URL
*
* @since 0.1.0
*
* @return string
*/
function wp_chosen_get_plugin_url() {
return plugin_dir_url( __FILE__ ) . 'wp-chosen/';
}
/**
* Return the asset version
*
* @since 0.1.0
*
* @return int
*/
function wp_chosen_get_asset_version() {
return defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG
? time()
: 202105290001;
}