We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When placing a shortcode within a text widget, it always executed regardless of whether or not the configuration is set to false:
Shortcode.php
public function renderCallback($attributes, $content = null) { if (is_admin()) { return null; } $this->attributes = shortcode_atts($this->config->defaults, $attributes, $this->config->shortcode); $this->content = $this->config->doShortcodeWithinContent === true ? do_shortcode($content) : $content; return $this->render(); }
Custom Shortcode
return [ 'autoload' => true, 'classname' => '', 'config' => [ 'shortcode' => 'section', 'defaults' => [ 'link' => '#', 'thumbnail' => '#', 'header_tag' => 'h3', 'title' => '', 'button_title' => 'Access Now', ], 'doShortcodeWithinContent' => false, 'view' => $rootPath . 'src/Shortcode/views/section.php', ], ];
SidebarRegister.php
protected function initEvents() { add_action('init', [$this, 'run'], 20); //add_filter('widget_text', 'do_shortcode'); }
Is this behavior expected since WP 4.9?
https://make.wordpress.org/core/2017/10/24/widget-improvements-in-wordpress-4-9/
The text was updated successfully, but these errors were encountered:
@hellofromtonya
Sorry, something went wrong.
No branches or pull requests
When placing a shortcode within a text widget, it always executed regardless of whether or not the configuration is set to false:
Shortcode.php
Custom Shortcode
SidebarRegister.php
Is this behavior expected since WP 4.9?
https://make.wordpress.org/core/2017/10/24/widget-improvements-in-wordpress-4-9/
The text was updated successfully, but these errors were encountered: