Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Peter J. Herrel

    (@donutz)

    @paulmyatt, sure, you can filter the default pairs (the supported attributes and their defaults) with the wp_bootstrap_carousel_shortcode_atts filter:

    add_filter( 'wp_bootstrap_carousel_shortcode_atts', 'my_wp_bootstrap_carousel_shortcode_pairs', 10, 1 );
    function my_wp_bootstrap_carousel_shortcode_pairs( $pairs )
    {
        $pairs['exclude'] = '';
    
        return $pairs;
    }

    This approach still allows you to exclude the thumb manually, if necessary, by using the thumb’s ID with exclude param in the shortcode tag.

    Another and more permanent option would be to filter the $atts (the user defined attributes in the shortcode tag) that are passed through the dynamic shortcode_atts_{$shortcode} filter:

    add_filter( 'shortcode_atts_carousel', 'my_wp_bootstrap_carousel_shortcode_atts', 10, 1 );
    function my_wp_bootstrap_carousel_shortcode_atts( $atts )
    {
        $atts['exclude'] = '';
    
        return $atts;
    }

    Plugin Author Peter J. Herrel

    (@donutz)

    Marking this topic as resolved. @paulmyatt if you got more questions, let me know.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Featured image’ is closed to new replies.