Ejemplo n.º 1
0
/**
 * Generates option to edit a logo.
 *
 * This has been moved to a separate function
 * because it's a custom addition to the optionframework
 * module and it's pretty lengthy.
 *
 * @since 2.0.0
 *
 * @param $id string unique ID for option
 * @param $name string prefix for form name value
 * @param $val array currently saved data if exists
 * @return $output string HTML for option
 */
function themeblvd_logo_option($id, $name, $val)
{
    /*------------------------------------------------------*/
    /* Type of logo
    	/*------------------------------------------------------*/
    $types = array('title' => __('Site Title', 'themeblvd'), 'title_tagline' => __('Site Title + Tagline', 'themeblvd'), 'custom' => __('Custom Text', 'themeblvd'), 'image' => __('Image', 'themeblvd'));
    $current_value = '';
    if (!empty($val) && !empty($val['type'])) {
        $current_value = $val['type'];
    }
    $select_type = '<div class="tb-fancy-select">';
    $select_type .= '<select name="' . esc_attr($name . '[' . $id . '][type]') . '">';
    foreach ($types as $key => $type) {
        $select_type .= sprintf('<option value="%s" %s>%s</option>', $key, selected($current_value, $key, false), $type);
    }
    $select_type .= '</select>';
    $select_type .= '<span class="trigger"></span>';
    $select_type .= '<span class="textbox"></span>';
    $select_type .= '</div><!-- .tb-fancy-select (end) -->';
    /*------------------------------------------------------*/
    /* Site Title
    	/*------------------------------------------------------*/
    $site_title = '<p class="note">';
    $site_title .= __('Current Site Title', 'themeblvd') . ': <strong>';
    $site_title .= get_bloginfo('name') . '</strong><br><br>';
    $site_title .= __('You can change your site title and tagline by going <a href="options-general.php" target="_blank">here</a>.', 'themeblvd');
    $site_title .= '</p>';
    /*------------------------------------------------------*/
    /* Site Title + Tagline
    	/*------------------------------------------------------*/
    $site_title_tagline = '<p class="note">';
    $site_title_tagline .= __('Current Site Title', 'themeblvd') . ': <strong>';
    $site_title_tagline .= get_bloginfo('name') . '</strong><br>';
    $site_title_tagline .= __('Current Tagline', 'themeblvd') . ': <strong>';
    $site_title_tagline .= get_bloginfo('description') . '</strong><br><br>';
    $site_title_tagline .= __('You can change your site title by going <a href="options-general.php" target="_blank">here</a>.', 'themeblvd');
    $site_title_tagline .= '</p>';
    /*------------------------------------------------------*/
    /* Custom Text
    	/*------------------------------------------------------*/
    $current_value = '';
    if (!empty($val) && !empty($val['custom'])) {
        $current_value = $val['custom'];
    }
    $current_tagline = '';
    if (!empty($val) && !empty($val['custom_tagline'])) {
        $current_tagline = $val['custom_tagline'];
    }
    $custom_text = sprintf('<p><label class="inner-label"><strong>%s</strong></label>', __('Title', 'themeblvd'));
    $custom_text .= sprintf('<input type="text" name="%s" value="%s" /></p>', esc_attr($name . '[' . $id . '][custom]'), esc_attr($current_value));
    $custom_text .= sprintf('<p><label class="inner-label"><strong>%s</strong> (%s)</label>', __('Tagline', 'themeblvd'), __('optional', 'themeblvd'));
    $custom_text .= sprintf('<input type="text" name="%s" value="%s" /></p>', esc_attr($name . '[' . $id . '][custom_tagline]'), esc_attr($current_tagline));
    $custom_text .= sprintf('<p class="note">%s</p>', __('Insert your custom text.', 'themeblvd'));
    /*------------------------------------------------------*/
    /* Image
    	/*------------------------------------------------------*/
    if (function_exists('wp_enqueue_media')) {
        // WP 3.5+
        $current_value = array('url' => '', 'width' => '');
        if (is_array($val) && isset($val['image'])) {
            $current_value = array('url' => $val['image'], 'width' => $val['image_width']);
        }
        $current_retina = array('url' => '');
        if (is_array($val) && isset($val['image_2x'])) {
            $current_retina = array('url' => $val['image_2x']);
        }
        // Standard Image
        $image_upload = '<div class="section-upload image-standard">';
        $image_upload .= '<label class="inner-label"><strong>' . __('Standard Image', 'themeblvd') . '</strong></label>';
        $image_upload .= themeblvd_media_uploader(array('option_name' => $name, 'type' => 'logo', 'id' => $id, 'value' => $current_value['url'], 'value_width' => $current_value['width'], 'name' => 'image'));
        $image_upload .= '</div>';
        // Retina image (2x)
        $image_upload .= '<div class="section-upload image-2x">';
        $image_upload .= '<label class="inner-label"><strong>' . __('HiDPI-optimized Image (optional)', 'themeblvd') . '</strong></label>';
        $image_upload .= themeblvd_media_uploader(array('option_name' => $name, 'type' => 'logo_2x', 'id' => $id, 'value' => $current_retina['url'], 'name' => 'image_2x'));
        $image_upload .= '</div>';
    } else {
        // Media uploader prior to WP 3.5 -- @deprecated
        $current_value = array('url' => '', 'width' => '', 'id' => '');
        if (is_array($val) && isset($val['image'])) {
            $current_value = array('url' => $val['image'], 'width' => $val['image_width'], 'id' => '');
        }
        $current_retina = array('url' => '', 'id' => '');
        if (is_array($val) && isset($val['image_2x'])) {
            $current_retina = array('url' => $val['image_2x'], 'id' => '');
        }
        // Standard Image
        $image_upload = '<div class="section-upload image-standard">';
        $image_upload .= '<label class="inner-label"><strong>' . __('Standard Image', 'themeblvd') . '</strong></label>';
        $image_upload .= optionsframework_medialibrary_uploader($name, 'logo', $id, $current_value, null, null, 0, 'image');
        $image_upload .= '</div>';
        // Retina image (2x)
        $image_upload .= '<div class="section-upload image-2x">';
        $image_upload .= '<label class="inner-label"><strong>' . __('HiDPI-optimized Image (optional)', 'themeblvd') . '</strong></label>';
        $image_upload .= optionsframework_medialibrary_uploader($name, 'logo_2x', $id, $current_retina, null, null, 0, 'image_2x');
        $image_upload .= '</div>';
    }
    /*------------------------------------------------------*/
    /* Primary Output
    	/*------------------------------------------------------*/
    $output = sprintf('<div class="select-type">%s</div>', $select_type);
    $output .= sprintf('<div class="logo-item title">%s</div>', $site_title);
    $output .= sprintf('<div class="logo-item title_tagline">%s</div>', $site_title_tagline);
    $output .= sprintf('<div class="logo-item custom">%s</div>', $custom_text);
    $output .= sprintf('<div class="logo-item image">%s</div>', $image_upload);
    return $output;
}
    /**
     * Generates the an indivdual panel to edit a slide.
     * This has been broken into a separate public function because
     * not only does it show each slide when loading the
     * Edit Slider screen, but it's used to insert a new
     * slide when called with AJAX.
     *
     * @since 1.0.0
     *
     * @param string $slider_type type of slider
     * @param string $slide_id ID for individual slide
     * @param array $slide_options any current options for current slide
     */
    public function edit_slide($slider_id, $slider_type, $slide_id, $slide_options = null, $visibility = null)
    {
        global $_wp_additional_image_sizes;
        $api = Theme_Blvd_Sliders_API::get_instance();
        $slider_types = $api->get_sliders();
        $current_slide_type = $this->slide_value($slide_options, 'slide_type');
        $current_image = $this->slide_value($slide_options, 'image');
        $current_video = $this->slide_value($slide_options, 'video');
        ?>
		<div id="<?php 
        echo $slide_id;
        ?>
" class="widget slide-options"<?php 
        if ($visibility == 'hide') {
            echo ' style="display:none"';
        }
        ?>
>
			<div class="widget-name">
				<a href="#" class="widget-name-arrow">Toggle</a>
				<h3 class="image"><?php 
        echo $slider_types[$slider_type]['types'][$current_slide_type]['name'];
        ?>
</h3>
				<span class="slide-summary"></span>
			</div><!-- .element-name (end) -->
			<div class="widget-content">
				<div class="slide-set-type">
					<strong><?php 
        _e('Image Slide', 'themeblvd_sliders');
        ?>
</strong>
					<select name="slides[<?php 
        echo $slide_id;
        ?>
][slide_type]">
						<?php 
        foreach ($slider_types[$slider_type]['types'] as $key => $value) {
            echo '<option ' . selected($key, $current_slide_type, false) . ' value="' . $key . '">' . $value['name'] . '</option>';
        }
        ?>
					</select>
				</div><!-- .slide-set-type (end) -->
				<div class="pad">
					<div class="slide-media controls grid-wrap">
						<div class="slide-set-media">
							<?php 
        foreach ($slider_types[$slider_type]['types'] as $type => $config) {
            switch ($type) {
                case 'image':
                    ?>
										<div class="slide-set-image">
											<h3><?php 
                    echo $config['main_title'];
                    ?>
</h3>
											<div class="field section-upload">
												<?php 
                    if (function_exists('wp_enqueue_media') && function_exists('themeblvd_media_uploader')) {
                        $title = isset($current_image['title']) ? $current_image['title'] : '';
                        // If updating from v1.0, this check prevents PHP warning.
                        echo themeblvd_media_uploader(array('option_name' => 'slides[' . $slide_id . ']', 'type' => 'slider', 'id' => $slide_id . 'image', 'value' => $current_image['url'], 'value_title' => $title, 'value_id' => $current_image['id']));
                    } else {
                        // @deprecated
                        echo optionsframework_medialibrary_uploader('slides[' . $slide_id . ']', 'slider', $slide_id . 'image', $current_image, null, null, $slider_id, null, __('Get Image', 'themeblvd_sliders'));
                    }
                    ?>
											</div><!-- .field (end) -->
										</div><!-- .slide-set-image (end) -->
										<?php 
                    break;
                case 'video':
                    ?>
										<div class="slide-set-video">
											<h3><?php 
                    echo $config['main_title'];
                    ?>
</h3>
											<div class="field video-link">
												<?php 
                    echo '<input type="text" name="slides[' . $slide_id . '][video]" placeholder="' . __('Video Link', 'themeblvd') . '" value="' . $current_video . '" />';
                    /*
                    // @todo -- Incorporate "Get Video" button. Let's not bring this feature
                    // to center-satge until we have a better handle on mp4's in WP 3.6.
                    $current_video = $this->slide_value( $slide_options, 'video' );
                    if ( function_exists('wp_video_shortcode') && function_exists('themeblvd_media_uploader') ) {
                    	echo '<div class="section-upload">';
                    	echo themeblvd_media_uploader( array( 'option_name' => 'slides', 'type' => 'video', 'name' => 'video', 'id' => $slide_id, 'value' => $current_video ) );
                    	echo '</div>';
                    	//echo '<input type="text" name="slides['.$slide_id.'][video]" value="'.$current_video.'" />';
                    } else {
                    	// @deprecated with release of WP 3.6
                    	echo '<input type="text" name="slides['.$slide_id.'][video]" placeholder="'.__('Video Link', 'themeblvd').'" value="'.$current_video.'" />';
                    }
                    */
                    ?>
												<p class="explain">
													<?php 
                    _e('Enter in a video URL compatible with <a href="http://codex.wordpress.org/Embeds" target="_blank">WordPress\'s oEmbed</a>.<br><br>Ex: http://youtube.com/watch?v=HPPj6viIBmU<br>Ex: http://vimeo.com/11178250', 'themeblvd_sliders');
                    ?>
													<?php 
                    /* @todo if ( function_exists('wp_video_shortcode') ) : ?>
                    				<br><?php _e('Ex: http://yoursite.com/uploads/video.mp4', 'themeblvd_sliders'); ?>
                    			<?php endif; */
                    ?>
												</p>
											</div><!-- .field (end) -->
										</div><!-- .slide-set-video (end) -->
										<?php 
                    break;
            }
        }
        ?>
						</div><!-- .slide-set-media (end) -->
						<div class="slide-include-elements">

							<div class="slide-section">
								<?php 
        if ($slider_types[$slider_type]['positions']) {
            ?>
									<h4 class="header_has_icon"><?php 
            _e('Media Display', 'themeblvd_sliders');
            ?>
</h4>
									<?php 
            $position = $this->slide_value($slide_options, 'position');
            ?>

									<select class="slide-position slide-position-image" name="slides[<?php 
            echo $slide_id;
            ?>
][position_image]">
										<?php 
            foreach ($slider_types[$slider_type]['positions'] as $key => $value) {
                // Set name for option
                $name = '';
                switch ($key) {
                    case 'full':
                        $name = __('Full Size', 'themeblvd_sliders');
                        break;
                    case 'align-left':
                        $name = __('Aligned Left', 'themeblvd_sliders');
                        break;
                    case 'align-right':
                        $name = __('Aligned Right', 'themeblvd_sliders');
                        break;
                }
                $exclude_dimensions = $key == 'full' && $slider_types[$slider_type]['custom_size'] ? true : false;
                echo '<option ' . selected($key, $position, false) . ' value="' . $key . '">' . $this->get_image_size_desc($value, $name, $exclude_dimensions) . '</option>';
            }
            ?>
									</select>

									<?php 
            if (isset($slider_types[$slider_type]['positions']['full']) && $slider_types[$slider_type]['custom_size']) {
                ?>
										<select class="slide-crop" name="slides[<?php 
                echo $slide_id;
                ?>
][image_size]">
											<?php 
                $full_size = $slider_types[$slider_type]['positions']['full'];
                $image_size = $this->slide_value($slide_options, 'image_size');
                // First option is the default framework "slider-large" image size
                echo '<option ' . selected('slider-large', $image_size, false) . ' value="' . $full_size . '">' . $this->get_image_size_desc($full_size, __('Default', 'themeblvd_sliders')) . '</option>';
                // Now get all WP-registered image sizes and make them available for selection.
                $wp_image_sizes = get_intermediate_image_sizes();
                if ($wp_image_sizes) {
                    foreach ($wp_image_sizes as $size) {
                        if ($size == $full_size) {
                            continue;
                        }
                        echo '<option ' . selected($size, $image_size, false) . ' value="' . $size . '">' . $this->get_image_size_desc($size) . '</option>';
                    }
                }
                // Add option for raw image, with no crop.
                echo '<option ' . selected('full', $image_size, false) . ' value="full">' . __('Do not crop image.', 'themeblvd_sliders') . '</option>';
                ?>
										</select>
									<?php 
            }
            ?>

									<select class="slide-position slide-position-video" name="slides[<?php 
            echo $slide_id;
            ?>
][position_video]">
										<?php 
            foreach ($slider_types[$slider_type]['positions'] as $key => $value) {
                // Set name for option
                $name = '';
                switch ($key) {
                    case 'full':
                        $name = __('Full Width', 'themeblvd_sliders');
                        break;
                    case 'align-left':
                        $name = __('Aligned Left', 'themeblvd_sliders');
                        break;
                    case 'align-right':
                        $name = __('Aligned Right', 'themeblvd_sliders');
                        break;
                }
                echo '<option ' . selected($key, $position, false) . ' value="' . $key . '">' . $name . '</option>';
            }
            ?>
									</select>

									<div class="slide-video-height mini-control clearfix">
										<input type="text" value="<?php 
            echo $this->slide_value($slide_options, 'video_height');
            ?>
