jetpack_load_shortcodes

Load all available Jetpack shortcode files.

Description

jetpack_load_shortcodes(); 

Usage

  1. if ( !function_exists( 'jetpack_load_shortcodes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/shortcodes.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = jetpack_load_shortcodes(); 
  7.  

Defined (1)

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

/modules/shortcodes.php  
  1. function jetpack_load_shortcodes() { 
  2. global $wp_version; 
  3.  
  4. $shortcode_includes = array(); 
  5.  
  6. foreach ( Jetpack::glob_php( dirname( __FILE__ ) . '/shortcodes' ) as $file ) { 
  7. $shortcode_includes[] = $file; 
  8.  
  9. /** 
  10. * This filter allows other plugins to override which shortcodes Jetpack loads. 
  11. * @module shortcodes 
  12. * @since 2.2.1 
  13. * @param array $shortcode_includes An array of which shortcodes to include. 
  14. */ 
  15. $shortcode_includes = apply_filters( 'jetpack_shortcodes_to_include', $shortcode_includes ); 
  16.  
  17. foreach ( $shortcode_includes as $include ) { 
  18. if ( version_compare( $wp_version, '3.6-z', '>=' ) && stristr( $include, 'audio.php' ) ) { 
  19. continue; 
  20.  
  21. include $include;