public function show_template_options() { global $post; $options = new MaxGalleriaVideoTilesOptions($post->ID); if ($options->get_template() == 'video-tiles') { require_once 'video-tiles-meta.php'; } }
<?php $options = new MaxGalleriaVideoTilesOptions(); ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery("#save-video-tiles-settings").click(function() { jQuery("#save-video-tiles-settings-success").hide(); var form_data = jQuery("#form-video-tiles-settings").serialize(); // If thumb caption enabled is not checked, we have to add it to form data with an empty value if (jQuery("#<?php echo $options->thumb_caption_enabled_default_key; ?> ").is(":not(:checked)")) { form_data += "&<?php echo $options->thumb_caption_enabled_default_key; ?> ="; } // Add the action to the form data form_data += "&action=save_video_tiles_defaults"; jQuery.ajax({ type: "POST", url: "<?php echo admin_url('admin-ajax.php'); ?>
<?php global $post; $options = new MaxGalleriaVideoTilesOptions($post->ID); ?> <script type="text/javascript"> jQuery(document).ready(function() { enableDisableThumbClickNewWindow(); enableDisableLightboxCustomSize(); jQuery("#<?php echo $options->thumb_click_key; ?> ").change(function() { enableDisableThumbClickNewWindow(); }); jQuery("#<?php echo $options->lightbox_video_size_key; ?> ").change(function() { enableDisableLightboxCustomSize(); }); }); function enableDisableThumbClickNewWindow() { thumb_click = jQuery("#<?php echo $options->thumb_click_key; ?> ").val();