PluginProbe
CSS & JavaScript Toolbox / 12.0.3
CSS & JavaScript Toolbox v12.0.3
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
css-javascript-toolbox / tables / template.php

template.php in CSS & JavaScript Toolbox 12.0.3, at tables/template.php

63 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @version $ Id; ?FILE_NAME ?DATE ?TIME ?AUTHOR $
4 */
5
6 // Disallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 /**
10 *
11 * DESCRIPTION
12 *
13 * @author ??
14 * @version ??
15 */
16 class CJTTemplateTable extends CJTxTable {
17
18 /**
19 *
20 */
21 const ATTRIBUTES_SYSTEM_FLAG = 0x01;
22
23 /**
24 * put your comment there...
25 *
26 * @var mixed
27 */
28 public static $states;
29
30 /**
31 * put your comment there...
32 *
33 * @param mixed $dbDriver
34 * @param bool Is to enable Build In Queue name Generator.
35 * @return CJTTemplatesTable
36 */
37 public function __construct($dbDriver) {
38 parent::__construct($dbDriver, 'templates');
39 }
40
41 /**
42 * put your comment there...
43 *
44 */
45 public function setQueueName() {
46 $type = $this->get('type');
47 // Santiize the template name!
48 $sanitizedName = strtolower(sanitize_file_name($this->get('name')));
49 // Prefix all user templates so it woule be unique when added
50 // to Wordpress queue!
51 $queueName = "cjt-{$type}-template-{$sanitizedName}";
52 $this->set('queueName', $queueName);
53 return $this;
54 }
55
56 } // End class.
57
58 // Initialize static's!
59 CJTTemplateTable::$states = array(
60 'draft' => cssJSToolbox::getText('draft'),
61 'published' => cssJSToolbox::getText('published'),
62 'trash' => cssJSToolbox::getText('trash'),
63 );