function sns_form_image_selection($id_base, $name_base, $defaults, $taxonomies = NULL) { ?> <?php if (!$taxonomies) { $taxonomies = easy_nivo_slider_post_types(); } $default_post_type = $defaults['post_type']; $default_taxonomy = $defaults['taxonomy']; $default_term = $defaults['term']; ?> <fieldset class="nivo-slider-fieldset"> <legend><?php _e('Image Selection'); ?> :</legend> <table> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> post_type"><?php _e('Post Type'); ?> :</label></th> <td><select id="<?php echo $id_base; ?> post_type" name="<?php echo $name_base; ?> [post_type]" class="nivo_listbox"> <?php foreach ($taxonomies['arr_post_types'] as $post_type => $label) { echo nivo_form_option($default_post_type, $label, $post_type); } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> taxonomy"><?php _e('Taxonomy'); ?> :</label></th> <td><select id="<?php echo $id_base; ?> taxonomy" name="<?php echo $name_base; ?> [taxonomy]" class="nivo_listbox"> <?php foreach ($taxonomies['arr_post_types'] as $post_type => $label) { if ($taxonomies['arr_post_types_taxonomies'][$post_type]) { foreach ($taxonomies['arr_post_types_taxonomies'][$post_type] as $taxonomy) { echo nivo_form_option($default_taxonomy, $taxonomies['arr_taxonomies'][$taxonomy], $taxonomy, 'taxonomy post_type_' . $post_type, $default_post_type == $post_type); } } } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> term"><?php _e('Term'); ?> :</label></th> <td><select id="<?php echo $id_base; ?> term" name="<?php echo $name_base; ?> [term]" class="nivo_listbox"> <?php foreach ($taxonomies['arr_taxonomies'] as $taxonomy => $taxonomy_label) { if ($taxonomies['arr_terms'][$taxonomy]) { echo nivo_form_option($default_term, 'Include all ' . $taxonomy_label, 'all', 'all_terms term taxonomy_' . $taxonomy); foreach ($taxonomies['arr_terms'][$taxonomy] as $term => $term_label) { echo nivo_form_option($default_term, $term_label, $term, 'term taxonomy_' . $taxonomy); } } } echo nivo_form_option($default_term, 'Include all terms', 'all', 'term taxonomy_' . $taxonomy); ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> number"><?php _e('Number of images'); ?> :</label></th> <td><input id="<?php echo $id_base; ?> number" name="<?php echo $name_base; ?> [number]" value="<?php echo $defaults['number']; ?> " type="text" class="nivo_numeric_field" size="4" /> </td> </tr> </table> </fieldset> <?php }
function sns_form_slider_settings($id_base, $name_base, $defaults) { ?> <fieldset class="nivo-slider-fieldset"> <legend><?php _e('Slider Settings'); ?> :</legend> <table> <?php if ($defaults['hide-size']) { ?> <input type="hidden" value="<?php echo $defaults['size']; ?> " id="<?php echo $id_base; ?> size" name="<?php echo $name_base; ?> [size]"> <?php } else { ?> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> size"><?php _e('Slider Size'); ?> :</label></th> <td><select id="<?php echo $id_base; ?> size" name="<?php echo $name_base; ?> [size]"> <?php $default = $defaults['size']; echo nivo_form_option($default, 'First Slider', 'first'); echo nivo_form_option($default, 'Second Slider', 'second'); echo nivo_form_option($default, 'Widget Slider', 'widget'); ?> </select> </td> </tr> <?php } ?> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> effect"><?php _e('Transition'); ?> :</label></th> <td><select id="<?php echo $id_base; ?> effect" name="<?php echo $name_base; ?> [effect]"> <?php $default = $defaults['effect']; echo nivo_form_option($default, 'random'); echo nivo_form_option($default, 'sliceDown'); echo nivo_form_option($default, 'sliceDownLeft'); echo nivo_form_option($default, 'sliceUp'); echo nivo_form_option($default, 'sliceUpLeft'); echo nivo_form_option($default, 'sliceUpDown'); echo nivo_form_option($default, 'sliceUpDownLeft'); echo nivo_form_option($default, 'fold'); echo nivo_form_option($default, 'fade'); echo nivo_form_option($default, 'slideInRight'); echo nivo_form_option($default, 'slideInLeft'); echo nivo_form_option($default, 'boxRandom'); echo nivo_form_option($default, 'boxRain'); echo nivo_form_option($default, 'boxRainReverse'); ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> speed"><?php _e('Speed'); ?> :</label></th> <td><input id="<?php echo $id_base; ?> speed" name="<?php echo $name_base; ?> [speed]" value="<?php echo $defaults['speed']; ?> " type="text" class="nivo_numeric_field" size="7" /> ms </td> </tr> <tr valign="top"> <th scope="row"><label for="<?php echo $id_base; ?> pause"><?php _e('Pause'); ?> :</label></th> <td><input id="<?php echo $id_base; ?> pause" name="<?php echo $name_base; ?> [pause]" value="<?php echo $defaults['pause']; ?> " type="text" class="nivo_numeric_field" size="7" /> ms </td> </tr> </table> </fieldset> <?php }