-
Notifications
You must be signed in to change notification settings - Fork 2
/
class-template-loader.php
75 lines (69 loc) · 1.67 KB
/
class-template-loader.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
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
namespace WechangeCollection;
use \Gamajo_Template_Loader;
/**
* WECHANGE Collection
*
* @package WechangeCollection
* @author Sebastian Gärtner
* @link
* @copyright 20190 Sebastian Gärtner
* @license GPL-2.0+
*/
if ( ! class_exists( 'Gamajo_Template_Loader' ) ) {
require 'vendor/class-gamajo-template-loader.php';
}
/**
* Template loader for WechangeCollection.
*
* Only need to specify class properties here.
*
* @package WechangeCollection
* @author Sebastian Gärtner
*/
class WechangeCollection_Template_Loader extends Gamajo_Template_Loader {
/**
* Prefix for filter names.
*
* @since 1.0.0
*
* @var string
*/
protected $filter_prefix = 'wechange';
/**
* Directory name where custom templates for this plugin should be found in the theme.
*
* @since 1.0.0
*
* @var string
*/
protected $theme_template_directory = 'wechange';
/**
* Reference to the root directory path of this plugin.
*
* Can either be a defined constant, or a relative reference from where the subclass lives.
*
* In this case, `WECHANGE_COLLECTION_DIR` would be defined in the root plugin file as:
*
* ~~~
* define( 'WECHANGE_COLLECTION_DIR', plugin_dir_path( __FILE__ ) );
* ~~~
*
* @since 1.0.0
*
* @var string
*/
protected $plugin_directory = WECHANGE_COLLECTION_DIR;
/**
* Directory name where templates are found in this plugin.
*
* Can either be a defined constant, or a relative reference from where the subclass lives.
*
* e.g. 'templates' or 'includes/templates', etc.
*
* @since 1.1.0
*
* @var string
*/
protected $plugin_template_directory = 'templates';
}