-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtd_less_style.css.php
More file actions
52 lines (39 loc) · 1.34 KB
/
td_less_style.css.php
File metadata and controls
52 lines (39 loc) · 1.34 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
<?php
/**
* quick LESS compiler for development. Works only on windows for now, uses node + less.js
* You can turn of this compile from @see td_deploy_mode.php - set TDC_USE_LESS to false
* V2.0
*/
//
require_once 'includes/external/td_node_less/td_less_compiler.php';
/**
* The list of less files that need to be compiled. You can use your own compiler to compile the less files
*/
$td_less_files = array (
// less file used in the iframe when the live editor is on
'iframe_main' => array (
'source' => 'assets/less_iframe/iframe_main.less',
'destination' => 'assets/css/iframe_main.css'
),
// less file used on the wrapper of the iframe while editing the page. It is not loaded in wp-admin
'wrap_main' => array (
'source' => 'assets/less_wrap/wrap_main.less',
'destination' => 'assets/css/wrap_main.css'
),
// less file for wp-admin
'tdc_wp_admin_main' => array (
'source' => 'assets/less_wp_admin/wp_admin_main.less',
'destination' => 'assets/css/tdc_wp_admin_main.css'
)
);
// from td_less_style.css.php
if (isset($_GET['part'])) {
if (!empty($td_less_files[$_GET['part']])) {
td_less_compiler::compile_and_import(
$td_less_files[$_GET['part']]['source'],
$td_less_files[$_GET['part']]['destination']
);
} else {
echo "ERROR!!!!! NO ?=part registered in td_less_style.css.php with name: " . $_GET['part'];
}
}