Closed thejimbirch closed 10 years ago
Any idea on how to just remove the shortcode update with an action? The custom gallery shortcode omits many of the options that come standard when setting up a gallery?
remove_shortcode('gallery', 'gallery_shortcode_tbs');
Seems to remove the gallery shortcode altogether.
Have you tried this?
remove_shortcode('gallery', 'gallery_shortcode_tbs');
add_shortcode('gallery', 'gallery_shortcode');
I had. It would be ideal if the theme functions were pluggable.
I ended up having to add them to the init hook:
if (!function_exists('remove_shortcodes')) {
function remove_shortcodes() {
remove_shortcode('gallery', 'gallery_shortcode_tbs');
add_shortcode('gallery', 'gallery_shortcode');
}
}
add_action('init', 'remove_shortcodes');
Thanks for takign the time.
If you are using a child them with it's own library/shortcodes.php, you could probably just delete lines 7 - 30.
You are absolutely correct.
Excellent!
I've pulled out the custom wp_bootstrap gallery shortcode in favor of sticking closer to what comes with WordPress out of the box.
Hey,
Looks like you missed this in the upgrade. The code for the Wordpress Gallery should be something like this: