Viewing 1 replies (of 1 total)
  • I tried the plugin as well, and it has no effect at all, here is how I rewrite it :

    add_action('after_setup_theme', 'sushi_after_setup_theme');
    
    function sushi_after_setup_theme()
    {
        remove_shortcode('gallery');
        add_shortcode('gallery', 'sushi_link_none_gallery_shortcode', 10, 1);
    }
    
    function sushi_link_none_gallery_shortcode($attr)
    {
        $output = gallery_shortcode($attr);
    
        if($attr['link'] == "none") {
            $output = preg_replace(array('/<a[^>]*>/', '/<\/a>/'), '', $output);
        }
    
        return $output;
    }

    The important part in this code is to place your code in an after_setup_theme handler.

Viewing 1 replies (of 1 total)
  • The topic ‘3.5.1 Compatibility’ is closed to new replies.