register_my_twitter_feed_shortcode

For simplicity, the shortcode simply passes data to the template tag, nothing more.

Description

register_my_twitter_feed_shortcode( $given_atts ); 

If a new option is made available in the future you'll need to add it to the $default_atts array and the $feed_config array. *******************************************************

Parameters (1)

0. $given_atts
The given atts.

Usage

  1. if ( !function_exists( 'register_my_twitter_feed_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'devbuddy-twitter-feed-plugin/assets/sample-shortcode.php'; 
  3.  
  4. // The given atts. 
  5. $given_atts = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = register_my_twitter_feed_shortcode($given_atts); 
  9.  

Defined (1)

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

/assets/sample-shortcode.php  
  1. function register_my_twitter_feed_shortcode( $given_atts ) { 
  2.  
  3. /** Default values here will always be NULL, defaults 
  4. are checked and set in the plugin itself */ 
  5. $default_atts = 
  6. array( 
  7. 'feed_type' => NULL,  
  8. 'user' => NULL,  
  9. 'search_term' => NULL,  
  10. 'count' => NULL,  
  11. 'exclude_replies' => NULL,  
  12. 'show_images' => NULL,  
  13. 'https' => NULL,  
  14. 'default_styling' => NULL,  
  15. 'cache_hours' => NULL,  
  16. 'clear_cache' => NULL,  
  17. 'oauth_access_token' => NULL,  
  18. 'oauth_access_token_secret' => NULL,  
  19. 'consumer_key' => NULL,  
  20. 'consumer_secret' => NULL 
  21. ); 
  22.  
  23. extract( 
  24. shortcode_atts( $default_atts, $given_atts ) 
  25. ); 
  26.  
  27. $feed_config = 
  28. array( 
  29. 'feed_type' => $feed_type,  
  30. 'user' => $user,  
  31. 'search_term' => $search_term,  
  32. 'count' => $count,  
  33. 'exclude_replies' => $exclude_replies,  
  34. 'show_images' => $show_images,  
  35. 'https' => $https,  
  36. 'default_styling' => $default_styling,  
  37. 'cache_hours' => $cache_hours,  
  38. 'clear_cache' => $clear_cache,  
  39. 'oauth_access_token' => $oauth_access_token,  
  40. 'oauth_access_token_secret' => $oauth_access_token_secret,  
  41. 'consumer_key' => $consumer_key,  
  42. 'consumer_secret' => $consumer_secret,  
  43. 'is_shortcode_called' => TRUE 
  44. ); 
  45.  
  46.  
  47. /** If you've created your own template tag, change the 
  48. tag here to match it. Otherwise, leave it as is */ 
  49. returndb_twitter_feed $feed_config ); 
  50.