-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.php
62 lines (45 loc) · 1.89 KB
/
plugin.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
62
<?php
/*
Plugin Name: Effective Grid
Plugin URI:
Description:
Version: 0.4.0
Author: Daniel Loughmiller / Effect Web Agency
Author URI: https://www.effectwebagency.com
*/
//TOD: Fix standard styling, add hooks where appropriate, make more responsive, make filter width's % based on number of filters?
defined( 'ABSPATH' ) or die( 'No direct access.' );
DEFINE('EGRID_DEV_MODE', false);
DEFINE('EGRID_FILTER_PREFIX', 'egrid-');
include_once(dirname(__FILE__).'/classes/egrid-grid.php');
include_once(dirname(__FILE__).'/classes/egrid-filters.php');
include_once(dirname(__FILE__).'/classes/egrid-elements.php');
include_once(dirname(__FILE__).'/includes/egrid-shortcodes.php');
class EffectiveGrid
{
protected $less = null;
public function __construct() {
//load_plugin_textdomain( 'effective-grid', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
add_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_styles' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_scripts' ) );
add_action( 'wp', array($this, 'register_plugin_shortcodes'));
}
public function register_plugin_styles()
{
wp_register_style( 'effective-grid', plugins_url( 'effective-grid/assets/css/egrid.css' ) );
wp_register_style( 'select2', plugins_url( 'effective-grid/assets/third-party/select2/css/select2.min.css' ) );
wp_enqueue_style( 'effective-grid' );
wp_enqueue_style( 'select2' );
}
public function register_plugin_scripts()
{
wp_register_script( 'select2', plugins_url( 'effective-grid/assets/third-party/select2/js/select2.min.js' ), array('jquery') );
wp_register_script( 'effective-grid', plugins_url( 'effective-grid/assets/js/egrid.js' ), array('select2') );
wp_enqueue_script('select2');
wp_enqueue_script('effective-grid');
}
public function register_plugin_shortcodes()
{
}
}
$effectiveGrid = new EffectiveGrid();