PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.7.8
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.7.8
2.7.9 2.7.8 2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 All 30 releases
← All changes | includes/shortcodes/shortcodes.php +0 -23 trunk → 2.7.8 View file →
@@ -229,31 +229,8 @@
229 229 return WINP_Plugin::app()->get_execute_object()->prepareCode( $snippet_code, $id );
230 230 }
231 231
232 232 /**
233 - * Report a top-level declaration the snippet would redeclare instead of evaluating it.
234 - *
235 - * Repeated placements of one snippet re-evaluate it, and a redeclaration inside
236 - * eval() ends the request. Clears the current snippet context when reporting.
237 - *
238 - * @param string $snippet_content Snippet code.
239 - * @param string $snippet_type Snippet type.
240 - *
241 - * @return string|null Error output, or null when the snippet can be evaluated.
242 - */
243 - protected function render_redeclaration_error( string $snippet_content, string $snippet_type ): ?string {
244 - $redeclaration_error = WINP_Code_Validator::get_redeclaration_error( $snippet_content, $snippet_type );
245 - if ( null === $redeclaration_error ) {
246 - return null;
247 - }
248 -
249 - $error_output = WINP_Error_Handler::handle_exception( $redeclaration_error );
250 - WINP_Error_Handler::clear_current_snippet();
251 -
252 - return $error_output;
253 - }
254 -
255 - /**
256 233 * Content render
257 234 *
258 235 * @param array<string, mixed> $attr Shortcode attributes.
259 236 * @param string $content Shortcode content.