function Form($settings) { // Load options $this->load_options($settings); unset($settings); ?> <p> <label for="<?php echo $this->Get_Field_Id('title'); ?> "><?php echo $this->t('Title'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('title')); ?> " /><br /> <small><?php echo $this->t('Leave blank to use the widget default title.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('taxonomy'); ?> "><?php echo $this->t('Taxonomy'); ?> </label>: <select id="<?php echo $this->Get_Field_Id('taxonomy'); ?> " name="<?php echo $this->Get_Field_Name('taxonomy'); ?> "> <?php foreach (Get_Object_Taxonomies($this->fancy_gallery->gallery_post_type) as $taxonomy) { $taxonomy = Get_Taxonomy($taxonomy); ?> <option value="<?php echo $taxonomy->name; ?> " <?php Selected($this->get_option('taxonomy'), $taxonomy->name); ?> ><?php echo HTMLSpecialChars($taxonomy->labels->name); ?> </option> <?php } ?> </select><br /> <small><?php echo $this->t('Please choose the Taxonomy the widget should display.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('number'); ?> "><?php echo $this->t('Number'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('number'); ?> " name="<?php echo $this->get_field_name('number'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('number')); ?> " size="4" /><br /> <small><?php echo $this->t('Leave blank to show all.'); ?> </small> </p> <p> <label for="<?php echo $this->get_field_id('exclude'); ?> "><?php _e('Exclude:'); ?> </label> <input type="text" value="<?php echo HTMLSpecialChars($this->get_option('exclude')); ?> " name="<?php echo $this->get_field_name('exclude'); ?> " id="<?php echo $this->get_field_id('exclude'); ?> " class="widefat" /><br /> <small><?php echo $this->t('Term IDs, separated by commas.'); ?> </small> </p> <p> <input type="checkbox" id="<?php echo $this->get_field_id('count'); ?> " name="<?php echo $this->get_field_name('count'); ?> " <?php Checked($this->get_option('count') == True); ?> /> <label for="<?php echo $this->get_field_id('count'); ?> "><?php _e('Show Gallery counts.'); ?> </label> </p> <p> <label for="<?php echo $this->Get_Field_Id('orderby'); ?> "><?php echo $this->t('Order by'); ?> </label>: <select id="<?php echo $this->Get_Field_Id('orderby'); ?> " name="<?php echo $this->Get_Field_Name('orderby'); ?> "> <option value="name" <?php Selected($this->get_option('orderby'), 'name'); ?> ><?php echo __('Name'); ?> </option> <option value="count" <?php Selected($this->get_option('orderby'), 'count'); ?> ><?php echo $this->t('Gallery Count'); ?> </option> <option value="ID" <?php Selected($this->get_option('orderby'), 'ID'); ?> >ID</option> <option value="slug" <?php Selected($this->get_option('orderby'), 'slug'); ?> ><?php echo $this->t('Slug'); ?> </option> </select> </p> <p> <label for="<?php echo $this->Get_Field_Id('order'); ?> "><?php echo $this->t('Order'); ?> </label>: <select id="<?php echo $this->Get_Field_Id('order'); ?> " name="<?php echo $this->Get_Field_Name('order'); ?> "> <option value="ASC" <?php Selected($this->get_option('order'), 'ASC'); ?> ><?php _e('Ascending'); ?> </option> <option value="DESC" <?php Selected($this->get_option('order'), 'DESC'); ?> ><?php _e('Descending'); ?> </option> </select> </p> <?php }
function Form($settings) { // Load options $this->load_options($settings); unset($settings); ?> <p> <label for="<?php echo $this->Get_Field_Id('title'); ?> "><?php echo $this->t('Title'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('title')); ?> " /><br /> <small><?php echo $this->t('Leave blank to use the widget default title.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('limit'); ?> "><?php echo $this->t('Number of Images'); ?> </label>: <input type="text" id="<?php echo $this->Get_Field_Id('limit'); ?> " name="<?php echo $this->get_field_name('limit'); ?> " value="<?php echo HTMLSpecialChars($this->get_option('limit')); ?> " size="4" /><br /> <small><?php echo $this->t('Leave blank (or "0") to show all.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('link_target'); ?> "><?php echo $this->t('Link target'); ?> </label>: <select name="<?php echo $this->get_field_name('link_target'); ?> " id="<?php echo $this->Get_Field_Id('link_target'); ?> "> <option value="file" <?php Selected($this->Get_option('link_target'), 'file'); ?> ><?php echo $this->t('Fullsize Image'); ?> </option> <option value="gallery" <?php Selected($this->Get_option('link_target'), 'gallery'); ?> ><?php echo $this->t('Image Gallery'); ?> </option> </select> </p> <p> <label for="<?php echo $this->Get_Field_Id('thumb_width'); ?> "><?php echo $this->t('Thumbnail width:'); ?> </label> <input type="text" name="<?php echo $this->get_field_name('thumb_width'); ?> " id="<?php echo $this->Get_Field_Id('thumb_width'); ?> " value="<?php echo HTMLSpecialChars($this->Get_Option('thumb_width')); ?> " size="4" />px </p> <p> <label for="<?php echo $this->Get_Field_Id('thumb_height'); ?> "><?php echo $this->t('Thumbnail height:'); ?> </label> <input type="text" name="<?php echo $this->get_field_name('thumb_height'); ?> " id="<?php echo $this->Get_Field_Id('thumb_height'); ?> " value="<?php echo HTMLSpecialChars($this->Get_Option('thumb_height')); ?> " size="4" />px </p> <p> <input type="checkbox" name="<?php echo $this->get_field_name('thumb_grayscale'); ?> " id="<?php echo $this->Get_Field_Id('thumb_grayscale'); ?> " value="yes" <?php Checked($this->Get_Option('thumb_grayscale'), 'yes'); ?> /> <label for="<?php echo $this->Get_Field_Id('thumb_grayscale'); ?> "><?php echo $this->t('Convert thumbnails to grayscale.'); ?> </label> </p> <p> <input type="checkbox" name="<?php echo $this->get_field_name('thumb_negate'); ?> " id="<?php echo $this->Get_Field_Id('thumb_negate'); ?> " value="yes" <?php Checked($this->Get_Option('thumb_negate'), 'yes'); ?> /> <label for="<?php echo $this->Get_Field_Id('thumb_negate'); ?> "><?php echo $this->t('Negate the thumbnails.'); ?> </label> </p> <p> <label for="<?php echo $this->get_field_id('exclude'); ?> "><?php _e('Exclude:'); ?> </label> <input type="text" value="<?php echo HTMLSpecialChars($this->get_option('exclude')); ?> " name="<?php echo $this->get_field_name('exclude'); ?> " id="<?php echo $this->get_field_id('exclude'); ?> " class="widefat" /><br /> <small><?php echo $this->t('Term IDs, separated by commas.'); ?> </small> </p> <h3><?php echo $this->t('Template'); ?> </h3> <p><?php echo $this->t('Please choose a template to display this widget.'); ?> </p> <?php foreach ($this->fancy_gallery->Get_Template_Files() as $name => $properties) { ?> <p> <input type="radio" name="<?php echo $this->get_field_name('template'); ?> " id="<?php echo Sanitize_Title($properties['file']); ?> " value="<?php echo HTMLSpecialChars($properties['file']); ?> " <?php Checked($this->Get_Option('template'), $properties['file']); ?> <?php Checked(!$this->Get_Option('template') && $properties['file'] == $this->fancy_gallery->Get_Default_Template()); ?> /> <label for="<?php echo Sanitize_Title($properties['file']); ?> "> <?php if (empty($properties['name'])) { ?> <em><?php echo $properties['file']; ?> </em> <?php } else { ?> <strong><?php echo $properties['name']; ?> </strong> <?php } ?> </label> <?php if ($properties['description']) { ?> <br /><?php echo $properties['description']; } ?> </p> <?php } }
function Form($settings) { # Load options $this->load_options($settings); unset($settings); ?> <p style="color:green"><?php $this->core->mocking_bird->Pro_Notice('widget'); ?> </p> <p> <label for="<?php echo $this->Get_Field_Id('title'); ?> "><?php _e('Title:'); ?> </label> <input type="text" id="<?php echo $this->Get_Field_Id('title'); ?> " name="<?php echo $this->Get_Field_Name('title'); ?> " value="<?php echo Esc_Attr($this->Get_Option('title')); ?> " class="widefat"> <small><?php echo $this->t('Leave blank to use the widget default title.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('limit'); ?> "><?php echo $this->t('Number of Images:'); ?> </label> <input type="number" id="<?php echo $this->Get_Field_Id('limit'); ?> " name="<?php echo $this->Get_Field_Name('limit'); ?> " value="<?php echo Esc_Attr($this->Get_Option('limit')); ?> " class="widefat"> <small><?php echo $this->t('Leave blank (or "0") to show all.'); ?> </small> </p> <p> <label for="<?php echo $this->Get_Field_Id('link_target'); ?> "><?php echo $this->t('Link target:'); ?> </label> <select name="<?php echo $this->Get_Field_Name('link_target'); ?> " id="<?php echo $this->Get_Field_Id('link_target'); ?> " class="widefat"> <option value="file" <?php Selected($this->Get_Option('link_target'), 'file'); ?> ><?php echo $this->t('Fullsize Image'); ?> </option> <option value="gallery" <?php Selected($this->Get_Option('link_target'), 'gallery'); ?> ><?php echo $this->t('Image Gallery'); ?> </option> </select> </p> <p> <label for="<?php echo $this->Get_Field_Id('thumb_width'); ?> "><?php echo $this->t('Thumbnail width:'); ?> </label> <input type="number" name="<?php echo $this->Get_Field_Name('thumb_width'); ?> " id="<?php echo $this->Get_Field_Id('thumb_width'); ?> " value="<?php echo Esc_Attr($this->Get_Option('thumb_width')); ?> " <?php Disabled(True); ?> > px </p> <p> <label for="<?php echo $this->Get_Field_Id('thumb_height'); ?> "><?php echo $this->t('Thumbnail height:'); ?> </label> <input type="number" name="<?php echo $this->Get_Field_Name('thumb_height'); ?> " id="<?php echo $this->Get_Field_Id('thumb_height'); ?> " value="<?php echo Esc_Attr($this->Get_Option('thumb_height')); ?> " <?php Disabled(True); ?> > px </p> <p> <input type="checkbox" name="<?php echo $this->Get_Field_Name('thumb_grayscale'); ?> " id="<?php echo $this->Get_Field_Id('thumb_grayscale'); ?> " value="yes" <?php Disabled(True); ?> > <label for="<?php echo $this->Get_Field_Id('thumb_grayscale'); ?> "><?php echo $this->t('Convert thumbnails to grayscale.'); ?> </label> </p> <p> <input type="checkbox" name="<?php echo $this->Get_Field_Name('thumb_negate'); ?> " id="<?php echo $this->Get_Field_Id('thumb_negate'); ?> " value="yes" <?php Disabled(True); ?> > <label for="<?php echo $this->Get_Field_Id('thumb_negate'); ?> "><?php echo $this->t('Negate the thumbnails.'); ?> </label> </p> <h3><?php echo $this->t('Template'); ?> </h3> <p><?php echo $this->t('Please choose a template to display this widget.'); ?> </p> <?php foreach ($this->core->Get_Template_Files() as $name => $properties) { ?> <p> <input type="radio" name="<?php echo $this->Get_Field_Name('template'); ?> " id="<?php echo Sanitize_Title($properties['name']); ?> " value="<?php echo Esc_Attr($properties['file']); ?> " <?php Checked($this->Get_Option('template'), $properties['file']); ?> <?php Checked(!$this->Get_Option('template') && $properties['file'] == $this->core->Get_Default_Template()); ?> > <label for="<?php echo Sanitize_Title($properties['name']); ?> "> <?php if (empty($properties['name'])) { ?> <em><?php echo $properties['file']; ?> </em> <?php } else { ?> <strong><?php echo $properties['name']; ?> </strong> <?php } ?> </label> <?php if ($properties['description']) { ?> <br> <?php echo $properties['description']; } ?> </p> <?php } }
function print_options_page() { ?> <script type="text/javascript"> jQuery(function($){ // Activate the color picker jQuery('#colorpicker').farbtastic('input.color'); }); </script> <div class="wrap"> <?php screen_icon(); ?> <h2><?php echo $this->t('Fancy Gallery Settings'); ?> </h2> <form method="post" action=""> <?php if (!empty($_POST) && $this->Save_Settings()) { ?> <div id="message" class="updated fade"><p><strong><?php _e('Settings saved.'); ?> </strong></p></div> <?php } ?> <table class="form-table"> <tr valign="top"> <th scope="row"><?php echo $this->t('Loop mode'); ?> </th> <td> <input type="checkbox" name="cyclic" value="yes" <?php Checked($this->Load_Setting('cyclic'), 'yes'); ?> /> <?php echo $this->t('Will enable the user to get from the last image to the first one with the next button.'); ?> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Scrollbars'); ?> </th> <td> <select name="scrolling"> <option value=""><?php echo $this->t('Automatic'); ?> </option> <option value="yes" <?php Selected($this->Load_Setting('scrolling'), 'yes'); ?> ><?php _e('Yes'); ?> </option> <option value="no" <?php Selected($this->Load_Setting('scrolling'), 'no'); ?> ><?php _e('No'); ?> </option> </select> (<?php echo $this->t('"Automatic" means scrollbars will be visibly if necessary. "Yes" and "No" should be clear.'); ?> ) </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Center on scroll'); ?> </th> <td> <input type="checkbox" name="center_on_scroll" value="yes" <?php Checked($this->Load_Setting('center_on_scroll'), 'yes'); ?> /> <?php echo $this->t('Keep the FancyBox always in the center of the screen while scrolling the page.'); ?> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Overlay opacity'); ?> </th> <td> <input type="text" name="overlay_opacity" value="<?php echo IntVal($this->Load_Setting('overlay_opacity', 30)); ?> " size="3" />%<br /> <small><?php echo $this->t('Percentaged opacity of the background of the FancyBox. Should be a value from 0 (invisible) to 100 (opaque). (Default is 30)'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Overlay color'); ?> </th> <td> <div id="colorpicker"></div> <input type="text" name="overlay_color" value="<?php echo $this->Load_Setting('overlay_color', '#666'); ?> " class="color" /><br /> <small><?php echo $this->t('Please choose the color of the "darker" background.'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Border width'); ?> </th> <td> <input type="text" name="border_width" value="<?php echo IntVal($this->Load_Setting('border_width', 10)); ?> " size="4" /><?php echo $this->t('px', 'Abbr. Pixels'); ?> <br /> <small><?php echo $this->t('Width of the image frame border. (in pixels)'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Image title'); ?> </th> <td> <input type="checkbox" name="hide_image_title" value="yes" <?php Checked($this->Load_Setting('hide_image_title'), 'yes'); ?> /> <?php echo $this->t('Do not shot image titles.'); ?> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Title position'); ?> </th> <td> <select name="title_position"> <option value="outside" <?php Selected($this->Load_Setting('title_position'), 'outside'); ?> ><?php echo $this->t('Outside the FancyBox'); ?> </option> <option value="inside" <?php Selected($this->Load_Setting('title_position'), 'inside'); ?> ><?php echo $this->t('Inside the FancyBox'); ?> </option> <option value="over" <?php Selected($this->Load_Setting('title_position'), 'over'); ?> ><?php echo $this->t('Over the image'); ?> </option> </select> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Opening transition'); ?> </th> <td> <select name="transition_in"> <option value="fade" <?php Selected($this->Load_Setting('transition_in'), 'fade'); ?> ><?php echo $this->t('Fade'); ?> </option> <option value="elastic" <?php Selected($this->Load_Setting('transition_in'), 'elastic'); ?> ><?php echo $this->t('Elastic'); ?> </option> <option value="none" <?php Selected($this->Load_Setting('transition_in'), 'none'); ?> ><?php echo $this->t('No transition'); ?> </option> </select> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Opening speed'); ?> </th> <td> <input type="text" name="speed_in" value="<?php echo IntVal($this->Load_Setting('speed_in', 300)); ?> " size="4" /><?php echo $this->t('msec', 'Abbr. Milliseconds'); ?> <br /> <small><?php echo $this->t('Speed of the fade and elastic transitions. (in milliseconds)'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Closing transition'); ?> </th> <td> <select name="transition_out"> <option value="fade" <?php Selected($this->Load_Setting('transition_out'), 'fade'); ?> ><?php echo $this->t('Fade'); ?> </option> <option value="elastic" <?php Selected($this->Load_Setting('transition_out'), 'elastic'); ?> ><?php echo $this->t('Elastic'); ?> </option> <option value="none" <?php Selected($this->Load_Setting('transition_out'), 'none'); ?> ><?php echo $this->t('No transition'); ?> </option> </select> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Closing speed'); ?> </th> <td> <input type="text" name="speed_out" value="<?php echo IntVal($this->Load_Setting('speed_out', 300)); ?> " size="4" /><?php echo $this->t('msec', 'Abbr. Milliseconds'); ?> <br /> <small><?php echo $this->t('Speed of the fade and elastic transitions. (in milliseconds)'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Image resizing speed'); ?> </th> <td> <input type="text" name="change_speed" value="<?php echo IntVal($this->Load_Setting('change_speed', 300)); ?> " size="4" /><?php echo $this->t('msec', 'Abbr. Milliseconds'); ?> <br /> <small><?php echo $this->t('Speed of resizing when changing gallery items. (in milliseconds)'); ?> </small> </td> </tr> <tr valign="top"> <th scope="row"><?php echo $this->t('Appearance problems'); ?> </th> <td> <input type="checkbox" name="img_block_fix" value="yes" <?php Checked($this->Load_Setting('img_block_fix'), 'yes'); ?> /> <?php echo $this->t('Convert gallery images to inline elements. (Tick this box if your galleries have only one column.)'); ?> <br /> <small><?php echo $this->t('Some themes let images appear as block elements. This effects that your image galleries have only one column.'); ?> </small> </td> </tr> </table> <div style="max-width:600px"> <?php do_action('donation_message'); ?> </div> <p class="submit"> <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes'); ?> " /> </p> </form> </div><?php }
<select name="data[<?php echo $post_name; ?> ][<?php echo $metabox_id; ?> ][toggle]" class="select_toggle"> <option value="0" <?php Selected($Selected, 0); ?> ><?php _e('Expanded', $this->ltd); ?> </option> <option value="1" <?php Selected($Selected, 1); ?> ><?php _e('Collapsed', $this->ltd); ?> </option> </select> <?php } else { ?> <?php _e('Show'); ?> <?php } ?>
<tr valign="top"> <th scope="row"><label for="script_position"><?php echo $this->t('Script position'); ?> </label></th> <td> <select name="script_position" id="script_position"> <option value="footer" <?php Selected($this->Get('script_position'), 'footer'); ?> ><?php echo $this->t('Footer of the website'); ?> </option> <option value="header" <?php Selected($this->Get('script_position'), 'header'); ?> ><?php echo $this->t('Header of the website'); ?> </option> </select> <p class="help"><?php echo $this->t('Please choose the position of the javascript. Footer is recommended. Use "Header" if you have trouble to make the lightbox work.'); ?> </p> </td> </tr> </table>
<tr valign="top"> <th scope="row"><label for="script_position"><?php echo $this->t('Script position'); ?> </label></th> <td> <select name="script_position" id="script_position"> <option value="footer" <?php Selected($this->get_option('script_position'), 'footer'); ?> ><?php echo $this->t('Footer of the website'); ?> </option> <option value="header" <?php Selected($this->get_option('script_position'), 'header'); ?> ><?php echo $this->t('Header of the website'); ?> </option> </select><br> <small><?php echo $this->t('Please choose the position of the javascript. Footer is recommended. Use "Header" if you have trouble to make the Fancybox work.'); ?> </small> </td> </tr> </table>
</option> <option value="none" <?php Selected($this->Get('asynchronous_loading'), 'none'); ?> ><?php echo I18n::t('Do not load anything asynchronously'); ?> </option> <option value="css" <?php Selected($this->Get('asynchronous_loading'), 'css'); ?> ><?php echo I18n::t('Load CSS asynchronously only'); ?> </option> <option value="js" <?php Selected($this->Get('asynchronous_loading'), 'js'); ?> ><?php echo I18n::t('Load JavaScripts asynchronously only'); ?> </option> </select> <p class="help"><?php echo I18n::t('If you are using a HTML/CSS/JS minifier you should disable the asynchronous loading.'); ?> </p> </td> </tr> </table><?php