testimonials

The Jetpack by WordPress.com testimonials shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[testimonials]'); 
  1. // variable usage 
  2. $result = do_shortcode('[testimonials]'); 
  3. echo $result;  

Defined (1)

The shortcode is defined in the following location(s).

/modules/custom-post-types/testimonial.php  
  1. // Register [jetpack_testimonials] always and 
  2. // register [testimonials] if [testimonials] isn't already set 
  3. add_shortcode( 'jetpack_testimonials', array( $this, 'jetpack_testimonial_shortcode' ) ); 
  4.  
  5. if ( ! shortcode_exists( 'testimonials' ) ) { 
  6. add_shortcode( 'testimonials', array( $this, 'jetpack_testimonial_shortcode' ) ); 
  7.  
  8. // If CPT was enabled programatically and no CPT items exist when user switches away, disable 
  9. if ( $setting && $this->site_supports_custom_post_type() ) { 
  10. add_action( 'switch_theme', array( $this, 'deactivation_post_type_support' ) );