function show_photo_gallery_setting_area() { global $fields_photo_gallery_setting_area, $post; // Use nonce for verification echo '<input type="hidden" name="show_custom_meta_box_extra_product_tab_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />'; // Begin the field table and loop echo '<table class="form-table">'; foreach ($fields_photo_gallery_setting_area as $field) { if (isset($field['dependency'])) { dependency($field['id'], $field['dependency']); } // get value of this field if it exists for this post $meta = get_post_meta($post->ID, $field['id'], true); // begin a table row with echo '<tr class="' . $field['id'] . '_field"> <th><label for="' . $field['id'] . '">' . $field['label'] . '</label></th> <td>'; switch ($field['type']) { case 'numeric': echo '<input type="number" name="' . $field['id'] . '" id="' . $field['id'] . '" value="' . $meta . '" size="30" class="width_170" pattern="[-+]?[0-9]*[.,]?[0-9]+" value="1" title="Only Digits!" class="input-text qty text" />'; echo ' <br /><span class="description">' . $field['desc'] . '</span>'; break; case 'select': echo '<select name="' . $field['id'] . '" id="' . $field['id'] . '" style="width: 170px;">'; foreach ($field['options'] as $option) { echo '<option ' . selected($meta, $option['value'], 0) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>'; } echo '</select><br /><span class="description">' . __($field['desc'], EXTRA_WOO_TABS_TEXTDOMAN) . '</span>'; break; case 'repeatable_photo': $image = PL_URL . '/images/image.png'; echo '<a class="custom-repeatable-add-image button" href="#"><i class="fa fa-plus-square" ></i></a> <ul id="' . $field['id'] . '-repeatable" class="custom_repeatable">'; $i = 0; if ($meta) { foreach ($meta as $row) { echo '<li>'; $image = ''; if ($row) { $image = wp_get_attachment_image_src($row, array(100, 100)); $image = $image[0]; } echo ' <div> <span class="sort hndle sort-line"><i class="fa fa-arrows" ></i></span> <a class="repeatable-remove-image button" href="#"><i class="fa fa-minus-square" ></i></a> <br /> <p class="form-field" style="margin-top:10px"> <input name="' . $field['id'] . '[' . $i . ']" id="' . $field['id'] . '" type="hidden" class="custom_upload_image_photo" value="' . (isset($row) ? $row : '') . '" /> <input name="btn_' . $field['id'] . '[' . $i . ']" class="custom_upload_image_button_photo_new button" type="button" value="' . __('Choose Image', EXTRA_WOO_TABS_TEXTDOMAN) . '" style="width: auto" /> <button type="button" class="remove_image_button_photo button">' . __('Remove Image', EXTRA_WOO_TABS_TEXTDOMAN) . '</button> <img src="' . (isset($image) ? $image : '') . '" class="custom_preview_image_photo uploader_image_preview" alt="" /> </p> </div> '; echo '<hr> </li>'; $i++; } //end foreach } else { echo '<li> <div> <span class="sort hndle sort-line"><i class="fa fa-arrows" ></i></span> <a class="repeatable-remove-image button" href="#"><i class="fa fa-minus-square" ></i></a> <br /> <p class="form-field" style="margin-top:10px"> <input name="' . $field['id'] . '[' . $i . ']" id="' . $field['id'] . '" type="hidden" class="custom_upload_image_photo" /> <input name="btn_' . $field['id'] . '[' . $i . ']" class="custom_upload_image_button_photo_new button" type="button" value="' . __('Choose Image', EXTRA_WOO_TABS_TEXTDOMAN) . '" style="width: auto" /> <button type="button" class="remove_image_button_photo button">' . __('Remove Image', EXTRA_WOO_TABS_TEXTDOMAN) . '</button> <img src="' . (isset($image) ? $image : '') . '" class="custom_preview_image_photo uploader_image_preview" alt="" /> </p> </div> '; echo '<hr> </li>'; $image = ''; } echo '</ul>'; break; } //end switch echo '</td></tr>'; } // end foreach echo '</table>'; // end table }
<?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_sticky_width', 'label' => __('Content Width', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Enter Sticky Content Width.', EXTRA_WOO_TABS_TEXTDOMAN), 'desc_tip' => 'true', 'value' => $custom_tab_options['public_fields'][$public_perfix . 'tab_sticky_width'], 'options' => array('pw-content-1' => '2:3', 'pw-content-2' => '1:2', 'pw-content-3' => '1:3', 'pw-content-4' => '1:4', 'pw-content-full' => __('Full', EXTRA_WOO_TABS_TEXTDOMAN)))); $dependency = array('parent_id' => $public_perfix . 'tab_sticky_enabled', 'value' => 'true'); dependency($public_perfix . 'tab_sticky_width', $dependency); ?> <?php // Number Field woocommerce_wp_text_input(array('id' => $public_perfix . 'tab_sticky_height', 'label' => __('Content Height (Pixel)', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Enter Sticky Content Height.', EXTRA_WOO_TABS_TEXTDOMAN), 'type' => 'number', 'value' => $custom_tab_options['public_fields'][$public_perfix . 'tab_sticky_height'], 'custom_attributes' => array('step' => 'any', 'min' => '0'))); $dependency = array('parent_id' => $public_perfix . 'tab_sticky_enabled', 'value' => 'true'); dependency($public_perfix . 'tab_sticky_height', $dependency); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_sticky_position', 'label' => __('Sticky Button Position', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Sticky Position', EXTRA_WOO_TABS_TEXTDOMAN), 'desc_tip' => 'true', 'value' => $custom_tab_options['public_fields'][$public_perfix . 'tab_sticky_position'], 'options' => array('pw-left-stick' => __('Left Side', EXTRA_WOO_TABS_TEXTDOMAN), 'pw-right-stick' => __('Right Side', EXTRA_WOO_TABS_TEXTDOMAN)))); $dependency = array('parent_id' => $public_perfix . 'tab_sticky_enabled', 'value' => 'true'); dependency($public_perfix . 'tab_sticky_position', $dependency); ?> <?php if ($product_tab_use_all == 'on') { woocommerce_wp_checkbox(array('id' => $public_perfix . 'tab_content_changed', 'label' => __('Content Changed', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('If You Change Below Content, Please Check This Features', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => $custom_tab_options['public_fields'][$public_perfix . 'tab_content_changed'], 'cbvalue' => 'yes')); } ?> </div> </div> </div> </div>
$dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => 'grid'); dependency($public_perfix . 'tab_image_effect', $dependency); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_icon_effect', 'label' => __('Grid Icon Effect', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Gallery Grid Icon Effect', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_icon_effect'], 'options' => array('wt-dropup' => __('Dropdown', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-dropdown' => __('DropUp', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-scale-eff' => __('Scale', EXTRA_WOO_TABS_TEXTDOMAN)))); $dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => 'grid'); dependency($public_perfix . 'tab_icon_effect', $dependency); ?> <?php // Number Field woocommerce_wp_text_input(array('id' => $public_perfix . 'tab_height', 'label' => __('Slider Height (Pixel)', EXTRA_WOO_TABS_TEXTDOMAN), 'placeholder' => '', 'description' => __('Enter Photo Slider Height.', EXTRA_WOO_TABS_TEXTDOMAN), 'type' => 'number', 'desc_tip' => 'true', 'value' => @$custom_tab_options[$public_perfix . 'tab_height'], 'custom_attributes' => array('step' => 'any', 'min' => '0'))); $dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => 'slider'); dependency($public_perfix . 'tab_height', $dependency); ?> <p class="form-field"> <div class="custom_tab_options" > <?php $i = 0; $image = PL_URL . '/images/image.png'; ?> <a class="repeatable-add-image button" href="#"><i class="fa fa-plus-square" ></i></a> <ul id="custom_repeatables" class="custom_repeatable"><?php $meta = $custom_tab_options[$public_perfix . 'tab_posts']; if ($meta) { foreach ($meta as $row) {
<div class="options_group custom_tab_options <?php echo $public_perfix . 'tab_content_field'; ?> " " style="width:90%;margin-right: 5px;float:right"> <label for="video_products_url"><?php _e('Embed Map :', EXTRA_WOO_TABS_TEXTDOMAN); ?> </label> <p class="form-field product_field_type" > <?php $content = @$custom_tab_options[$public_perfix . 'tab_content']; $editor_id = $public_perfix . 'tab_content'; wp_editor($content, $editor_id); ?> </p> </div> </p> <?php $dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => 'embed'); dependency($public_perfix . 'tab_content', $dependency); ?> <p></p> </div> </div> </div> </div>
// Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_type', 'label' => __('Display Type', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Display Type', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_type'], 'options' => array('grid' => __('Grid View', EXTRA_WOO_TABS_TEXTDOMAN), 'carousel' => __('Carousel', EXTRA_WOO_TABS_TEXTDOMAN), 'list' => __('List', EXTRA_WOO_TABS_TEXTDOMAN)))); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_column', 'label' => __('Grid Column', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Number of Column(s)', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_column'], 'options' => array('wt_col_2_of_2' => __('One Column', EXTRA_WOO_TABS_TEXTDOMAN), 'wt_col_1_of_2' => __('Two Columns', EXTRA_WOO_TABS_TEXTDOMAN), 'wt_col_1_of_3' => __('Three Columns', EXTRA_WOO_TABS_TEXTDOMAN), 'wt_col_1_of_4' => __('Four Columns', EXTRA_WOO_TABS_TEXTDOMAN)))); $dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => 'grid'); dependency($public_perfix . 'tab_column', $dependency); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_skin', 'label' => __('Skin', 'extra_product_tab'), 'description' => __('Choose Skin for Grid and Carousel Type', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_skin'], 'options' => array('wt-carskin-light1' => __('Light 1', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-carskin-light2' => __('Light 2', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-carskin-dark1' => __('Dark 1', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-carskin-dark2' => __('Dark 2', EXTRA_WOO_TABS_TEXTDOMAN)))); $dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => array('grid', 'carousel')); dependency($public_perfix . 'tab_skin', $dependency); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_image_effect', 'label' => __('Grid Image Effect', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Gallery Grid Image Effect', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_image_effect'], 'options' => array('zoomin-eff' => __('Zoom In', EXTRA_WOO_TABS_TEXTDOMAN), 'zoomout-eff' => __('Zoom Out', EXTRA_WOO_TABS_TEXTDOMAN), 'roundright-eff' => __('Rotate Right', EXTRA_WOO_TABS_TEXTDOMAN)))); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_icon_effect', 'label' => __('Grid Icon Effect', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Grid Icon Effect', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_icon_effect'], 'options' => array('wt-dropup' => __('Dropdown', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-dropdown' => __('DropUp', EXTRA_WOO_TABS_TEXTDOMAN), 'wt-scale-eff' => __('Scale', EXTRA_WOO_TABS_TEXTDOMAN)))); ?> </div> </div> </div>
<div class="wt-faqcnt "> <div class="wt-faqtitle expanded"><h4><?php _e('Advanced Setting', EXTRA_WOO_TABS_TEXTDOMAN); ?> </h4></div> <div class="wt-faqcontent wt-adminadvanced"> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_type', 'label' => __('Gallery Type', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Gallery Type', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_type'], 'options' => array('grid' => __('Grid View', EXTRA_WOO_TABS_TEXTDOMAN), 'slider' => __('Slider', EXTRA_WOO_TABS_TEXTDOMAN)))); ?> <?php // Select woocommerce_wp_select(array('id' => $public_perfix . 'tab_column', 'label' => __('Grid Column', EXTRA_WOO_TABS_TEXTDOMAN), 'description' => __('Choose Number of Column(s)', EXTRA_WOO_TABS_TEXTDOMAN), 'value' => @$custom_tab_options[$public_perfix . 'tab_column'], 'options' => array('wt_col_2_of_2' => __('One Column', EXTRA_WOO_TABS_TEXTDOMAN), 'wt_col_1_of_2' => __('Two Columns', EXTRA_WOO_TABS_TEXTDOMAN)))); $dependency = array('parent_id' => $public_perfix . 'tab_type', 'value' => 'grid'); dependency($public_perfix . 'tab_column', $dependency); ?> <?php // Number Field woocommerce_wp_text_input(array('id' => $public_perfix . 'tab_height', 'label' => __('Grid/Silder Height (Pixel)', EXTRA_WOO_TABS_TEXTDOMAN), 'placeholder' => '', 'description' => __('Enter Video Grid/Slider Height.', EXTRA_WOO_TABS_TEXTDOMAN), 'type' => 'number', 'desc_tip' => 'true', 'value' => @$custom_tab_options[$public_perfix . 'tab_height'], 'custom_attributes' => array('step' => 'any', 'min' => '0'))); ?> <p class="form-field"> <div class="custom_tab_options" > <?php $i = 0; $image = PL_URL . '/images/image.png'; ?>