cptbc_shortcode

The CPT Bootstrap Carousel cptbc shortcode function.

Description

cptbc_shortcode( $atts, (constant) $content = null ); 

Parameters (2)

0. $atts
The atts.
1. $content — Optional. (constant) => null
The content.

Usage

  1. if ( !function_exists( 'cptbc_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'cpt-bootstrap-carousel/cptbc-frontend.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // The content. 
  8. $content = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = cptbc_shortcode($atts, $content); 
  12.  

Defined (1)

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

/cptbc-frontend.php  
  1. function cptbc_shortcode($atts, $content = null) { 
  2. // Set default shortcode attributes 
  3. $options = get_option( 'cptbc_settings' ); 
  4. if(!$options) { 
  5. cptbc_set_options (); 
  6. $options = get_option( 'cptbc_settings' ); 
  7. $options['id'] = ''; 
  8.  
  9. // Parse incomming $atts into an array and merge it with $defaults 
  10. $atts = shortcode_atts($options, $atts); 
  11.  
  12. return cptbc_frontend($atts);