if ($desired_tpl_slug == $c['slug']) { $tpl_location = $l; $tpl_slug = $desired_tpl_slug; break; } } } } if ($tpl_location && $tpl_slug) { $new_group->templateLocation = $tpl_location; $new_group->template = $tpl_slug; } else { $new_group->templateLocation = 'builtin'; $new_group->template = 'default'; } $new_group->save(); // redirect to the new edit page for this slide group $TS_Total_Slider->ugly_js_redirect('edit-slide-group', $new_slug); die; } } } } ?> <script type="text/javascript"> //<![CDATA[ jQuery(document).ready(function() { jQuery('#new-slide-group-button').click(function(e) { e.preventDefault(); jQuery('#new-slide-group').show('slow'); });
if ($tpl_location == $slide_group->templateLocation && $tpl_slug == $slide_group->template) { // avoid being destructive if it's unnecessary // there is no change, so just go back $this->ugly_js_redirect('edit-slide-group', $slide_group->slug); die; } if ($tpl_location && $tpl_slug) { $slide_group->templateLocation = $tpl_location; $slide_group->template = $tpl_slug; } else { $slide_group->templateLocation = 'builtin'; $slide_group->template = 'default'; } // remove X/Y positioning data, or else we may have an off-screen title box on the new template $slide_group->remove_xy_data(); $slide_group->save(); $TS_Total_Slider->ugly_js_redirect('edit-slide-group', $slide_group->slug); die; } // add the metaboxes add_meta_box('slide-sorter-mb', __('Slides', 'total-slider'), array($TS_Total_Slider, 'print_slide_sorter_metabox'), '_total_slider_slide', 'normal', 'core'); add_meta_box('slide-preview-mb', __('Preview', 'total-slider'), array($TS_Total_Slider, 'print_slide_preview_metabox'), '_total_slider_slide', 'normal', 'core'); add_meta_box('slide-editor-mb', __('Edit', 'total-slider'), array($TS_Total_Slider, 'print_slide_editor_metabox'), '_total_slider_slide_bottom', 'normal', 'core'); add_meta_box('slide-template-mb', __('Template', 'total-slider'), array($TS_Total_Slider, 'print_slide_template_metabox'), '_total_slider_slide_bottom', 'side', 'core'); add_meta_box('credits-notes-mb', __('Credits', 'total-slider'), array($TS_Total_Slider, 'print_credits_metabox'), '_total_slider_slide_bottom', 'side', 'core'); if (function_exists('find_posts_div')) { // bring in the post/page finder interface for links find_posts_div(); } ?> <!-- Proxy template change form -->