-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-box.php
More file actions
46 lines (38 loc) · 1.24 KB
/
example-box.php
File metadata and controls
46 lines (38 loc) · 1.24 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
<?php
/*
Name: Thesis Developer Asset Handler Example Box
Author: Tim Milligan
Version: 1.0
Description: Example box showing how to implement the Thesis Developer Asset Handler
Class: example_box
*/
class example_box extends thesis_box {
public function translate() {
$this->name = __('Example Box', 'example');
}
public function construct() {
global $vzm_ah;
if(is_admin()) {
if(!isset($vzm_ah)) { // Check if the Asset Handler has already been created once, no point in creating the same asset handler multiple times.
if(!class_exists('vzm_asset_handler')) // Load the asset handler class if it hasn't been already.
require_once( dirname(__FILE__) . '/vzm_asset_handler.php');
$vzm_ah = new vzm_asset_handler;
}
// The following lines are for testing purposes and will display the various transients on the admin pages
/*
$transients = array(
'skins' => 'thesis_skins_update',
'boxes' => 'thesis_boxes_update',
'packages' => 'thesis_packages_update',
'thesis' => 'thesis_core_update');
foreach ($transients as $key => $transient) {
if ($var = get_transient($transient)) {
//delete_transient($transient);
echo $key . "\n";
print_r($var);
}
}
*/
}
}
}