@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shortcode Attributes Parser Base Implementation. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Shortcode Attributes Parser Base Implementation. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $atts_config = $this->getConfigKey( 'atts' ); |
79 | 79 | array_walk( $atts_config, |
80 | 80 | function ( $att_properties, $att_label ) use ( &$atts ) { |
81 | - $atts[ $att_label ] = $att_properties['default']; |
|
81 | + $atts[ $att_label ] = $att_properties[ 'default' ]; |
|
82 | 82 | } |
83 | 83 | ); |
84 | 84 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | array_walk( $atts_config, |
105 | 105 | function ( $att_properties, $att_label ) use ( &$atts ) { |
106 | 106 | if ( array_key_exists( $att_label, $atts ) ) { |
107 | - $validate_function = $att_properties['validate']; |
|
107 | + $validate_function = $att_properties[ 'validate' ]; |
|
108 | 108 | $atts[ $att_label ] = $validate_function( $atts[ $att_label ] ); |
109 | 109 | } |
110 | 110 | } |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shortcode Attributes Parser Interface. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Shortcode Attributes Parser Interface. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * @package BrightNucleus\Shortcode |
20 | 20 | * @author Alain Schlesser <[email protected]> |
21 | 21 | */ |
22 | -interface ShortcodeAttsParserInterface { |
|
22 | +interface ShortcodeAttsParserInterface { |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Register the shortcode handler function with WordPress. |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shortcode Interface. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Shortcode Interface. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * @package BrightNucleus\Shortcode |
22 | 22 | * @author Alain Schlesser <[email protected]> |
23 | 23 | */ |
24 | -interface ShortcodeInterface extends Registerable { |
|
24 | +interface ShortcodeInterface extends Registerable { |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Render the shortcode. |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shortcode Manager. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Shortcode Manager. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -11,9 +11,9 @@ |
||
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 | |
14 | -use BrightNucleus\Config\ConfigInterface; |
|
15 | -use BrightNucleus\Config\ConfigTrait; |
|
16 | -use BrightNucleus\Dependency\DependencyManagerInterface as DependencyManager; |
|
14 | +use BrightNucleus\Config\ConfigInterface; |
|
15 | +use BrightNucleus\Config\ConfigTrait; |
|
16 | +use BrightNucleus\Dependency\DependencyManagerInterface as DependencyManager; |
|
17 | 17 | use BrightNucleus\Exception\RuntimeException; |
18 | 18 | |
19 | 19 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $atts_parser = new $shortcode_atts_parser( |
124 | 124 | $this->config->getSubConfig( $tag ) |
125 | 125 | ); |
126 | - $this->shortcodes[] = new $shortcode_class( |
|
126 | + $this->shortcodes[ ] = new $shortcode_class( |
|
127 | 127 | $tag, |
128 | 128 | $this->config->getSubConfig( $tag ), |
129 | 129 | $atts_parser, |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | protected function init_shortcode_ui( $tag ) { |
177 | 177 | $shortcode_ui_class = $this->get_shortcode_ui_class( $tag ); |
178 | 178 | |
179 | - $this->shortcode_uis[] = new $shortcode_ui_class( |
|
179 | + $this->shortcode_uis[ ] = new $shortcode_ui_class( |
|
180 | 180 | $tag, |
181 | 181 | $this->config->getSubConfig( $tag, self::KEY_UI ), |
182 | 182 | $this->dependencies |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function register( $context = null ) { |
210 | 210 | $context = $this->validate_context( $context ); |
211 | - $context['page_template'] = $this->get_page_template(); |
|
211 | + $context[ 'page_template' ] = $this->get_page_template(); |
|
212 | 212 | |
213 | 213 | array_walk( $this->shortcodes, |
214 | 214 | function ( $shortcode ) use ( $context ) { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @package BrightNucleus\Shortcode |
28 | 28 | * @author Alain Schlesser <[email protected]> |
29 | 29 | */ |
30 | -class ShortcodeManager implements ShortcodeManagerInterface { |
|
30 | +class ShortcodeManager implements ShortcodeManagerInterface { |
|
31 | 31 | |
32 | 32 | use ConfigTrait; |
33 | 33 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function __construct( |
92 | 92 | ConfigInterface $config, |
93 | 93 | DependencyManager $dependencies = null |
94 | - ) { |
|
94 | + ) { |
|
95 | 95 | $this->processConfig( $config ); |
96 | 96 | $this->dependencies = $dependencies; |
97 | 97 | |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @since 0.1.0 |
105 | 105 | */ |
106 | - protected function init_shortcodes() { |
|
107 | - foreach ( $this->getConfigKeys() as $tag ) { |
|
106 | + protected function init_shortcodes() { |
|
107 | + foreach ( $this->getConfigKeys() as $tag ) { |
|
108 | 108 | $this->init_shortcode( $tag ); |
109 | 109 | } |
110 | 110 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * |
117 | 117 | * @param string $tag The tag of the shortcode to register. |
118 | 118 | */ |
119 | - protected function init_shortcode( $tag ) { |
|
119 | + protected function init_shortcode( $tag ) { |
|
120 | 120 | $shortcode_class = $this->get_shortcode_class( $tag ); |
121 | 121 | $shortcode_atts_parser = $this->get_shortcode_atts_parser_class( $tag ); |
122 | 122 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $this->dependencies |
131 | 131 | ); |
132 | 132 | |
133 | - if ( $this->hasConfigKey( $tag, self::KEY_UI ) ) { |
|
133 | + if ( $this->hasConfigKey( $tag, self::KEY_UI ) ) { |
|
134 | 134 | $this->init_shortcode_ui( $tag ); |
135 | 135 | } |
136 | 136 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param string $tag Shortcode tag to get the class for. |
144 | 144 | * @return string Class name of the Shortcode. |
145 | 145 | */ |
146 | - protected function get_shortcode_class( $tag ) { |
|
146 | + protected function get_shortcode_class( $tag ) { |
|
147 | 147 | $shortcode_class = $this->hasConfigKey( $tag, self::KEY_CUSTOM_CLASS ) |
148 | 148 | ? $this->getConfigKey( $tag, self::KEY_CUSTOM_CLASS ) |
149 | 149 | : self::DEFAULT_SHORTCODE; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param string $tag Shortcode tag to get the class for. |
160 | 160 | * @return string Class name of the ShortcodeAttsParser. |
161 | 161 | */ |
162 | - protected function get_shortcode_atts_parser_class( $tag ) { |
|
162 | + protected function get_shortcode_atts_parser_class( $tag ) { |
|
163 | 163 | $atts_parser = $this->hasConfigKey( $tag, self::KEY_CUSTOM_ATTS_PARSER ) |
164 | 164 | ? $this->getConfigKey( $tag, self::KEY_CUSTOM_ATTS_PARSER ) |
165 | 165 | : self::DEFAULT_SHORTCODE_ATTS_PARSER; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * |
174 | 174 | * @param string $tag The tag of the shortcode to register the UI for. |
175 | 175 | */ |
176 | - protected function init_shortcode_ui( $tag ) { |
|
176 | + protected function init_shortcode_ui( $tag ) { |
|
177 | 177 | $shortcode_ui_class = $this->get_shortcode_ui_class( $tag ); |
178 | 178 | |
179 | 179 | $this->shortcode_uis[] = new $shortcode_ui_class( |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | * @param string $tag Configuration settings. |
192 | 192 | * @return string Class name of the ShortcodeUI. |
193 | 193 | */ |
194 | - protected function get_shortcode_ui_class( $tag ) { |
|
194 | + protected function get_shortcode_ui_class( $tag ) { |
|
195 | 195 | $ui_class = $this->hasConfigKey( $tag, self::KEY_CUSTOM_UI ) |
196 | 196 | ? $this->getConfigKey( $tag, self::KEY_CUSTOM_UI ) |
197 | 197 | : self::DEFAULT_SHORTCODE_UI; |
@@ -206,12 +206,12 @@ discard block |
||
206 | 206 | * @param mixed $context Optional. Context information to pass to shortcode. |
207 | 207 | * @return void |
208 | 208 | */ |
209 | - public function register( $context = null ) { |
|
209 | + public function register( $context = null ) { |
|
210 | 210 | $context = $this->validate_context( $context ); |
211 | 211 | $context['page_template'] = $this->get_page_template(); |
212 | 212 | |
213 | 213 | array_walk( $this->shortcodes, |
214 | - function ( $shortcode ) use ( $context ) { |
|
214 | + function ( $shortcode ) use ( $context ) { |
|
215 | 215 | /** @var ShortcodeInterface $shortcode */ |
216 | 216 | $shortcode->register( $context ); |
217 | 217 | } ); |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | * @param mixed $context The context as passed in by WordPress. |
232 | 232 | * @return array Validated context. |
233 | 233 | */ |
234 | - protected function validate_context( $context ) { |
|
235 | - if ( is_string( $context ) ) { |
|
234 | + protected function validate_context( $context ) { |
|
235 | + if ( is_string( $context ) ) { |
|
236 | 236 | return [ 'wp_context' => $context ]; |
237 | 237 | } |
238 | 238 | return (array) $context; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | * |
246 | 246 | * @return string Name of the page template. |
247 | 247 | */ |
248 | - protected function get_page_template() { |
|
248 | + protected function get_page_template() { |
|
249 | 249 | $template = str_replace( |
250 | 250 | \trailingslashit( \get_stylesheet_directory() ), |
251 | 251 | '', |
@@ -259,12 +259,12 @@ discard block |
||
259 | 259 | * |
260 | 260 | * @since 0.1.0 |
261 | 261 | */ |
262 | - public function register_shortcode_ui() { |
|
262 | + public function register_shortcode_ui() { |
|
263 | 263 | $template = $this->get_page_template(); |
264 | 264 | $context = [ 'page_template' => $template ]; |
265 | 265 | |
266 | 266 | array_walk( $this->shortcode_uis, |
267 | - function ( $shortcode_ui ) use ( $context ) { |
|
267 | + function ( $shortcode_ui ) use ( $context ) { |
|
268 | 268 | /** @var ShortcodeUIInterface $shortcode_ui */ |
269 | 269 | $shortcode_ui->register( $context ); |
270 | 270 | } |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | * @param null $content Inner content to pass to the shortcode. |
282 | 282 | * @return string|false Rendered HTML. |
283 | 283 | */ |
284 | - public function do_tag( $tag, array $atts = [ ], $content = null ) { |
|
284 | + public function do_tag( $tag, array $atts = [ ], $content = null ) { |
|
285 | 285 | \BrightNucleus\Shortcode\do_tag( $tag, $atts, $content ); |
286 | 286 | } |
287 | 287 | } |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * ShortcodeUI Class. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * ShortcodeUI Class. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * ShortcodeUIInterface Interface. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * ShortcodeUIInterface Interface. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -11,11 +11,11 @@ |
||
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 | |
14 | -use Assert; |
|
15 | -use BrightNucleus\Config\ConfigInterface; |
|
16 | -use BrightNucleus\Config\ConfigTrait; |
|
17 | -use BrightNucleus\Dependency\DependencyManagerInterface as DependencyManager; |
|
18 | -use BrightNucleus\Exception\DomainException; |
|
14 | +use Assert; |
|
15 | +use BrightNucleus\Config\ConfigInterface; |
|
16 | +use BrightNucleus\Config\ConfigTrait; |
|
17 | +use BrightNucleus\Dependency\DependencyManagerInterface as DependencyManager; |
|
18 | +use BrightNucleus\Exception\DomainException; |
|
19 | 19 | use BrightNucleus\Exception\RuntimeException; |
20 | 20 | |
21 | 21 | /** |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shortcode Base Implementation. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Shortcode Base Implementation. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @package BrightNucleus\Shortcode |
30 | 30 | * @author Alain Schlesser <[email protected]> |
31 | 31 | */ |
32 | -class Shortcode implements ShortcodeInterface { |
|
32 | +class Shortcode implements ShortcodeInterface { |
|
33 | 33 | |
34 | 34 | use ConfigTrait; |
35 | 35 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ConfigInterface $config, |
89 | 89 | ShortcodeAttsParser $atts_parser, |
90 | 90 | DependencyManager $dependencies = null |
91 | - ) { |
|
91 | + ) { |
|
92 | 92 | |
93 | 93 | Assert\that( $shortcode_tag )->string()->notEmpty(); |
94 | 94 | |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | * @param mixed $context Optional. Arguments to pass on to the Registrable. |
108 | 108 | * @return void |
109 | 109 | */ |
110 | - public function register( $context = null ) { |
|
111 | - if ( ! $this->is_needed( $context ) ) { |
|
110 | + public function register( $context = null ) { |
|
111 | + if ( ! $this->is_needed( $context ) ) { |
|
112 | 112 | return; |
113 | 113 | } |
114 | 114 | $this->context = $context; |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | * @param mixed $context Data about the context in which the call is made. |
125 | 125 | * @return boolean Whether the shortcode is needed or not. |
126 | 126 | */ |
127 | - protected function is_needed( $context = null ) { |
|
127 | + protected function is_needed( $context = null ) { |
|
128 | 128 | |
129 | 129 | $is_needed = $this->hasConfigKey( 'is_needed' ) |
130 | 130 | ? $this->getConfigKey( 'is_needed' ) |
131 | 131 | : true; |
132 | 132 | |
133 | - if ( is_callable( $is_needed ) ) { |
|
133 | + if ( is_callable( $is_needed ) ) { |
|
134 | 134 | return $is_needed( $context ); |
135 | 135 | } |
136 | 136 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * |
145 | 145 | * @return string Shortcode tag. |
146 | 146 | */ |
147 | - public function get_tag() { |
|
147 | + public function get_tag() { |
|
148 | 148 | return (string) $this->shortcode_tag; |
149 | 149 | } |
150 | 150 | |
@@ -163,16 +163,16 @@ discard block |
||
163 | 163 | * render. |
164 | 164 | * @return string The shortcode's HTML output. |
165 | 165 | */ |
166 | - public function render( $atts, $content = null, $tag = null ) { |
|
166 | + public function render( $atts, $content = null, $tag = null ) { |
|
167 | 167 | $context = $this->context; |
168 | 168 | $atts = $this->atts_parser->parse_atts( $atts, $this->get_tag() ); |
169 | 169 | $handles = $this->get_dependency_handles(); |
170 | 170 | |
171 | - if ( $this->dependencies && count( $handles ) > 0 ) { |
|
172 | - foreach ( $handles as $handle ) { |
|
171 | + if ( $this->dependencies && count( $handles ) > 0 ) { |
|
172 | + foreach ( $handles as $handle ) { |
|
173 | 173 | $handle_found = $this->dependencies->enqueue_handle( $handle, |
174 | 174 | $atts ); |
175 | - if ( ! $handle_found ) { |
|
175 | + if ( ! $handle_found ) { |
|
176 | 176 | trigger_error( sprintf( |
177 | 177 | __( 'Could not enqueue dependency "%1$s" for shortcode "%2$s".', |
178 | 178 | 'bn-shortcodes' ), |
@@ -194,8 +194,8 @@ discard block |
||
194 | 194 | * |
195 | 195 | * @return array Array of strings that are registered dependency handles. |
196 | 196 | */ |
197 | - protected function get_dependency_handles() { |
|
198 | - if ( ! $this->hasConfigKey( 'dependencies' ) ) { |
|
197 | + protected function get_dependency_handles() { |
|
198 | + if ( ! $this->hasConfigKey( 'dependencies' ) ) { |
|
199 | 199 | return [ ]; |
200 | 200 | } |
201 | 201 | return (array) $this->getConfigKey( 'dependencies' ); |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | * @param mixed $context The context to pass through to the view. |
211 | 211 | * @return string HTML rendering of the view. |
212 | 212 | */ |
213 | - protected function render_view( $view, $context ) { |
|
214 | - if ( empty( $view ) ) { |
|
213 | + protected function render_view( $view, $context ) { |
|
214 | + if ( empty( $view ) ) { |
|
215 | 215 | return ''; |
216 | 216 | } |
217 | 217 | |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | * |
228 | 228 | * @return string Name of the view to render. |
229 | 229 | */ |
230 | - protected function get_view() { |
|
231 | - if ( ! $this->hasConfigKey( 'view' ) ) { |
|
230 | + protected function get_view() { |
|
231 | + if ( ! $this->hasConfigKey( 'view' ) ) { |
|
232 | 232 | return ''; |
233 | 233 | } |
234 | 234 | $view = $this->getConfigKey( 'view' ); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * @param string|null $content Inner content to pass to the shortcode. |
248 | 248 | * @return string|false Rendered HTML. |
249 | 249 | */ |
250 | - public function do_this( array $atts = [ ], $content = null ) { |
|
250 | + public function do_this( array $atts = [ ], $content = null ) { |
|
251 | 251 | \BrightNucleus\Shortcode\do_tag( $this->get_tag(), $atts, $content ); |
252 | 252 | } |
253 | 253 | } |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shortcode Manager Interface. |
|
4 | - * |
|
5 | - * @package BrightNucleus\Shortcode |
|
6 | - * @author Alain Schlesser <[email protected]> |
|
7 | - * @license GPL-2.0+ |
|
8 | - * @link http://www.brightnucleus.com/ |
|
9 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | - */ |
|
3 | + * Shortcode Manager Interface. |
|
4 | + * |
|
5 | + * @package BrightNucleus\Shortcode |
|
6 | + * @author Alain Schlesser <[email protected]> |
|
7 | + * @license GPL-2.0+ |
|
8 | + * @link http://www.brightnucleus.com/ |
|
9 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | namespace BrightNucleus\Shortcode; |
13 | 13 |
@@ -1,18 +1,18 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Templated Shortcode Implementation. |
|
4 | - * |
|
5 | - * This version of the shortcode uses Gamajo/TemplateLoader to let you override |
|
6 | - * the shortcode views from your theme. |
|
7 | - * |
|
8 | - * @see https://github.com/gamajo/TemplateLoader |
|
9 | - * |
|
10 | - * @package BrightNucleus\Shortcode |
|
11 | - * @author Alain Schlesser <[email protected]> |
|
12 | - * @license GPL-2.0+ |
|
13 | - * @link http://www.brightnucleus.com/ |
|
14 | - * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
15 | - */ |
|
3 | + * Templated Shortcode Implementation. |
|
4 | + * |
|
5 | + * This version of the shortcode uses Gamajo/TemplateLoader to let you override |
|
6 | + * the shortcode views from your theme. |
|
7 | + * |
|
8 | + * @see https://github.com/gamajo/TemplateLoader |
|
9 | + * |
|
10 | + * @package BrightNucleus\Shortcode |
|
11 | + * @author Alain Schlesser <[email protected]> |
|
12 | + * @license GPL-2.0+ |
|
13 | + * @link http://www.brightnucleus.com/ |
|
14 | + * @copyright 2015-2016 Alain Schlesser, Bright Nucleus |
|
15 | + */ |
|
16 | 16 | |
17 | 17 | namespace BrightNucleus\Shortcode; |
18 | 18 |