id_base = 'fourbzcore-slideshow-'; } /** * Construct id for a shortcode instance. * * @since 1.0.0 * @return string id. */ public function get_id() { // On every access, increment the index for use in the shortcode id ++self::$index; return $this->id_base . self::$index; } /** * Output the shortcode. * * Calls the template function to output the shortcode and passes it a global variable that holds all of the * information needed to output the shortcode. * * @since 1.0.0 * * @param array $atts Required. Options for display. */ public function display( $atts ) { extract( $atts ); // Get the template $template = locate_template( 'templates/slideshow.php', false, false ); // If theme does not provide a template, then will use the one provided by the plugin. if ( empty( $template ) ) { $template = dirname( dirname ( dirname(__FILE__) ) ) . '/templates/slideshow.php'; } include( $template ); } } }