Accordion-Shortcodes
Accordion-Shortcodes copied to clipboard
Filtering Shortcodes not working
I tried to use this example from the Readme but it does not seem to work.
add_filter('shortcode_atts_accordion', 'set_accordion_shortcode_defaults', 10, 3);
function set_accordion_shortcode_defaults($atts) {
// Override the openfirst setting here
$atts['openfirst'] = true;
return $atts;
}
Is shortcode_atts_accordion
hook correct, I do not see any reference to it in the code?
That snippet uses the shortcode_atts_(shortcode)
filter built into Wordpress.
Admittedly I haven't tested this in several years so I have no idea if it still works.
@philbuchanan thanks I didn't even realize that. Let me look into that some more.