-
Notifications
You must be signed in to change notification settings - Fork 3
/
wp-less-compiler.php
47 lines (36 loc) · 1.07 KB
/
wp-less-compiler.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
<?php
/*
Plugin Name: WP Less Compiler
Plugin URI: http://www.thejakegroup.com
Description: Compiles LESS into CSS. Allows the administrator to output LESS to Admin users, and CSS to everyone else.
Version: 1.3.0
Author: Tyler Bruffy
*/
if( ! defined('DS') ) {
define('DS', DIRECTORY_SEPARATOR);
}
require_once( "Controller.php" );
class PluginObject {
const DB_VERSION = "1.0";
const PREFIX = "wlc_";
const LESS_JS_VER = "1.7.0.min";
const LESS_PHP_VER = "0.3.9";
public static $plugin_url;
public static $plugin_path;
public static $template_url;
public static $template_path;
function plugin_info() {
self::$template_path = get_stylesheet_directory();
self::$template_url = get_stylesheet_directory_uri();
self::$plugin_path = plugin_dir_path(__FILE__);
self::$plugin_url = plugins_url('', __FILE__);
}
protected function _get_wp_option( $option ) {
return get_option( self::PREFIX.$option );
}
protected function _set_wp_option( $option, $value ) {
return update_option( self::PREFIX.$option, $value );
}
}
new Controller();
?>