" name="slides[<?php 
            echo $slide_id;
            ?>
][video_height]" class="numeric" />
										<label for="slides[<?php 
            echo $slide_id;
            ?>
][video_height]">
											<?php 
            _e('Maximum Video Height (use 0 for no limit)', 'themeblvd_sliders');
            ?>
										</label>
									</div>

									<p class="note image-note"><?php 
            _e('When you upload an image, it must be at a minimum the size selected above in order for WordPress to generate and register the crop size. Images will be scaled down proportionally from their respective crop sizes depending on where the slider is placed.', 'themeblvd_sliders');
            ?>
</p>

								<?php 
        }
        ?>
							</div><!-- .slide-section (end) -->

							<?php 
        if (!empty($slider_types) && !empty($slider_types[$slider_type]['elements'])) {
            ?>
								<div class="slide-section">
									<h4><?php 
            _e('Slide Elements', 'themeblvd_sliders');
            ?>
</h4>
									<table class="widefat slide-elements">
										<tbody>
										<?php 
            foreach ($slider_types[$slider_type]['elements'] as $element) {
                switch ($element) {
                    case 'image_link':
                        if ($key != 'video') {
                            // A video would never be wrapped in a link
                            ?>
														<tr class="element-image_link slide-element-header">
															<td class="slide-element-check"><input value="image_link" type="checkbox" name="slides[<?php 
                            echo $slide_id;
                            ?>
][elements][include][]"<?php 
                            echo $this->slide_value($slide_options, 'include', 'image_link');
                            ?>
 /></td>
															<td class="slide-element-name"><?php 
                            _e('Image Link', 'themeblvd_sliders');
                            ?>
</td>
															<td class="slide-element-help"><a href="#" class="help-icon tb-icon-help-circled tooltip-link" title="<?php 
                            _e('This will allow you to apply a link to the image of this slide. You can configure it to open a webpage or a lightbox popup of different media types. If you\'re linking to a Lightbox Image, use the image file URL. If you\'re linking to a Lightbox Video, you can put in the URL to the Vimeo or YouTube video page.', 'themeblvd_sliders');
                            ?>
"></a></td>
														</tr>
														<tr class="element-image_link slide-element-options">
															<td colspan="3">
																<div class="field">
																	<h5><?php 
                            _e('Where should the link open?', 'themeblvd_sliders');
                            ?>
</h5>
																	<?php 
                            $target = $this->slide_value($slide_options, 'image_link', 'target');
                            ?>
																	<select name="slides[<?php 
                            echo $slide_id;
                            ?>
][elements][image_link][target]">
																		<option value="_self" <?php 
                            selected($target, '_self');
                            ?>
><?php 
                            _e('Same Window', 'themeblvd_sliders');
                            ?>
</option>
																		<option value="_blank" <?php 
                            selected($target, '_blank');
                            ?>
><?php 
                            _e('New Window', 'themeblvd_sliders');
                            ?>
</option>
																		<option value="lightbox" <?php 
                            selected($target, 'lightbox');
                            ?>
><?php 
                            _e('Lightbox Image', 'themeblvd_sliders');
                            ?>
</option>
																		<option value="lightbox_video" <?php 
                            selected($target, 'lightbox_video');
                            ?>
><?php 
                            _e('Lightbox Video', 'themeblvd_sliders');
                            ?>
</option>
																	</select>
																</div><!-- .field (end) -->
																<div class="field">
																	<h5><?php 
                            _e('Where should the link go?', 'themeblvd_sliders');
                            ?>
</h5>
																	<input name="slides[<?php 
                            echo $slide_id;
                            ?>
][elements][image_link][url]" type="text" value="<?php 
                            echo $this->slide_value($slide_options, 'image_link', 'url');
                            ?>
" class="input" />
																	</div><!-- .class="more-info (end) -->
																</div><!-- .field (end) -->
															</td>
														</tr>
														<?php 
                        }
                        break;
                    case 'headline':
                        ?>
													<tr class="element-headline slide-element-header">
														<td class="slide-element-check"><input value="headline" type="checkbox" name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][include][]"<?php 
                        echo $this->slide_value($slide_options, 'include', 'headline');
                        ?>
 /></td>
														<td class="slide-element-name"><?php 
                        _e('Headline', 'themeblvd_sliders');
                        ?>
