Beispiel #1
0
 function render_foogallery_shortcode($atts)
 {
     $args = wp_parse_args($atts, array('id' => 0, 'gallery' => ''));
     $args = apply_filters('foogallery_shortcode_atts', $args);
     //create new instance of template engine
     $engine = new FooGallery_Template_Loader();
     ob_start();
     $engine->render_template($args);
     $output_string = ob_get_contents();
     ob_end_clean();
     return $output_string;
 }
/**
 * Render a foogallery
 *
 * @param $gallery_id int The id of the foogallery you want to render
 */
function foogallery_render_gallery($gallery_id)
{
    //create new instance of template engine
    $engine = new FooGallery_Template_Loader();
    $engine->render_template(array('id' => $gallery_id));
}