function widget($args, $instance) { extract($args); //Our variables from the widget settings. $title = apply_filters('widget_title', $instance['title']); $grve_social_items = array(array('title' => 'Twitter', 'url' => grve_array_value($instance, 'twitter_url'), 'class' => 'twitter'), array('title' => 'Facebook', 'url' => grve_array_value($instance, 'facebook_url'), 'class' => 'facebook'), array('title' => 'Google+', 'url' => grve_array_value($instance, 'googleplus_url'), 'class' => 'google-plus'), array('title' => 'RSS', 'url' => grve_array_value($instance, 'rss_url'), 'class' => 'rss'), array('title' => 'LinkedIn', 'url' => grve_array_value($instance, 'linkedin_url'), 'class' => 'linkedin'), array('title' => 'YouTube', 'url' => grve_array_value($instance, 'youtube_url'), 'class' => 'youtube'), array('title' => 'Flickr', 'url' => grve_array_value($instance, 'flickr_url'), 'class' => 'flickr'), array('title' => 'Pinterest', 'url' => grve_array_value($instance, 'pinterest_url'), 'class' => 'pinterest'), array('title' => 'Dribbble', 'url' => grve_array_value($instance, 'dribbble_url'), 'class' => 'dribbble'), array('title' => 'Tumblr', 'url' => grve_array_value($instance, 'tumblr_url'), 'class' => 'tumblr'), array('title' => 'GitHub', 'url' => grve_array_value($instance, 'github_url'), 'class' => 'github'), array('title' => 'instagram', 'url' => grve_array_value($instance, 'instagram_url'), 'class' => 'instagram'), array('title' => 'reddit', 'url' => grve_array_value($instance, 'reddit_url'), 'class' => 'reddit'), array('title' => 'Skype', 'url' => grve_array_value($instance, 'skype_url'), 'class' => 'skype'), array('title' => 'Vimeo', 'url' => grve_array_value($instance, 'vimeo_url'), 'class' => 'vimeo'), array('title' => 'SoundCloud', 'url' => grve_array_value($instance, 'soundcloud_url'), 'class' => 'soundcloud'), array('title' => 'WeChat', 'url' => grve_array_value($instance, 'wechat_url'), 'class' => 'wechat'), array('title' => 'Weibo', 'url' => grve_array_value($instance, 'weibo_url'), 'class' => 'weibo'), array('title' => 'Renren', 'url' => grve_array_value($instance, 'renren_url'), 'class' => 'renren'), array('title' => 'QQ', 'url' => grve_array_value($instance, 'qq_url'), 'class' => 'qq'), array('title' => 'XING', 'url' => grve_array_value($instance, 'xing_url'), 'class' => 'xing'), array('title' => 'VK', 'url' => grve_array_value($instance, 'vk_url'), 'class' => 'vk'), array('title' => 'VSCO', 'url' => grve_array_value($instance, 'vsco_url'), 'class' => 'vsco')); echo $before_widget; // Display the widget title if ($title) { echo $before_title . $title . $after_title; } ?> <ul> <?php foreach ($grve_social_items as $social_item) { if (!empty($social_item['url'])) { if ('skype' == $social_item['class']) { ?> <li> <a href="<?php echo $social_item['url']; ?> " class="grve-icon-<?php echo $social_item['class']; ?> "></a> </li> <?php } else { ?> <li> <a href="<?php echo esc_url($social_item['url']); ?> " class="grve-icon-<?php echo $social_item['class']; ?> " target="_blank"></a> </li> <?php } } } ?> </ul> <?php echo $after_widget; }
function grve_portfolio_media_section_box($post) { wp_nonce_field('grve_nonce_save', 'grve_portfolio_media_save_nonce'); $portfolio_media = get_post_meta($post->ID, 'grve_portfolio_media_selection', true); $portfolio_image_mode = get_post_meta($post->ID, 'grve_portfolio_media_image_mode', true); $grve_portfolio_video_webm = get_post_meta($post->ID, 'grve_portfolio_video_webm', true); $grve_portfolio_video_mp4 = get_post_meta($post->ID, 'grve_portfolio_video_mp4', true); $grve_portfolio_video_ogv = get_post_meta($post->ID, 'grve_portfolio_video_ogv', true); $grve_portfolio_video_embed = get_post_meta($post->ID, 'grve_portfolio_video_embed', true); $media_slider_items = get_post_meta($post->ID, 'grve_portfolio_slider_items', true); $media_slider_settings = get_post_meta($post->ID, 'grve_portfolio_slider_settings', true); $media_slider_speed = grve_array_value($media_slider_settings, 'slideshow_speed', '3500'); $media_slider_dir_nav = grve_array_value($media_slider_settings, 'direction_nav', '2'); ?> <table class="form-table grve-metabox"> <tbody> <tr> <th> <label for="grve-portfolio-media-selection"> <strong><?php _e('Media Selection', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Choose your portfolio media.', GRVE_THEME_TRANSLATE); ?> <br/> <strong><?php _e('In overview only Featured Image is displayed.', GRVE_THEME_TRANSLATE); ?> </strong> </span> </label> </th> <td> <select id="grve-portfolio-media-selection" name="grve_portfolio_media_selection"> <option value="" <?php if ("" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('Featured Image', GRVE_THEME_TRANSLATE); ?> </option> <option value="gallery" <?php if ("gallery" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('Classic Gallery', GRVE_THEME_TRANSLATE); ?> </option> <option value="gallery-vertical" <?php if ("gallery-vertical" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('Vertical Gallery', GRVE_THEME_TRANSLATE); ?> </option> <option value="slider" <?php if ("slider" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('Slider', GRVE_THEME_TRANSLATE); ?> </option> <option value="video" <?php if ("video" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('YouTube/Vimeo Video', GRVE_THEME_TRANSLATE); ?> </option> <option value="video-html5" <?php if ("video-html5" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('HMTL5 Video', GRVE_THEME_TRANSLATE); ?> </option> <option value="none" <?php if ("none" == $portfolio_media) { ?> selected="selected" <?php } ?> ><?php _e('None', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr class="grve-portfolio-media-item grve-portfolio-video-html5"<?php if ("video-html5" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-portfolio-video-webm"> <strong><?php _e('WebM File URL', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Upload the .webm video file.', GRVE_THEME_TRANSLATE); ?> <br/> <strong><?php _e('This Format must be included for HTML5 Video.', GRVE_THEME_TRANSLATE); ?> </strong> </span> </label> </th> <td> <input type="text" id="grve-portfolio-video-webm" class="grve-upload-simple-media-field grve-meta-text" name="grve_portfolio_video_webm" value="<?php echo esc_attr($grve_portfolio_video_webm); ?> "/> <input type="button" data-media-type="video" class="grve-upload-simple-media-button button" value="<?php _e('Upload Media', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </td> </tr> <tr class="grve-portfolio-media-item grve-portfolio-video-html5"<?php if ("video-html5" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-portfolio-video-mp4"> <strong><?php _e('MP4 File URL', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Upload the .mp4 video file.', GRVE_THEME_TRANSLATE); ?> <br/> <strong><?php _e('This Format must be included for HTML5 Video.', GRVE_THEME_TRANSLATE); ?> </strong> </span> </label> </th> <td> <input type="text" id="grve-portfolio-video-mp4" class="grve-upload-simple-media-field grve-meta-text" name="grve_portfolio_video_mp4" value="<?php echo esc_attr($grve_portfolio_video_mp4); ?> "/> <input type="button" data-media-type="video" class="grve-upload-simple-media-button button" value="<?php _e('Upload Media', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </td> </tr> <tr class="grve-portfolio-media-item grve-portfolio-video-html5"<?php if ("video-html5" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-portfolio-video-ogv"> <strong><?php _e('OGV File URL', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Upload the .ogv video file (optional).', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <input type="text" id="grve-portfolio-video-ogv" class="grve-upload-simple-media-field grve-meta-text" name="grve_portfolio_video_ogv" value="<?php echo esc_attr($grve_portfolio_video_ogv); ?> "/> <input type="button" data-media-type="video" class="grve-upload-simple-media-button button" value="<?php _e('Upload Media', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </td> </tr> <tr class="grve-portfolio-media-item grve-portfolio-video-embed"<?php if ("video" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-portfolio-video-embed"> <strong><?php _e('Vimeo/YouTube URL', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Enter the full URL of your video from Vimeo or YouTube.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <input type="text" id="grve-portfolio-video-embed" class="grve-meta-text" name="grve_portfolio_video_embed" value="<?php echo esc_attr($grve_portfolio_video_embed); ?> "/> </td> </tr> <tr class="grve-portfolio-media-item grve-portfolio-media-image-mode"<?php if ("slider" != $portfolio_media || "gallery-vertical" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-portfolio-media-image-mode"> <strong><?php _e('Image Mode', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Select image mode.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select id="grve-portfolio-media-image-mode" name="grve_portfolio_media_image_mode"> <option value="" <?php selected('', $portfolio_image_mode); ?> ><?php _e('Auto Crop', GRVE_THEME_TRANSLATE); ?> </option> <option value="resize" <?php selected('resize', $portfolio_image_mode); ?> ><?php _e('Resize', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-portfolio-media-slider-speed" class="grve-portfolio-media-item" <?php if ("slider" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-speed"> <strong><?php _e('Slideshow Speed', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <input type="text" id="grve-page-slider-speed" name="grve_portfolio_slider_settings_speed" value="<?php echo esc_attr($media_slider_speed); ?> " /> ms </td> </tr> <tr id="grve-portfolio-media-slider-direction-nav" class="grve-portfolio-media-item" <?php if ("slider" != $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-direction-nav"> <strong><?php _e('Navigation Buttons', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <select name="grve_portfolio_slider_settings_direction_nav"> <option value="1" <?php selected("1", $media_slider_dir_nav); ?> > <?php _e('Style 1', GRVE_THEME_TRANSLATE); ?> </option> <option value="2" <?php selected("2", $media_slider_dir_nav); ?> > <?php _e('Style 2', GRVE_THEME_TRANSLATE); ?> </option> <option value="3" <?php selected("3", $media_slider_dir_nav); ?> > <?php _e('Style 3', GRVE_THEME_TRANSLATE); ?> </option> <option value="4" <?php selected("4", $media_slider_dir_nav); ?> > <?php _e('Style 4', GRVE_THEME_TRANSLATE); ?> </option> <option value="0" <?php selected("0", $media_slider_dir_nav); ?> > <?php _e('No Navigation', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-portfolio-media-slider" class="grve-portfolio-media-item" <?php if ("" == $portfolio_media || "none" == $portfolio_media) { ?> style="display:none;" <?php } ?> > <th> <label><?php _e('Media Items', GRVE_THEME_TRANSLATE); ?> </label> </th> <td> <input type="button" class="grve-upload-slider-button button-primary" value="<?php _e('Insert Images', GRVE_THEME_TRANSLATE); ?> "/> <span id="grve-upload-slider-button-spinner" class="grve-action-spinner"></span> </td> </tr> </tbody> </table> <div id="grve-slider-container" data-mode="minimal" class="grve-portfolio-media-item" <?php if ("" == $portfolio_media || "none" == $portfolio_media) { ?> style="display:none;" <?php } ?> > <?php if (!empty($media_slider_items)) { grve_print_admin_media_slider_items($media_slider_items); } ?> </div> <?php }
function grve_admin_get_feature_section($post_id) { //Feature Settings $feature_element = grve_admin_post_meta($post_id, 'grve_page_feature_element'); $feature_size = grve_admin_post_meta($post_id, 'grve_page_feature_size'); $feature_height = grve_admin_post_meta($post_id, 'grve_page_feature_height', '550'); $feature_header_position = grve_admin_post_meta($post_id, 'grve_page_feature_header_position', 'above'); $feature_header_integration = grve_admin_post_meta($post_id, 'grve_page_feature_header_integration', 'no'); $feature_effect = grve_admin_post_meta($post_id, 'grve_page_feature_effect'); $feature_go_to_section = grve_admin_post_meta($post_id, 'grve_page_feature_go_to_section'); $feature_header_style = grve_admin_post_meta($post_id, 'grve_page_feature_header_style', 'default'); //Image Item $image_item = get_post_meta($post_id, 'grve_page_image_item', true); //Title Item $title_item = get_post_meta($post_id, 'grve_page_title_item', true); //Slider Item $slider_items = get_post_meta($post_id, 'grve_page_slider_items', true); $slider_settings = get_post_meta($post_id, 'grve_page_slider_settings', true); $slider_speed = grve_array_value($slider_settings, 'slideshow_speed', '3500'); $slider_pause = grve_array_value($slider_settings, 'slider_pause', 'no'); $slider_dir_nav = grve_array_value($slider_settings, 'direction_nav', '1'); $slider_dir_nav_color = grve_array_value($slider_settings, 'direction_nav_color', 'light'); $slider_transition = grve_array_value($slider_settings, 'transition', 'slide'); //Revolution Slider Item $revslider_alias = get_post_meta($post_id, 'grve_page_feature_revslider', true); //Map Item $map_items = get_post_meta($post_id, 'grve_page_map_items', true); $map_settings = get_post_meta($post_id, 'grve_page_map_settings', true); $map_zoom = grve_array_value($map_settings, 'zoom', 14); $map_marker = grve_array_value($map_settings, 'marker'); //Video Item $video_item = get_post_meta($post_id, 'grve_page_video_item', true); $video_webm = grve_array_value($video_item, 'video_webm'); $video_mp4 = grve_array_value($video_item, 'video_mp4'); $video_ogv = grve_array_value($video_item, 'video_ogv'); $video_bg_image = grve_array_value($video_item, 'video_bg_image'); $video_loop = grve_array_value($video_item, 'video_loop', 'yes'); $video_muted = grve_array_value($video_item, 'video_muted', 'yes'); $grve_settings_mode = grve_get_admin_feature_setting_mode(); ?> <table class="form-table grve-metabox"> <tbody> <tr class="grve-border-bottom"> <th> <label for="grve-page-feature-element"> <strong><?php _e('Feature Element', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Select feature section element.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select id="grve-page-feature-element" name="grve_page_feature_element"> <option value="" <?php if ("" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('None', GRVE_THEME_TRANSLATE); ?> </option> <option value="title" <?php if ("title" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('Title', GRVE_THEME_TRANSLATE); ?> </option> <option value="image" <?php if ("image" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('Image', GRVE_THEME_TRANSLATE); ?> </option> <option value="video" <?php if ("video" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('Video', GRVE_THEME_TRANSLATE); ?> </option> <option value="slider" <?php if ("slider" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('Slider', GRVE_THEME_TRANSLATE); ?> </option> <option value="revslider" <?php if ("revslider" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('Revolution Slider', GRVE_THEME_TRANSLATE); ?> </option> <option value="map" <?php if ("map" == $feature_element) { ?> selected="selected" <?php } ?> ><?php _e('Map', GRVE_THEME_TRANSLATE); ?> </option> </select> <?php grve_print_revolution_selection($revslider_alias, 'grve-page-feature-revslider', 'grve_page_feature_revslider'); ?> </td> </tr> <tr id="grve-feature-section-slider-speed" class="grve-feature-section-item" <?php if ("slider" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-speed"> <strong><?php _e('Slideshow Speed', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <input type="text" id="grve-page-slider-speed" name="grve_page_slider_settings_speed" value="<?php echo esc_attr($slider_speed); ?> " /> ms </td> </tr> <tr id="grve-feature-section-slider-pause" class="grve-feature-section-item" <?php if ("slider" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-pause"> <strong><?php _e('Pause On Hover', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <input type="checkbox" id="grve-page-slider-pause" name="grve_page_slider_settings_pause" value="yes" <?php checked($slider_pause, 'yes'); ?> /> </td> </tr> <tr id="grve-feature-section-slider-direction-nav" class="grve-feature-section-item" <?php if ("slider" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-direction-nav"> <strong><?php _e('Navigation Buttons', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <select name="grve_page_slider_settings_direction_nav" id="grve-page-slider-direction-nav"> <option value="1" <?php if ("1" == $slider_dir_nav) { ?> selected="selected" <?php } ?> > <?php _e('Style 1', GRVE_THEME_TRANSLATE); ?> </option> <option value="2" <?php if ("2" == $slider_dir_nav) { ?> selected="selected" <?php } ?> > <?php _e('Style 2', GRVE_THEME_TRANSLATE); ?> </option> <option value="3" <?php if ("3" == $slider_dir_nav) { ?> selected="selected" <?php } ?> > <?php _e('Style 3', GRVE_THEME_TRANSLATE); ?> </option> <option value="4" <?php if ("4" == $slider_dir_nav) { ?> selected="selected" <?php } ?> > <?php _e('Style 4', GRVE_THEME_TRANSLATE); ?> </option> <option value="0" <?php if ("0" == $slider_dir_nav) { ?> selected="selected" <?php } ?> > <?php _e('No Navigation', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-feature-section-slider-direction-nav-color" class="grve-feature-section-item" <?php if ("slider" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-direction-nav-color"> <strong><?php _e('Navigation color', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <select name="grve_page_slider_settings_direction_nav_color" id="grve-page-slider-direction-nav-color"> <option value="light" <?php if ("light" == $slider_dir_nav_color) { ?> selected="selected" <?php } ?> > <?php _e('Light', GRVE_THEME_TRANSLATE); ?> </option> <option value="dark" <?php if ("dark" == $slider_dir_nav_color) { ?> selected="selected" <?php } ?> > <?php _e('Dark', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-feature-section-slider-transition" class="grve-feature-section-item" <?php if ("slider" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-slider-transition"> <strong><?php _e('Transition', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <select name="grve_page_slider_settings_transition"> <option value="slide" <?php if ("slide" == $slider_transition) { ?> selected="selected" <?php } ?> > <?php _e('Slide', GRVE_THEME_TRANSLATE); ?> </option> <option value="fade" <?php if ("fade" == $slider_transition) { ?> selected="selected" <?php } ?> > <?php _e('Fade', GRVE_THEME_TRANSLATE); ?> </option> <option value="backSlide" <?php if ("backSlide" == $slider_transition) { ?> selected="selected" <?php } ?> > <?php _e('Back Slide', GRVE_THEME_TRANSLATE); ?> </option> <option value="goDown" <?php if ("goDown" == $slider_transition) { ?> selected="selected" <?php } ?> > <?php _e('Go Down', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-feature-section-size" class="grve-feature-section-item" <?php if ("" == $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-feature-size"> <strong><?php _e('Feature Size', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('With Custom Size option you can select the feature height.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select id="grve-page-feature-size" name="grve_page_feature_size"> <option value="" <?php if ("" == $feature_size) { ?> selected="selected" <?php } ?> ><?php _e('Full Screen', GRVE_THEME_TRANSLATE); ?> </option> <option value="custom" <?php if ("custom" == $feature_size) { ?> selected="selected" <?php } ?> ><?php _e('Custom Size', GRVE_THEME_TRANSLATE); ?> </option> </select> <span id="grve-feature-section-height" class="grve-inner-field" <?php if ("" == $feature_size) { ?> style="display:none;" <?php } ?> > <label><?php _e('Height', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" id="grve-page-feature-height" name="grve_page_feature_height" value="<?php echo esc_attr($feature_height); ?> " class="small-text" /> px </span> <span id="grve-feature-section-height-rev" class="grve-inner-field" style="display:none;"> <label><?php _e('Height is configured from Revolution Slider Settings', GRVE_THEME_TRANSLATE); ?> </label> </span> </td> </tr> <tr id="grve-feature-section-header-position" class="grve-feature-section-item" <?php if ("" == $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-feature-header-position"> <strong><?php _e('Feature/Header Position', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('With this option header will be shown above or below feature section.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select name="grve_page_feature_header_position" id="grve-page-feature-header-position"> <option value="above" <?php if ("above" == $feature_header_position) { ?> selected="selected" <?php } ?> > <?php _e('Header above Feature', GRVE_THEME_TRANSLATE); ?> </option> <option value="below" <?php if ("below" == $feature_header_position) { ?> selected="selected" <?php } ?> > <?php _e('Header below Feature', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-feature-section-header-integration" class="grve-feature-section-item" <?php if ("" == $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-feature-header-integration"> <strong><?php _e('Header Integration', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('With this option feature section will be integrated into the header.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select name="grve_page_feature_header_integration" id="grve-page-feature-header-integration"> <option value="no" <?php if ("no" == $feature_header_integration) { ?> selected="selected" <?php } ?> > <?php _e('No', GRVE_THEME_TRANSLATE); ?> </option> <option value="yes" <?php if ("yes" == $feature_header_integration) { ?> selected="selected" <?php } ?> > <?php _e('Yes', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-feature-section-header-style" class="grve-feature-section-item" <?php if ("" == $feature_element || "slider" == $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-feature-header-integration"> <strong><?php _e('Header Style', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('With this option you can change the coloring of your header.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select name="grve_page_feature_header_style" id="grve-page-feature-header-style"> <?php grve_print_media_header_style_selection($feature_header_style); ?> </select> </td> </tr> <tr id="grve-feature-section-effect" class="grve-feature-section-item" <?php if ("" == $feature_element || "map" == $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-feature-effect"> <strong><?php _e('Enable Title Parallax Effect', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <input type="checkbox" id="grve-page-feature-effect" name="grve_page_feature_effect" value="parallax" <?php checked($feature_effect, 'parallax'); ?> /> </td> </tr> <tr id="grve-feature-section-go-to-section" class="grve-feature-section-item" <?php if ("" == $feature_element || "map" == $feature_element || "slider" == $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-page-feature-go-to-section"> <strong><?php _e('Enable Bottom Arrow', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <input type="checkbox" id="grve-page-feature-go-to-section" name="grve_page_feature_go_to_section" value="yes" <?php checked($feature_go_to_section, 'yes'); ?> /> </td> </tr> <tr id="grve-feature-section-image" class="grve-feature-section-item" <?php if ("image" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label><?php _e('Feature Image', GRVE_THEME_TRANSLATE); ?> </label> </th> <td> <?php if (empty($image_item)) { ?> <input type="button" class="grve-upload-image-button button-primary" value="<?php _e('Insert Image', GRVE_THEME_TRANSLATE); ?> "/> <?php } else { ?> <input type="button" disabled="disabled" class="grve-upload-image-button button-primary disabled" value="<?php _e('Insert Image', GRVE_THEME_TRANSLATE); ?> "/> <?php } ?> <span id="grve-upload-image-button-spinner" class="grve-action-spinner"></span> </td> </tr> <tr id="grve-feature-section-slider" class="grve-feature-section-item" <?php if ("slider" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label><?php _e('Feature Slider', GRVE_THEME_TRANSLATE); ?> </label> </th> <td> <input type="button" class="grve-upload-feature-slider-button button-primary" value="<?php _e('Insert Images to Slider', GRVE_THEME_TRANSLATE); ?> "/> <span id="grve-upload-feature-slider-button-spinner" class="grve-action-spinner"></span> </td> </tr> <tr id="grve-feature-section-video" class="grve-feature-section-item" <?php if ("video" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label><?php _e('Feature Video', GRVE_THEME_TRANSLATE); ?> </label> </th> <td> </td> </tr> <tr id="grve-feature-section-map" class="grve-feature-section-item" <?php if ("map" != $feature_element) { ?> style="display:none;" <?php } ?> > <th> <label><?php _e('Feature Map', GRVE_THEME_TRANSLATE); ?> </label> </th> <td> <input type="button" id="grve-upload-multi-map-point" class="grve-upload-multi-map-point button-primary" value="<?php _e('Insert Point to Map', GRVE_THEME_TRANSLATE); ?> "/> <span id="grve-upload-multi-map-button-spinner" class="grve-action-spinner"></span> </td> </tr> </tbody> </table> <div id="grve-feature-image-container" data-mode="image" class="grve-feature-section-item" <?php if ('image' != $feature_element) { ?> style="display:none;" <?php } ?> > <?php if (!empty($image_item)) { grve_print_admin_feature_image_item($image_item); } ?> </div> <div id="grve-feature-slider-container" data-mode="slider-full" class="grve-feature-section-item" <?php if ('slider' != $feature_element) { ?> style="display:none;" <?php } ?> > <?php if (!empty($slider_items)) { grve_print_admin_feature_slider_items($slider_items); } ?> </div> <div id="grve-feature-title-container" class="grve-feature-section-item" <?php if ('title' != $feature_element) { ?> style="display:none;" <?php } ?> > <div class="grve-title-item postbox"> <h3 class="grve-title"> <span><?php _e('Title', GRVE_THEME_TRANSLATE); ?> </span> </h3> <div class="inside"> <ul class="grve-title-setting"> <li> <div class="grve-setting"> <label><?php _e('Title', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" name="grve_title_item_title" value="<?php echo grve_array_value($title_item, 'title'); ?> "/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Caption', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" name="grve_title_item_caption" value="<?php echo grve_array_value($title_item, 'caption'); ?> "/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Title Color', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" name="grve_title_item_title_color" class="wp-color-picker-field" value="<?php echo grve_array_value($title_item, 'title_color', "#ffffff"); ?> " data-default-color="#ffffff"/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Caption Color', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" name="grve_title_item_caption_color" class="wp-color-picker-field" value="<?php echo grve_array_value($title_item, 'caption_color', "#ffffff"); ?> " data-default-color="#ffffff"/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Background Color', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" name="grve_title_item_bg_color" class="wp-color-picker-field" value="<?php echo grve_array_value($title_item, 'bg_color', "#303030"); ?> " data-default-color="#303030"/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Style', GRVE_THEME_TRANSLATE); ?> </label> <select name="grve_title_item_style"> <?php $title_style = grve_array_value($title_item, 'style', ''); grve_print_media_style_selection($title_style); ?> </select> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Alignment', GRVE_THEME_TRANSLATE); ?> </label> <select name="grve_title_item_text_align"> <?php $title_text_align = grve_array_value($title_item, 'text_align', 'left'); grve_print_media_align_selection($title_text_align); ?> </select> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Animation', GRVE_THEME_TRANSLATE); ?> </label> <select name="grve_title_item_text_animation"> <?php $title_text_animation = grve_array_value($title_item, 'text_animation', 'fade-in'); grve_print_media_text_animation_selection($title_text_animation); ?> </select> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Extra Class', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" name="grve_title_item_el_class" value="<?php echo grve_array_value($title_item, 'el_class'); ?> "/> </div> </li> </ul> </div> </div> </div> <div id="grve-feature-map-container" class="grve-feature-section-item" <?php if ('map' != $feature_element) { ?> style="display:none;" <?php } ?> > <div class="grve-map-item postbox"> <h3 class="grve-title"> <span><?php _e('Map', GRVE_THEME_TRANSLATE); ?> </span> </h3> <div class="inside"> <ul class="grve-map-setting"> <li> <div class="grve-setting"> <label><?php _e('Single Point Zoom', GRVE_THEME_TRANSLATE); ?> </label> <select id="grve-page-feature-map-zoom" name="grve_page_feature_map_zoom"> <?php for ($i = 1; $i < 20; $i++) { ?> <option value="<?php echo $i; ?> "<?php if ($i == $map_zoom) { ?> selected="selected" <?php } ?> ><?php echo $i; ?> </option> <?php } ?> </select> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Global Marker', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" class="grve-upload-simple-media-field" id="grve-page-feature-map-marker" name="grve_page_feature_map_marker" value="<?php echo esc_attr($map_marker); ?> "/> <label></label> <input type="button" data-media-type="image" class="grve-upload-simple-media-button button-primary" value="<?php _e('Insert Marker', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </div> </li> </ul> </div> </div> <?php grve_print_admin_feature_map_items($map_items); ?> </div> <div id="grve-feature-video-container" class="grve-feature-section-item" <?php if ('video' != $feature_element) { ?> style="display:none;" <?php } ?> > <div class="grve-video-item postbox"> <?php if ('modal' == $grve_settings_mode) { ?> <input class="grve-open-video-modal button-primary" type="button" value="<?php _e('Edit Settings', GRVE_THEME_TRANSLATE); ?> "> <span class="grve-button-spacer"> </span> <?php } ?> <span class="grve-modal-spinner"></span> <h3 class="grve-title"> <span><?php _e('Video', GRVE_THEME_TRANSLATE); ?> </span> </h3> <div class="inside"> <ul class="grve-video-setting"> <li> <div class="grve-setting"> <label><?php _e('WebM File URL', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" id="grve-page-feature-video-webm" class="grve-upload-simple-media-field grve-meta-text" name="grve_video_item_webm" value="<?php echo esc_attr($video_webm); ?> "/> <label></label> <input type="button" data-media-type="video" class="grve-upload-simple-media-button button" value="<?php _e('Upload Media', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('MP4 File URL', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" id="grve-page-feature-video-mp4" class="grve-upload-simple-media-field grve-meta-text" name="grve_video_item_mp4" value="<?php echo esc_attr($video_mp4); ?> "/> <label></label> <input type="button" data-media-type="video" class="grve-upload-simple-media-button button" value="<?php _e('Upload Media', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('OGV File URL', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" id="grve-page-feature-video-ogv" class="grve-upload-simple-media-field grve-meta-text" name="grve_video_item_ogv" value="<?php echo esc_attr($video_ogv); ?> "/> <label></label> <input type="button" data-media-type="video" class="grve-upload-simple-media-button button" value="<?php _e('Upload Media', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Fallback Image', GRVE_THEME_TRANSLATE); ?> </label> <input type="text" id="grve-page-feature-video-bg-image" class="grve-upload-simple-media-field" name="grve_video_item_bg_image" value="<?php echo esc_attr($video_bg_image); ?> "/> <label></label> <input type="button" data-media-type="image" class="grve-upload-simple-media-button button-primary" value="<?php _e('Upload Image', GRVE_THEME_TRANSLATE); ?> "/> <input type="button" class="grve-remove-simple-media-button button" value="<?php _e('Remove', GRVE_THEME_TRANSLATE); ?> "/> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Loop', GRVE_THEME_TRANSLATE); ?> </label> <select name="grve_video_item_loop"> <option value="yes" <?php selected('yes', $video_loop); ?> ><?php _e('Yes', GRVE_THEME_TRANSLATE); ?> </option> <option value="no" <?php selected('no', $video_loop); ?> ><?php _e('No', GRVE_THEME_TRANSLATE); ?> </option> </select> </div> </li> <li> <div class="grve-setting"> <label><?php _e('Muted', GRVE_THEME_TRANSLATE); ?> </label> <select name="grve_video_item_muted"> <option value="yes" <?php selected('yes', $video_muted); ?> ><?php _e('Yes', GRVE_THEME_TRANSLATE); ?> </option> <option value="no" <?php selected('no', $video_muted); ?> ><?php _e('No', GRVE_THEME_TRANSLATE); ?> </option> </select> </div> </li> </ul> <?php grve_print_admin_feature_video_item($video_item); ?> </div> </div> </div> <?php }
function grve_print_feature_map_point($map_item, $default_marker) { $map_lat = grve_array_value($map_item, 'lat', '51.516221'); $map_lng = grve_array_value($map_item, 'lng', '-0.136986'); $map_marker = grve_array_value($map_item, 'marker', $default_marker); $map_title = grve_array_value($map_item, 'title'); $map_infotext = grve_array_value($map_item, 'info_text', ''); $button_text = grve_array_value($map_item, 'button_text'); $button_url = grve_array_value($map_item, 'button_url'); $button_url = esc_url($button_url); $button_type = grve_array_value($map_item, 'button_type', ''); $button_size = grve_array_value($map_item, 'button_size', 'extrasmall'); $button_color = grve_array_value($map_item, 'button_color', 'primary-1'); $button_shape = grve_array_value($map_item, 'button_shape', 'square'); $button_target = grve_array_value($map_item, 'button_target', '_self'); $button_target = esc_attr($button_target); $button_class = grve_array_value($map_item, 'button_class'); ?> <div style="display:none" class="grve-map-point" data-point-lat="<?php echo esc_attr($map_lat); ?> " data-point-lng="<?php echo esc_attr($map_lng); ?> " data-point-marker="<?php echo esc_attr($map_marker); ?> " data-point-title="<?php echo esc_attr($map_title); ?> "> <?php if (!empty($map_title) || !empty($map_infotext) || !empty($button_text)) { ?> <div class="grve-map-infotext"> <?php if (!empty($map_title)) { ?> <h6 class="grve-infotext-title"><?php echo $map_title; ?> </h6> <?php } ?> <?php if (!empty($map_infotext)) { ?> <p class="grve-infotext-description"><?php echo $map_infotext; ?> </p> <?php } ?> <?php if (!empty($button_text)) { ?> <a class="grve-infotext-link <?php echo esc_attr($button_class); ?> " href="<?php echo $button_url; ?> " target="<?php echo $button_target; ?> "><?php echo $button_text; ?> </a> <?php } ?> </div> <?php } ?> </div> <?php }
/** * Generic function that prints a slider or gallery */ function grve_print_gallery_slider($gallery_mode, $slider_items, $image_size_slider = 'grve-image-large-rect-horizontal', $extra_class = "") { if (empty($slider_items)) { return; } $image_size_gallery_thumb = 'grve-image-small-square'; if ('gallery-vertical' == $gallery_mode) { $image_size_gallery_thumb = $image_size_slider; } $start_block = $end_block = $item_class = ''; if ('gallery' == $gallery_mode || '' == $gallery_mode || 'gallery-vertical' == $gallery_mode) { $gallery_index = 0; ?> <div class="grve-media"> <ul class="grve-post-gallery grve-post-gallery-popup <?php echo esc_attr($extra_class); ?> "> <?php foreach ($slider_items as $slider_item) { $media_id = $slider_item['id']; $full_src = wp_get_attachment_image_src($media_id, 'grve-image-fullscreen'); $image_full_url = esc_url($full_src[0]); $thumb_src = wp_get_attachment_image_src($media_id, $image_size_gallery_thumb); $image_thumb_url = esc_url($thumb_src[0]); $image_dimensions = 'width="' . $thumb_src[1] . '" height="' . $thumb_src[2] . '"'; $alt = get_post_meta($media_id, '_wp_attachment_image_alt', true); $alt = !empty($alt) ? esc_attr($alt) : ''; $caption = get_post_field('post_excerpt', $media_id); $figcaption = ''; if (!empty($caption)) { $figcaption = wptexturize($caption); } echo ' <li class="grve-image-hover"> <a title="' . $figcaption . '" href="' . $image_full_url . '"> <img src="' . $image_thumb_url . '" alt="' . $alt . '" ' . $image_dimensions . '> </a> </li> '; } ?> </ul> </div> <?php } else { $slider_settings = array(); if (is_singular('post') || is_singular('portfolio')) { if (is_singular('post')) { $slider_settings = grve_post_meta('grve_post_slider_settings'); } else { $slider_settings = grve_post_meta('grve_portfolio_slider_settings'); } } $slider_speed = grve_array_value($slider_settings, 'slideshow_speed', '2500'); $slider_dir_nav = grve_array_value($slider_settings, 'direction_nav', '2'); ?> <div class="grve-media"> <div class="grve-carousel-wrapper"> <div class="grve-carousel-navigation grve-dark" data-navigation-type="<?php echo esc_attr($slider_dir_nav); ?> "> <div class="grve-carousel-buttons"> <div class="grve-carousel-prev grve-icon-nav-left"></div> <div class="grve-carousel-next grve-icon-nav-right"></div> </div> </div> <div class="grve-slider grve-carousel-element " data-slider-speed="<?php echo esc_attr($slider_speed); ?> " data-slider-pause="yes" data-slider-autoheight="no"> <?php foreach ($slider_items as $slider_item) { $media_id = $slider_item['id']; $full_src = wp_get_attachment_image_src($media_id, $image_size_slider); $image_url = esc_url($full_src[0]); $image_dimensions = 'width="' . $full_src[1] . '" height="' . $full_src[2] . '"'; $alt = get_post_meta($media_id, '_wp_attachment_image_alt', true); $alt = !empty($alt) ? esc_attr($alt) : ''; echo '<div class="grve-slider-item"><img src="' . $image_url . '" alt="' . $alt . '" ' . $image_dimensions . '></div>'; } ?> </div> </div> </div> <?php } }
function grve_print_admin_single_custom_sidebar($sidebar_item, $mode = '') { $grve_button_class = "grve-custom-sidebar-item-delete-button"; $sidebar_item_id = uniqid('grve_sidebar_'); if ($mode = "new") { $grve_button_class = "grve-custom-sidebar-item-delete-button grve-item-new"; } ?> <div class="grve-custom-sidebar-item"> <input class="<?php echo esc_attr($grve_button_class); ?> button" type="button" value="<?php _e('Delete', GRVE_THEME_TRANSLATE); ?> "> <h3 class="grve-custom-sidebar-title"> <span><?php _e('Custom Sidebar', GRVE_THEME_TRANSLATE); ?> : <?php echo grve_array_value($sidebar_item, 'name'); ?> </span> </h3> <div class="grve-custom-sidebar-settings"> <input type="hidden" name="grve_custom_sidebar_item_id[]" value="<?php echo grve_array_value($sidebar_item, 'id', $sidebar_item_id); ?> "> <input type="hidden" class="grve-custom-sidebar-item-name" name="grve_custom_sidebar_item_name[]" value="<?php echo grve_array_value($sidebar_item, 'name'); ?> "/> </div> </div> <?php }
/** * Prints title/subtitle ( Post ) */ function grve_print_post_header_title($position = 'top') { if (grve_check_title_visibility()) { $post_title_height = grve_option('post_title_height', '350'); $post_title_color = grve_option('post_title_color', 'light'); $post_style = grve_option('post_style', 'default'); $bg_image = 'post_title_background'; if ('simple' == $post_style) { ?> <!-- Post Title --> <h1 class="grve-post-simple-title" itemprop="name headline"><span><?php the_title(); ?> </span></h1> <!-- End Post Title --> <?php } else { if ('content' != $position) { global $post; $grve_post_title_bg = get_post_meta($post->ID, 'grve_post_title_bg', true); $bg_mode = grve_array_value($grve_post_title_bg, 'mode'); if (!empty($bg_mode)) { $post_title_height = grve_array_value($grve_post_title_bg, 'height', '350'); } ?> <!-- Post Title --> <div id="grve-post-title" class="grve-align-center" style="height:<?php echo esc_attr($post_title_height); ?> px;"> <div id="grve-post-title-content" data-height="<?php echo esc_attr($post_title_height); ?> "> <?php do_action('grve_post_title_top'); ?> <div class="grve-container"> <h1 class="grve-title grve-<?php echo esc_attr($post_title_color); ?> " itemprop="name headline"><span><?php the_title(); ?> </span></h1> <?php if ('default' == $post_style) { grve_print_post_social($post_title_color); } ?> </div> <?php do_action('grve_post_title_bottom'); ?> </div> <?php grve_print_title_bg_image_container($bg_image, $grve_post_title_bg); ?> </div> <!-- End Post Title --> <?php } } } }
function grve_meta_box_post_format_gallery($post) { wp_nonce_field('grve_nonce_save', 'grve_post_format_gallery_save_nonce'); $gallery_mode = get_post_meta($post->ID, 'grve_post_type_gallery_mode', true); $gallery_image_mode = get_post_meta($post->ID, 'grve_post_type_gallery_image_mode', true); $slider_items = get_post_meta($post->ID, 'grve_post_slider_items', true); $media_slider_settings = get_post_meta($post->ID, 'grve_post_slider_settings', true); $media_slider_speed = grve_array_value($media_slider_settings, 'slideshow_speed', '3500'); $media_slider_dir_nav = grve_array_value($media_slider_settings, 'direction_nav', '2'); ?> <table class="form-table grve-metabox"> <tbody> <tr class="grve-border-bottom"> <th> <label for="grve-post-gallery-mode"> <strong><?php _e('Gallery Mode', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Select Gallery mode.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select id="grve-post-gallery-mode" name="grve_post_type_gallery_mode"> <option value="" <?php selected('', $gallery_mode); ?> ><?php _e('Gallery', GRVE_THEME_TRANSLATE); ?> </option> <option value="slider" <?php selected('slider', $gallery_mode); ?> ><?php _e('Slider', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-post-gallery-image-mode-section" class="grve-post-media-item" <?php if ("" == $gallery_mode) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-post-gallery-image-mode"> <strong><?php _e('Image Mode', GRVE_THEME_TRANSLATE); ?> </strong> <span> <?php _e('Select image mode.', GRVE_THEME_TRANSLATE); ?> </span> </label> </th> <td> <select id="grve-post-gallery-image-mode" name="grve_post_type_gallery_image_mode"> <option value="" <?php selected('', $gallery_image_mode); ?> ><?php _e('Auto Crop', GRVE_THEME_TRANSLATE); ?> </option> <option value="resize" <?php selected('resize', $gallery_image_mode); ?> ><?php _e('Resize', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr id="grve-post-media-slider-speed" class="grve-post-media-item" <?php if ("" == $gallery_mode) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-post-slider-speed"> <strong><?php _e('Slideshow Speed', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <input type="text" id="grve-post-slider-speed" name="grve_post_slider_settings_speed" value="<?php echo esc_attr($media_slider_speed); ?> " /> ms </td> </tr> <tr id="grve-post-media-slider-direction-nav" class="grve-post-media-item" <?php if ("" == $gallery_mode) { ?> style="display:none;" <?php } ?> > <th> <label for="grve-post-slider-direction-nav"> <strong><?php _e('Navigation Buttons', GRVE_THEME_TRANSLATE); ?> </strong> </label> </th> <td> <select id="grve-post-slider-direction-nav" name="grve_post_slider_settings_direction_nav"> <option value="1" <?php selected("1", $media_slider_dir_nav); ?> > <?php _e('Style 1', GRVE_THEME_TRANSLATE); ?> </option> <option value="2" <?php selected("2", $media_slider_dir_nav); ?> > <?php _e('Style 2', GRVE_THEME_TRANSLATE); ?> </option> <option value="3" <?php selected("3", $media_slider_dir_nav); ?> > <?php _e('Style 3', GRVE_THEME_TRANSLATE); ?> </option> <option value="4" <?php selected("4", $media_slider_dir_nav); ?> > <?php _e('Style 4', GRVE_THEME_TRANSLATE); ?> </option> <option value="0" <?php selected("0", $media_slider_dir_nav); ?> > <?php _e('No Navigation', GRVE_THEME_TRANSLATE); ?> </option> </select> </td> </tr> <tr> <th> <label><?php _e('Images', GRVE_THEME_TRANSLATE); ?> </label> </th> <td> <input type="button" class="grve-upload-slider-button button-primary" value="<?php _e('Insert Images to Gallery/Slider', GRVE_THEME_TRANSLATE); ?> "/> <span id="grve-upload-slider-button-spinner" class="grve-action-spinner"></span> </td> </tr> </tbody> </table> <div id="grve-slider-container" class="grve-slider-container-minimal" data-mode="minimal"> <?php if (!empty($slider_items)) { grve_print_admin_media_slider_items($slider_items); } ?> </div> <?php }