</td>
														<td class="slide-element-help"><a href="#" class="help-icon tb-icon-help-circled tooltip-link" title="<?php 
                        _e('This will allow you to insert a simple headline on your slide. The location and style of this headline will vary depending on the design of the current theme.', 'themeblvd_sliders');
                        ?>
"></a></td>
													</tr>
													<tr class="element-headline slide-element-options">
														<td colspan="3">
															<div class="field">
																<h5><?php 
                        _e('What should the headline say?', 'themeblvd_sliders');
                        ?>
</h5>
																<textarea name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][headline]"><?php 
                        echo $this->slide_value($slide_options, 'headline');
                        ?>
</textarea>
															</div><!-- .field (end) -->
														</td>
													</tr>
													<?php 
                        break;
                    case 'description':
                        ?>
													<tr class="element-description slide-element-header">
														<td class="slide-element-check"><input value="description" type="checkbox" name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][include][]"<?php 
                        echo $this->slide_value($slide_options, 'include', 'description');
                        ?>
 /></td>
														<td class="slide-element-name"><?php 
                        _e('Description', 'themeblvd_sliders');
                        ?>
</td>
														<td class="slide-element-help"><a href="#" class="help-icon tb-icon-help-circled tooltip-link" title="<?php 
                        _e('This will allow you to insert a simple description on your slide. The location and style of this description will vary depending on the design of the current theme.', 'themeblvd_sliders');
                        ?>
