-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhq_core.php
More file actions
88 lines (73 loc) · 2.53 KB
/
hq_core.php
File metadata and controls
88 lines (73 loc) · 2.53 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
<?php
/**
* Plugin Name: HQ Core
* Plugin URI: http://wordpress.org/extend/plugins
* Description: Core functionality for HQ
* Version: 0.1.0
* Author: Tanner Moushey
* Author URI: http://tannermoushey.com
* License: GPLv2+
* Text Domain: hq
* Domain Path: /languages
*/
/**
* Copyright (c) 2014 Tanner Moushey (email : tanner@iwitnessdesign.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
* your discretion, any later version, as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* Built using grunt-wp-plugin
* Copyright (c) 2013 10up, LLC
* https://github.com/10up/grunt-wp-plugin
*/
// Useful global constants
define( 'HQ_VERSION', '0.1.0' );
define( 'HQ_URL', plugin_dir_url( __FILE__ ) );
define( 'HQ_PATH', dirname( __FILE__ ) . '/' );
include_once( 'components/init.php' );
/**
* Default initialization for the plugin:
* - Registers the default textdomain.
*/
function hq_init() {
$locale = apply_filters( 'plugin_locale', get_locale(), 'hq' );
load_textdomain( 'hq', WP_LANG_DIR . '/hq/hq-' . $locale . '.mo' );
load_plugin_textdomain( 'hq', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
/**
* Activate the plugin
*/
function hq_activate() {
// First load the init scripts in case any rewrite functionality is being loaded
hq_init();
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'hq_activate' );
/**
* Deactivate the plugin
* Uninstall routines should be in uninstall.php
*/
function hq_deactivate() {
}
register_deactivation_hook( __FILE__, 'hq_deactivate' );
function hq_enqueue() {
$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_script( 'hq-selectize', HQ_URL . "assets/js/vendor/selectize.min.js" );
wp_enqueue_script( 'hq-core-style', HQ_URL . "assets/js/hq_core{$postfix}.js" );
wp_enqueue_style( 'hq-core-js', HQ_URL . "assets/css/hq_core{$postfix}.css" );
}
add_action( 'wp_enqueue_scripts', 'hq_enqueue' );
// Wireup filters
// Wireup shortcodes