function shortcode_slider($atts, $content = null)
 {
     global $post;
     extract(shortcode_atts(array('id' => NULL, 'slides_src' => NULL), $atts));
     if (($id === NULL || is_int($id)) && !$slides_src) {
         echo __('Error: The shortcode attribute "id" is not a integer or is missing.', 'ssp');
         return FALSE;
     }
     if (get_post_status($id) == 'trash' && !$slides_src) {
         echo __('Error: Slider is in trash.', 'ssp');
         return FALSE;
     }
     if (get_post_status($id) !== 'publish' && !$slides_src) {
         return FALSE;
     }
     $atts['slides_src'] = $slides_src;
     if ($post) {
         $atts['post_id'] = $post->ID;
     } else {
         $atts['post_id'] = NULL;
     }
     $atts = apply_filters('ssp_shortcode_atts', $atts);
     ob_start();
     SSP_SKIN::setup_slider($id, $atts);
     SSP_SKIN::render_slider();
     //$content = ob_get_contents();
     //ob_end_clean();
     return ob_get_clean();
 }
Beispiel #2
0
 static function set_active_skin($skin_path)
 {
     if (self::is_default_skin($skin_path)) {
         self::$active_skin = $skin_path;
         return;
     }
     if (mb_substr($skin_path, -1) !== DIRECTORY_SEPARATOR) {
         $skin_path .= DIRECTORY_SEPARATOR;
     }
     self::$active_skin = $skin_path;
 }
function muneeb_ssp_slider($slider_id, $shortcode_atts = NULL)
{
    SSP_SKIN::setup_slider($slider_id, $shortcode_atts);
    SSP_SKIN::render_slider();
}