"></a></td>
													</tr>
													<tr class="element-description slide-element-options">
														<td colspan="3">
															<div class="field">
																<h5><?php 
                        _e('What should the description say?', 'themeblvd_sliders');
                        ?>
</h5>
																<textarea name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][description]"><?php 
                        echo $this->slide_value($slide_options, 'description');
                        ?>
</textarea>
															</div><!-- .field (end) -->
														</td>
													</tr>
													<?php 
                        break;
                    case 'button':
                        ?>
													<tr class="element-button slide-element-header">
														<td class="slide-element-check"><input value="button" type="checkbox" name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][include][]"<?php 
                        echo $this->slide_value($slide_options, 'include', 'button');
                        ?>
 /></td>
														<td class="slide-element-name"><?php 
                        _e('Button', 'themeblvd_sliders');
                        ?>
</td>
														<td class="slide-element-help"><a href="#" class="help-icon tb-icon-help-circled tooltip-link" title="<?php 
                        _e('This will allow you to include a button on your slide. You can configure it to open a webpage or a lightbox popup of different media types.', 'themeblvd_sliders');
                        ?>
"></a></td>
													</tr>
													<tr class="element-button slide-element-options">
														<td colspan="3">
															<div class="field">
																<h5><?php 
                        _e('What should the button say?', 'themeblvd_sliders');
                        ?>
</h5>
																<input name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][button][text]" type="text" value="<?php 
                        echo $this->slide_value($slide_options, 'button', 'text');
                        ?>
" class="input" />
															</div><!-- .field (end) -->
															<div class="field">
																<h5><?php 
                        _e('Where should the link open?', 'themeblvd_sliders');
                        ?>
</h5>
																<?php 
                        $target = $this->slide_value($slide_options, 'button', 'target');
                        ?>
																<select name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][button][target]">
																	<option value="_self" <?php 
                        selected($target, '_self');
                        ?>
><?php 
                        _e('Same Window', 'themeblvd_sliders');
                        ?>
</option>
																	<option value="_blank" <?php 
                        selected($target, '_blank');
                        ?>
><?php 
                        _e('New Window', 'themeblvd_sliders');
                        ?>
</option>
																	<option value="lightbox" <?php 
                        selected($target, 'lightbox');
                        ?>
><?php 
                        _e('Lightbox Image', 'themeblvd_sliders');
                        ?>
</option>
																	<option value="lightbox_video" <?php 
                        selected($target, 'lightbox_video');
                        ?>
><?php 
                        _e('Lightbox Video', 'themeblvd_sliders');
                        ?>
</option>
																</select>
															</div><!-- .field (end) -->
															<div class="field">
																<h5><?php 
                        _e('Where should the link go?', 'themeblvd_sliders');
                        ?>
</h5>
																<input name="slides[<?php 
                        echo $slide_id;
                        ?>
][elements][button][url]" type="text" value="<?php 
                        echo $this->slide_value($slide_options, 'button', 'url');
                        ?>
" class="input" />
															</div><!-- .field (end) -->
														</td>
													</tr>
													<?php 
                        break;
                }
            }
            ?>
										</tbody>
									</table>
									<p class="warning slide-elements-warning"><?php 
            _e('You cannot have any elements on top of full-size video. If you\'d like to include elements, align the video to the right or left.', 'themeblvd_sliders');
            ?>
</p>
								</div><!-- .slide-section (end) -->
							<?php 
        }
        ?>
						</div><!-- .slide-include-elements (end) -->
						<div class="clear"></div>
					</div><!-- .grid-wrap (end) -->
					<?php 
        if (array_key_exists('custom', $slider_types[$slider_type]['types'])) {
            ?>
					<div class="controls slide-custom">
						<h3><?php 
            echo $slider_types[$slider_type]['types']['custom']['main_title'];
            ?>
</h3>
						<?php 
            $custom = $this->slide_value($slide_options, 'custom');
            ?>
						<textarea name="slides[<?php 
            echo $slide_id;
            ?>
][custom]"><?php 
            echo $custom;
            ?>
