WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: TBTestimonials] Feature request: Use image instead of gravatar

[Resolved] [Plugin: TBTestimonials] Feature request: Use image instead of gravatar

Viewing 1 replies (of 1 total)
  • Plugin Author Travis Ballard

    @ansimation

    This is resolved, yes? same way you added the testimonial date in your othe rpost but instead of returning the date, you return get_the_post_thumbnail() or whatever instead.

    Example:

    /**
    * add custom template tags to tbtestimonials plugin
    *
    * @param mixed $t - twig instance
    */
    function add_tags_to_tbt( $t ){
        $t->addGlobal( 'image', call_user_func( 'tbt_featured_image_tag' ) );
    }
    
    /**
    * callback for image template tag in tbtestimonials
    *
    */
    function tbt_featured_image_tag()
    {
        if( has_post_thumbnail() )
            return get_the_post_thumbnail();
    
        return false;
    }
    
    # hook in
    add_action( 'tbt_template_functions', 'add_tags_to_tbt' );
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: TBTestimonials] Feature request: Use image instead of gravatar’ is closed to new replies.