1 | <?php |
||
13 | class Stencil_Environment { |
||
14 | |||
15 | /** |
||
16 | * Prefixed used for filters |
||
17 | * |
||
18 | * @const string |
||
19 | */ |
||
20 | const FILTER_PREFIX = 'stencil:'; |
||
21 | |||
22 | /** |
||
23 | * Prefix used for hooks |
||
24 | * |
||
25 | * @const string |
||
26 | */ |
||
27 | const HOOK_PREFIX = 'stencil.'; |
||
28 | |||
29 | /** |
||
30 | * Unified filter method with globalised prefix |
||
31 | * |
||
32 | * @param string $variable , ... |
||
33 | * |
||
34 | * @return mixed |
||
35 | */ |
||
36 | public static function filter( $variable ) { |
||
42 | |||
43 | /** |
||
44 | * Unified hook method with globalised prefix |
||
45 | * |
||
46 | * @param string $hook , ... |
||
47 | */ |
||
48 | public static function trigger( $hook ) { |
||
54 | |||
55 | /** |
||
56 | * Provide unified filter format |
||
57 | * |
||
58 | * @param string $filter Filter to use to build. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public static function format_filter( $filter ) { |
||
69 | |||
70 | /** |
||
71 | * Provide unified hook format |
||
72 | * |
||
73 | * @param string $hook Hook to format. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | public static function format_hook( $hook ) { |
||
84 | |||
85 | /** |
||
86 | * Get the identifier for the active page |
||
87 | * |
||
88 | * @return null|string |
||
89 | */ |
||
90 | public static function get_page() { |
||
179 | } |
||
180 |