</textarea>
					</div><!-- .slide-custom (end) -->
					<?php 
        }
        ?>
				</div><!-- .pad (end) -->
				<div class="submitbox widget-footer">
					<a href="#<?php 
        echo $slide_id;
        ?>
" class="submitdelete delete-me" title="<?php 
        _e('Are you sure you want to delete this slide?', 'themeblvd_sliders');
        ?>
"><?php 
        _e('Delete Slide', 'themeblvd_sliders');
        ?>
</a>
					<div class="clear"></div>
				</div><!-- .widget-footer (end) -->
			</div><!-- .element-content (end) -->
		</div><!-- .slide-options(end) -->
		<?php 
    }
/**
 * Generates the options fields that are used in forms for
 * internal options framework.
 *
 * Total props to Devin Price for originally creating this function
 * for his "Options Framework" -- This function has since been adapted
 * over time to be utilized throughout many parts of the Theme Blvd
 * theme framework.
 * Devin Price's website: http://wptheming.com
 *
 * @since 2.2.0
 *
 * @param string $option_name Prefix for all field name attributes
 * @param array $options All options to show in form
 * @param array $settings Any current settings for all form fields
 * @param boolean $close Whether to add closing </div>
 * @return array $form Final options form
 */
function themeblvd_option_fields($option_name, $options, $settings, $close = true)
{
    $counter = 0;
    $menu = '';
    $output = '';
    foreach ($options as $value) {
        $counter++;
        $val = '';
        $select_value = '';
        $checked = '';
        $class = '';
        // Sub Groups --
        // This allows for a wrapping div around groups of elements.
        // The primary reason for this is to help link certain options
        // together in order to apply custom javascript for certain
        // common groups.
        if ($value['type'] == 'subgroup_start') {
            if (isset($value['class'])) {
                $class = ' ' . $value['class'];
            }
            $output .= '<div class="subgroup' . $class . '">';
            continue;
        }
        if ($value['type'] == 'subgroup_end') {
            $output .= '</div><!-- .subgroup (end) -->';
            continue;
        }
        // Name Grouping --
        // This allows certain options to be grouped together in the
        // final saved options array by adding a common prefix to their
        // name form attributes.
        if (isset($value['group'])) {
            $option_name .= '[' . $value['group'] . ']';
        }
        // Sections --
        // This allows for a wrapping div around certain sections. This
        // is meant to create visual dividing styles between sections,
        // opposed to sub groups, which are used to section off the code
        // for hidden purposes.
        if ($value['type'] == 'section_start') {
            $name = !empty($value['name']) ? esc_html($value['name']) : '';
            if (isset($value['class'])) {
                $class = ' ' . $value['class'];
            }
            if (!$name) {
                $class .= ' no-name';
            }
            $output .= '<div class="postbox inner-section' . $class . '">';
            if ($name) {
                $output .= '<h3>' . $name . '</h3>';
            }
            if (!empty($value['desc'])) {
                $output .= '<div class="section-description">' . $value['desc'] . '</div>';
            }
            continue;
        }
        if ($value['type'] == 'section_end') {
            $output .= '</div><!-- .inner-section (end) -->';
            continue;
        }
        // Wrap all options
        if ($value['type'] != 'heading' && $value['type'] != 'info') {
            // Keep all ids lowercase with no spaces
            $value['id'] = preg_replace('/\\W/', '', strtolower($value['id']));
            // Determine CSS classes
            $id = 'section-' . $value['id'];
            $class = 'section ';
            if (isset($value['type'])) {
                $class .= ' section-' . $value['type'];
                if ($value['type'] == 'logo' || $value['type'] == 'background') {
                    $class .= ' section-upload';
                }
            }
            if (!empty($value['class'])) {
                $class .= ' ' . $value['class'];
            }
            // Start Output
            $output .= '<div id="' . esc_attr($id) . '" class="' . esc_attr($class) . '">' . "\n";
            if (!empty($value['name'])) {
                // Name not required
                $output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
            }
            $output .= '<div class="option">' . "\n" . '<div class="controls">' . "\n";
        }
        // Set default value to $val
        if (isset($value['std'])) {
            $val = $value['std'];
        }
        // If the option is already saved, override $val
        if ($value['type'] != 'heading' && $value['type'] != 'info') {
            if (isset($value['group'])) {
                // Set grouped value
                if (isset($settings[$value['group']][$value['id']])) {
                    $val = $settings[$value['group']][$value['id']];
                    // Striping slashes of non-array options
                    if (!is_array($val)) {
                        $val = stripslashes($val);
                    }
                }
            } else {
                // Set non-grouped value
                if (isset($settings[$value['id']])) {
                    $val = $settings[$value['id']];
                    // Striping slashes of non-array options
                    if (!is_array($val)) {
                        $val = stripslashes($val);
                    }
                }
            }
        }
        // Add each option to output based on type.
        switch ($value['type']) {
            /*---------------------------------------*/
            /* Basic Text Input
            			/*---------------------------------------*/
            case 'text':
                $place_holder = '';
                if (!empty($value['pholder'])) {
                    $place_holder = ' placeholder="' . $value['pholder'] . '"';
                }
                $output .= sprintf('<input id="%s" class="of-input" name="%s" type="text" value="%s"%s />', esc_attr($value['id']), esc_attr($option_name . '[' . $value['id'] . ']'), stripslashes(esc_attr($val)), $place_holder);
                break;
                /*---------------------------------------*/
                /* Text Area
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Text Area
            			/*---------------------------------------*/
            case 'textarea':
                $place_holder = '';
                if (!empty($value['pholder'])) {
                    $place_holder = ' placeholder="' . $value['pholder'] . '"';
                }
                $cols = '8';
                if (isset($value['options']) && isset($value['options']['cols'])) {
                    $cols = $value['options']['cols'];
                }
                $output .= sprintf('<textarea id="%s" class="of-input" name="%s" cols="%s" rows="8"%s>%s</textarea>', esc_textarea($value['id']), stripslashes(esc_attr($option_name . '[' . $value['id'] . ']')), esc_attr($cols), $place_holder, esc_textarea($val));
                break;
                /*---------------------------------------*/
                /* Select
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Select
            			/*---------------------------------------*/
            case 'select':
                $output .= '<div class="tb-fancy-select">';
                $output .= sprintf('<select class="of-input" name="%s" id="%s">', esc_attr($option_name . '[' . $value['id'] . ']'), esc_attr($value['id']));
                foreach ($value['options'] as $key => $option) {
                    $output .= sprintf('<option%s value="%s">%s</option>', selected($key, $val, false), esc_attr($key), esc_html($option));
                }
                $output .= '</select>';
                $output .= '<span class="trigger"></span>';
                $output .= '<span class="textbox"></span>';
                $output .= '</div><!-- .tb-fancy-select (end) -->';
                // If this is a builder sample select, show preview images
                if (isset($value['class']) && $value['class'] == 'builder_samples' && function_exists('themeblvd_builder_sample_previews')) {
                    $output .= themeblvd_builder_sample_previews();
                }
                break;
                /*---------------------------------------*/
                /* Radio
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Radio
            			/*---------------------------------------*/
            case 'radio':
                $name = sprintf('%s[%s]', $option_name, $value['id']);
                foreach ($value['options'] as $key => $option) {
                    $id = sprintf('%s-%s-%s', $option_name, $value['id'], $key);
                    $output .= '<div class="radio-input clearfix">';
                    $output .= sprintf('<input class="of-input of-radio" type="radio" name="%s" id="%s" value="%s" %s />', esc_attr($name), esc_attr($id), esc_attr($key), checked($val, $key, false));
                    $output .= sprintf('<label for="%s">%s</label>', esc_attr($id), esc_html($option));
                    $output .= '</div><!-- .radio-input (end) -->';
                }
                break;
                /*---------------------------------------*/
                /* Image Selectors
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Image Selectors
            			/*---------------------------------------*/
            case 'images':
                $name = sprintf('%s[%s]', $option_name, $value['id']);
                $width = '';
                if (isset($value['img_width'])) {
                    $width = $value['img_width'];
                }
                foreach ($value['options'] as $key => $option) {
                    $selected = '';
                    $checked = checked($val, $key, false);
                    $selected = $checked ? ' of-radio-img-selected' : '';
                    $output .= sprintf('<input type="radio" id="%s" class="of-radio-img-radio" value="%s" name="%s" %s />', esc_attr($value['id'] . '_' . $key), esc_attr($key), esc_attr($name), $checked);
                    $output .= sprintf('<div class="of-radio-img-label">%s</div>', esc_html($key));
                    $output .= sprintf('<img src="%s" alt="%s" class="of-radio-img-img%s" width="%s" onclick="document.getElementById(\'%s\').checked=true;" />', esc_url($option), $option, $selected, $width, esc_attr($value['id'] . '_' . $key));
                }
                break;
                /*---------------------------------------*/
                /* Checkbox
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Checkbox
            			/*---------------------------------------*/
            case 'checkbox':
                $name = sprintf('%s[%s]', $option_name, $value['id']);
                $output .= sprintf('<input id="%s" class="checkbox of-input" type="checkbox" name="%s" %s />', esc_attr($value['id']), esc_attr($name), checked($val, 1, false));
                break;
                /*---------------------------------------*/
                /* Multicheck
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Multicheck
            			/*---------------------------------------*/
            case 'multicheck':
                foreach ($value['options'] as $key => $option) {
                    $checked = isset($val[$key]) ? checked($val[$key], 1, false) : '';
                    $label = $option;
                    $option = preg_replace('/\\W/', '', strtolower($key));
                    $id = sprintf('%s-%s-%s', $option_name, $value['id'], $option);
                    $name = sprintf('%s[%s][%s]', $option_name, $value['id'], $key);
                    $output .= sprintf('<input id="%s" class="checkbox of-input" type="checkbox" name="%s" %s /><label for="%s">%s</label>', esc_attr($id), esc_attr($name), $checked, esc_attr($id), $label);
                }
                break;
                /*---------------------------------------*/
                /* Color picker
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Color picker
            			/*---------------------------------------*/
            case 'color':
                $output .= sprintf('<div id="%s" class="colorSelector"><div style="%s"></div></div>', esc_attr($value['id'] . '_picker'), esc_attr('background-color:' . $val));
                $output .= sprintf('<input class="of-color" name="%s" id="%s" type="text" value="%s" />', esc_attr($option_name . '[' . $value['id'] . ']'), esc_attr($value['id']), esc_attr($val));
                break;
                /*---------------------------------------*/
                /* Uploader
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Uploader
            			/*---------------------------------------*/
            case 'upload':
                if (function_exists('wp_enqueue_media')) {
                    // Media uploader WP 3.5+
                    $args = array('option_name' => $option_name, 'type' => 'standard', 'id' => $value['id'], 'value' => $val);
                    $output .= themeblvd_media_uploader($args);
                } else {
                    // Legacy media uploader
                    $val = array('url' => $val, 'id' => '');
                    $output .= optionsframework_medialibrary_uploader($option_name, 'standard', $value['id'], $val);
                    // @deprecated
                }
                break;
                /*---------------------------------------*/
                /* Typography
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Typography
            			/*---------------------------------------*/
            case 'typography':
                $typography_stored = $val;
                // Font Size
                if (in_array('size', $value['atts'])) {
                    $output .= '<div class="tb-fancy-select">';
                    $output .= '<select class="of-typography of-typography-size" name="' . esc_attr($option_name . '[' . $value['id'] . '][size]') . '" id="' . esc_attr($value['id'] . '_size') . '">';
                    $sizes = themeblvd_recognized_font_sizes();
                    foreach ($sizes as $i) {
                        $size = $i . 'px';
                        $output .= '<option value="' . esc_attr($size) . '" ' . selected($typography_stored['size'], $size, false) . '>' . esc_html($size) . '</option>';
                    }
                    $output .= '</select>';
                    $output .= '<span class="trigger"></span>';
                    $output .= '<span class="textbox"></span>';
                    $output .= '</div><!-- .tb-fancy-select (end) -->';
                }
                // Font Style
                if (in_array('style', $value['atts'])) {
                    $output .= '<div class="tb-fancy-select">';
                    $output .= '<select class="of-typography of-typography-style" name="' . esc_attr($option_name . '[' . $value['id'] . '][style]') . '" id="' . esc_attr($value['id'] . '_style') . '">';
                    $styles = themeblvd_recognized_font_styles();
                    foreach ($styles as $key => $style) {
                        $output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['style'], $key, false) . '>' . esc_html($style) . '</option>';
                    }
                    $output .= '</select>';
                    $output .= '<span class="trigger"></span>';
                    $output .= '<span class="textbox"></span>';
                    $output .= '</div><!-- .tb-fancy-select (end) -->';
                }
                // Font Face
                if (in_array('face', $value['atts'])) {
                    $output .= '<div class="tb-fancy-select">';
                    $output .= '<select class="of-typography of-typography-face" name="' . esc_attr($option_name . '[' . $value['id'] . '][face]') . '" id="' . esc_attr($value['id'] . '_face') . '">';
                    $faces = themeblvd_recognized_font_faces();
                    foreach ($faces as $key => $face) {
                        $output .= '<option value="' . esc_attr($key) . '" ' . selected($typography_stored['face'], $key, false) . '>' . esc_html($face) . '</option>';
                    }
                    $output .= '</select>';
                    $output .= '<span class="trigger"></span>';
                    $output .= '<span class="textbox"></span>';
                    $output .= '</div><!-- .tb-fancy-select (end) -->';
                }
                // Font Color
                if (in_array('color', $value['atts'])) {
                    $output .= '<div id="' . esc_attr($value['id']) . '_color_picker" class="colorSelector"><div style="' . esc_attr('background-color:' . $typography_stored['color']) . '"></div></div>';
                    $output .= '<input class="of-color of-typography of-typography-color" name="' . esc_attr($option_name . '[' . $value['id'] . '][color]') . '" id="' . esc_attr($value['id'] . '_color') . '" type="text" value="' . esc_attr($typography_stored['color']) . '" />';
                }
                $output .= '<div class="clear"></div>';
                // Google Font support
                if (in_array('face', $value['atts'])) {
                    $output .= '<div class="google-font hide">';
                    $output .= '<h5>' . __('Enter the name of a font from the <a href="http://www.google.com/webfonts" target="_blank">Google Font Directory</a>.', 'themeblvd') . '</h5>';
                    $output .= '<input type="text" name="' . esc_attr($option_name . '[' . $value['id'] . '][google]') . '" value="' . esc_attr($typography_stored['google']) . '" />';
                    $output .= '<p class="note">Example Font Name: "Hammersmith One"</p>';
                    $output .= '</div>';
                }
                break;
                /*---------------------------------------*/
                /* Background
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Background
            			/*---------------------------------------*/
            case 'background':
                $background = $val;
                // Background Color
                $current_color = '';
                if (!empty($background['color'])) {
                    $current_color = $background['color'];
                }
                $output .= sprintf('<div id="%s_color_picker" class="colorSelector"><div style="%s"></div></div>', esc_attr($value['id']), esc_attr('background-color:' . $current_color));
                $output .= sprintf('<input class="of-color of-background of-background-color" name="%s" id="%s" type="text" value="%s" />', esc_attr($option_name . '[' . $value['id'] . '][color]'), esc_attr($value['id'] . '_color'), esc_attr($current_color));
                // Background Image - New AJAX Uploader using Media Library
                if (!isset($background['image'])) {
                    $background['image'] = '';
                }
                // Currrent BG formatted correctly
                $current_bg_url = '';
                if (!empty($background['image'])) {
                    $current_bg_url = $background['image'];
                }
                $current_bg_image = array('url' => $current_bg_url, 'id' => '');
                // Start output
                // Uploader
                if (function_exists('wp_enqueue_media')) {
                    $output .= themeblvd_media_uploader(array('option_name' => $option_name, 'type' => 'background', 'id' => $value['id'], 'value' => $current_bg_url, 'name' => 'image'));
                } else {
                    $output .= optionsframework_medialibrary_uploader($option_name, 'standard', $value['id'], $current_bg_image, null, '', 0, 'image');
                    // @deprecated
                }
                $class = 'of-background-properties';
                if (empty($background['image'])) {
                    $class .= ' hide';
                }
                $output .= '<div class="' . esc_attr($class) . '">';
                // Background Repeat
                $current_repeat = !empty($background['repeat']) ? $background['repeat'] : '';
                $output .= '<select class="of-background of-background-repeat" name="' . esc_attr($option_name . '[' . $value['id'] . '][repeat]') . '" id="' . esc_attr($value['id'] . '_repeat') . '">';
                $repeats = themeblvd_recognized_background_repeat();
                foreach ($repeats as $key => $repeat) {
                    $output .= '<option value="' . esc_attr($key) . '" ' . selected($current_repeat, $key, false) . '>' . esc_html($repeat) . '</option>';
                }
                $output .= '</select>';
                $output .= '<span class="trigger"></span>';
                $output .= '<span class="textbox"></span>';
                // Background Position
                $current_position = !empty($background['position']) ? $background['position'] : '';
                $output .= '<select class="of-background of-background-position" name="' . esc_attr($option_name . '[' . $value['id'] . '][position]') . '" id="' . esc_attr($value['id'] . '_position') . '">';
                $positions = themeblvd_recognized_background_position();
                foreach ($positions as $key => $position) {
                    $output .= '<option value="' . esc_attr($key) . '" ' . selected($current_position, $key, false) . '>' . esc_html($position) . '</option>';
                }
                $output .= '</select>';
                $output .= '<span class="trigger"></span>';
                $output .= '<span class="textbox"></span>';
                // Background Attachment
                $current_attachment = !empty($background['attachment']) ? $background['attachment'] : '';
                $output .= '<select class="of-background of-background-attachment" name="' . esc_attr($option_name . '[' . $value['id'] . '][attachment]') . '" id="' . esc_attr($value['id'] . '_attachment') . '">';
                $attachments = themeblvd_recognized_background_attachment();
                foreach ($attachments as $key => $attachment) {
                    $output .= '<option value="' . esc_attr($key) . '" ' . selected($current_attachment, $key, false) . '>' . esc_html($attachment) . '</option>';
                }
                $output .= '</select>';
                $output .= '<span class="trigger"></span>';
                $output .= '<span class="textbox"></span>';
                $output .= '</div>';
                break;
                /*---------------------------------------*/
                /* Info
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Info
            			/*---------------------------------------*/
            case 'info':
                // Classes
                $class = 'section';
                if (isset($value['type'])) {
                    $class .= ' section-' . $value['type'];
                }
                if (isset($value['class'])) {
                    $class .= ' ' . $value['class'];
                }
                // Start output
                $output .= '<div class="' . esc_attr($class) . '">' . "\n";
                if (isset($value['name'])) {
                    $output .= '<h4 class="heading">' . esc_html($value['name']) . '</h4>' . "\n";
                }
                if (isset($value['desc'])) {
                    $output .= $value['desc'] . "\n";
                }
                $output .= '<div class="clear"></div></div>' . "\n";
                break;
                /*---------------------------------------*/
                /* Columns Setup
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Columns Setup
            			/*---------------------------------------*/
            case 'columns':
                $output .= themeblvd_columns_option($value['options'], $value['id'], $option_name, $val);
                break;
                /*---------------------------------------*/
                /* Tabs Setup
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Tabs Setup
            			/*---------------------------------------*/
            case 'tabs':
                $output .= themeblvd_tabs_option($value['id'], $option_name, $val);
                break;
                /*---------------------------------------*/
                /* Content --
                			/* Originally designed to work in conjunction
                			/* with setting up columns and tabs.
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Content --
            			/* Originally designed to work in conjunction
            			/* with setting up columns and tabs.
            			/*---------------------------------------*/
            case 'content':
                $output .= themeblvd_content_option($value['id'], $option_name, $val, $value['options']);
                break;
                /*---------------------------------------*/
                /* Conditionals --
                			/* Originally designed to allow users to
                			/* assign custom sidebars to certain pages.
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Conditionals --
            			/* Originally designed to allow users to
            			/* assign custom sidebars to certain pages.
            			/*---------------------------------------*/
            case 'conditionals':
                $output .= themeblvd_conditionals_option($value['id'], $option_name, $val);
                break;
                /*---------------------------------------*/
                /* Logo
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Logo
            			/*---------------------------------------*/
            case 'logo':
                $output .= themeblvd_logo_option($value['id'], $option_name, $val);
                break;
                /*---------------------------------------*/
                /* Social Media
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Social Media
            			/*---------------------------------------*/
            case 'social_media':
                $output .= themeblvd_social_media_option($value['id'], $option_name, $val);
                break;
                /*---------------------------------------*/
                /* Editor
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Editor
            			/*---------------------------------------*/
            case 'editor':
                // Settings
                $editor_settings = array('wpautop' => true, 'textarea_name' => esc_attr($option_name . '[' . $value['id'] . ']'), 'media_buttons' => true, 'tinymce' => array('plugins' => 'wordpress'), 'height' => 'small');
                // @todo -- Add TB shortcode generator button.
                // This will work however currently there is a quirk that won't allow for
                // more than one editor on a page. Shortcodes will get inserted in whichever
                // the last editor the cursor was in.
                /*
                if ( defined('TB_SHORTCODES_PLUGIN_VERSION') && get_option('themeblvd_shortcode_generator') != 'no' )
                	$editor_settings['tinymce']['plugins'] .= ',ThemeBlvdShortcodes';
                */
                if (!empty($value['settings'])) {
                    $editor_settings = wp_parse_args($value['settings'], $editor_settings);
                }
                // Setup description
                if (!empty($value['desc_location']) && $value['desc_location'] == 'before') {
                    $desc_location = 'before';
                } else {
                    $desc_location = 'after';
                }
                $explain_value = '';
                $has_description = '';
                if (!empty($value['desc'])) {
                    $explain_value = $value['desc'];
                    $has_description = ' has-desc';
                }
                // Output description and editor
                $output .= '<div class="tb-wp-editor desc-' . $desc_location . $has_description . ' height-' . $editor_settings['height'] . '">';
                if ($desc_location == 'before') {
                    $output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
                }
                ob_start();
                wp_editor($val, uniqid($value['id'] . '_' . rand()), $editor_settings);
                $output .= ob_get_clean();
                if ($desc_location == 'after') {
                    $output .= '<div class="explain">' . wp_kses($explain_value, $allowedtags) . '</div>' . "\n";
                }
                $output .= '</div><!-- .tb-wp-editor (end) -->';
                break;
                /*---------------------------------------*/
                /* Heading for Navigation
                			/*---------------------------------------*/
            /*---------------------------------------*/
            /* Heading for Navigation
            			/*---------------------------------------*/
            case 'heading':
                if ($counter >= 2) {
                    $output .= '</div>' . "\n";
                }
                $id = $value['name'];
                if (!empty($value['id'])) {
                    $id = $value['id'];
                }
                $jquery_click_hook = preg_replace('/[^a-zA-Z0-9._\\-]/', '', strtolower($id));
                $jquery_click_hook = esc_attr("of-option-" . $jquery_click_hook);
                $menu .= sprintf('<a id="%s-tab" class="nav-tab" title="%s" href="%s">%s</a>', $jquery_click_hook, esc_attr($value['name']), esc_attr('#' . $jquery_click_hook), esc_html($value['name']));
                $output .= sprintf('<div class="group" id="%s">', $jquery_click_hook);
                break;
        }
        // end switch ( $value['type'] )
        // Here's your chance to add in your own custom
        // option type while we're looping through each
        // option. If you come up with a unique $type,
        // you can intercept things here and append
        // to the $output.
        $output = apply_filters('themeblvd_option_type', $output, $value, $option_name, $val);
        // Finish off standard options and add description
        if ($value['type'] != 'heading' && $value['type'] != 'info') {
            if ($value['type'] != 'checkbox') {
                $output .= '<br/>';
            }
            $output .= '</div>';
            $explain_value = '';
            if (!empty($value['desc'])) {
                $explain_value = $value['desc'];
            }
            if ($value['type'] != 'editor') {
                // Editor displays description above it
                $output .= '<div class="explain">' . wp_kses($explain_value, themeblvd_allowed_tags()) . '</div>' . "\n";
            }
            $output .= '<div class="clear"></div></div></div>' . "\n";
        }
    }
    // Optional closing div
    if ($close) {
        $output .= '</div>';
    }
    // Construct final return
    $form = array($output, $menu);
    return $form;
}