<?php if ($id == 0) { $section = $_POST["tpl_section"]; } else { $tpl = GDSRDB::get_template($id); $section = $tpl->section; $elements = unserialize($tpl->elements); $dependencies = unserialize($tpl->dependencies); } if ($mode == "copy") { $id = 0; $tpl->name = "New Template"; $tpl->description = ""; } else { if ($mode == "edit" && $tpl->preinstalled == "1") { $id = 0; } } $template = $tpls->get_list($section); ?> <div class="wrap"><h2 class="gdptlogopage">GD Star Rating: T2 <?php _e("Template Editor", "gd-star-rating"); ?> </h2> <form method="post"> <input type="hidden" name="gdsr_save_tpl" value="" /> <input type="hidden" name="tpl_section" value="<?php echo $section; ?>
function wp_gdsr_get_template($template_id) { return GDSRDB::get_template($template_id); }