-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquick-admin-launcher.php
56 lines (49 loc) · 1.32 KB
/
quick-admin-launcher.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
<?php
/**
* Plugin Name: Quick Admin Launcher
* Plugin URI: quick-admin-launcher.com
* Description: Quick Admin Launcher is a WordPress plugin that allows to quickly launch any admin tool from a search box.
* Version: 1.0.0
* Author: dbeja
* Text Domain: quickal
* Domain Path: /languages
*/
defined( 'ABSPATH' ) || die( 'No script kiddies please!' );
define( 'QUICKAL_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'QUICKAL_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'QUICKAL_VERSION', '1.0.0' );
require_once QUICKAL_PLUGIN_DIR . '/includes/autoload.php';
register_activation_hook( __FILE__, 'quickal_activate' );
register_deactivation_hook( __FILE__, 'quickal_deactivate' );
/**
* Activation hook
*
* @since 1.0.0
*/
function quickal_activate() {
// set default quickal settings.
$options = get_option( 'quickal_settings' );
if ( false === $options ) {
$default = array(
'post_types' => array( 'page', 'post' ),
'users_search' => 1,
'hotkey' => array(
'display' => 'CTRL + k',
'key' => 'k',
'alt' => '',
'ctrl' => 1,
'shift' => '',
'meta' => '',
),
);
update_option( 'quickal_settings', $default );
}
}
/**
* Deactivation hook
*
* @since 1.0.0
*/
function quickal_deactivate() {}
$quickal = new QUICKAL\QuickAL();
$quickal->init();