1 | <?php |
||
22 | class ShortcodeHelper |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * @type EE_Registry $registry |
||
27 | * @access protected |
||
28 | */ |
||
29 | protected $registry; |
||
30 | |||
31 | |||
32 | |||
33 | /** |
||
34 | * Shortcodes constructor. |
||
35 | * |
||
36 | * @param EE_Registry $registry |
||
37 | */ |
||
38 | public function __construct(EE_Registry $registry) |
||
42 | |||
43 | |||
44 | |||
45 | /** |
||
46 | * get classname, remove EES_prefix, and convert to UPPERCASE |
||
47 | * |
||
48 | * @param string $class_name |
||
49 | * @return string |
||
50 | */ |
||
51 | public static function generateShortcodeTagFromClassName($class_name) |
||
55 | |||
56 | |||
57 | |||
58 | /** |
||
59 | * add EES_prefix and Capitalize words |
||
60 | * |
||
61 | * @param string $tag |
||
62 | * @return string |
||
63 | */ |
||
64 | public static function generateShortcodeClassNameFromTag($tag) |
||
88 | |||
89 | |||
90 | |||
91 | /** |
||
92 | * maybe add EES_prefix |
||
93 | * |
||
94 | * @param string $class_name |
||
95 | * @return string |
||
96 | */ |
||
97 | public static function addShortcodeClassPrefix($class_name) |
||
101 | |||
102 | |||
103 | |||
104 | /** |
||
105 | * @return array |
||
106 | */ |
||
107 | public function getEspressoShortcodeTags() |
||
115 | |||
116 | |||
117 | |||
118 | /** |
||
119 | * @param string $content |
||
120 | * @return string |
||
121 | */ |
||
122 | public function doShortcode($content) |
||
132 | |||
133 | |||
134 | |||
135 | /** |
||
136 | * given a shortcode name, will instantiate the shortcode and call it's run() method |
||
137 | * |
||
138 | * @param string $shortcode_class |
||
139 | * @param WP $wp |
||
140 | */ |
||
141 | public function initializeShortcode($shortcode_class = '', WP $wp = null) |
||
176 | |||
177 | } |
||
178 | // End of file Shortcodes.php |
||
179 | // Location: EventEspresso\core\domain\services\helpers/Shortcodes.php |