1 | <?php |
||
21 | class EspressoEvents extends EspressoShortcode |
||
22 | { |
||
23 | |||
24 | |||
25 | |||
26 | /** |
||
27 | * the actual shortcode tag that gets registered with WordPress |
||
28 | * |
||
29 | * @return string |
||
30 | */ |
||
31 | public function getTag() |
||
35 | |||
36 | |||
37 | |||
38 | /** |
||
39 | * the time in seconds to cache the results of the processShortcode() method |
||
40 | * 0 means the processShortcode() results will NOT be cached at all |
||
41 | * |
||
42 | * @return int |
||
43 | */ |
||
44 | public function cacheExpiration() |
||
48 | |||
49 | |||
50 | |||
51 | /** |
||
52 | * a place for adding any initialization code that needs to run prior to wp_header(). |
||
53 | * this may be required for shortcodes that utilize a corresponding module, |
||
54 | * and need to enqueue assets for that module |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | public function initializeShortcode() |
||
62 | |||
63 | |||
64 | |||
65 | /** |
||
66 | * callback that runs when the shortcode is encountered in post content. |
||
67 | * IMPORTANT !!! |
||
68 | * remember that shortcode content should be RETURNED and NOT echoed out |
||
69 | * |
||
70 | * @param array $attributes |
||
71 | * @return string |
||
72 | */ |
||
73 | public function processShortcode($attributes = array()) |
||
99 | |||
100 | |||
101 | |||
102 | /** |
||
103 | * merge incoming attributes with filtered defaults |
||
104 | * |
||
105 | * @param array $attributes |
||
106 | * @return array |
||
107 | */ |
||
108 | private function getAttributes(array $attributes) |
||
127 | |||
128 | |||
129 | } |
||
130 | // End of file EspressoEvents.php |
||
131 | // Location: EventEspresso\core\domain\entities\shortcodes/EspressoEvents.php |