function theme_slideshow($atts, $content = null) { extract(shortcode_atts(array('alias' => '', 'width' => false, 'height' => false), $atts)); if ($alias) { $style = ''; if ($width) { $style = 'style="max-width:' . $width . 'px"'; } // turn on output buffering to capture output ob_start(); // generate sidebar display_slideShow($alias, $width, $height, true); // get output content $content = ob_get_clean(); $content = '<div class="styled-slideshow" ' . $style . '>' . $content . '</div>'; // return the content return $content; } }
function show_header_content($id) { global $post; if (!$id) { // that's not good, we need an id to use } else { $content = explode(",", $id); switch ($content[0]) { case 'ss': // slide show display_slideShow($content[1]); break; case 'static': // static content $id = $content[1]; $id = !is_numeric($id) ? get_ID_by_slug($id, 'static_block') : $id; echo theme_get_page($id); //display_headerGraphic($content[1]); break; default: // this shouldn't happen. } } return true; }