| @@ -1,1122 +1,1368 @@ | ||
| 1 | -<?php | |
| 1 | +<?php | |
| 2 | +require_once( VIRTUE_TOOLKIT_PATH . 'cmb/init.php' ); | |
| 3 | +add_action( 'init', 'initialize_kadence_toolkit_meta_boxes', 10 ); | |
| 4 | +function initialize_kadence_toolkit_meta_boxes() { | |
| 5 | + $the_theme = wp_get_theme(); | |
| 6 | + if ( 'Pinnacle' == $the_theme->get( 'Name' ) || 'pinnacle' == $the_theme->get( 'Template') ) { | |
| 7 | + add_filter( 'cmb2_admin_init', 'kadence_toolkit_pinnacle_metaboxes', 100 ); | |
| 8 | + } else if( ($the_theme->get( 'Name' ) == 'Virtue' && $the_theme->get( 'Version') >= '2.3.5') || ($the_theme->get( 'Template') == 'virtue') ) { | |
| 9 | + add_filter( 'cmb2_admin_init', 'kadence_toolkit_virtue_metaboxes', 100 ); | |
| 10 | + } else if( 'Ascend' == $the_theme->get( 'Name' ) || 'ascend' == $the_theme->get( 'Template') ) { | |
| 11 | + add_filter( 'cmb2_admin_init', 'kadence_toolkit_ascend_metabox'); | |
| 12 | + } | |
| 13 | + | |
| 14 | +} | |
| 15 | +// Build Metaboxs for portfolio type select | |
| 16 | +add_action( 'cmb2_render_kttk_select_type', 'kadence_toolkit_render_select_type', 10, 2 ); | |
| 17 | +function kadence_toolkit_render_select_type( $field, $meta ) { | |
| 18 | + wp_dropdown_categories(array( | |
| 19 | + 'show_option_none' => __( "All Types", 'ascend' ), | |
| 20 | + 'hierarchical' => 1, | |
| 21 | + 'taxonomy' => $field->args( 'taxonomy'), | |
| 22 | + 'orderby' => 'name', | |
| 23 | + 'hide_empty' => 0, | |
| 24 | + 'name' => $field->args( 'id' ), | |
| 25 | + 'selected' => $meta | |
| 26 | + | |
| 27 | + )); | |
| 28 | + $desc = $field->args( 'desc' ); | |
| 29 | + if ( !empty( $desc ) ) { | |
| 30 | + echo '<p class="cmb_metabox_description">' . $desc . '</p>'; | |
| 31 | + } | |
| 32 | +} | |
| 2 | 33 | // Build Metaboxs for gallery |
| 3 | -function kad_gallery_field( $field, $meta ) { | |
| 4 | - echo '<div class="kad-gallery kad_widget_image_gallery">'; | |
| 34 | +function kadence_toolkit_ascend_gallery_field( $field, $meta ) { | |
| 35 | + echo '<div class="kad-gallery kttk_meta_image_gallery">'; | |
| 5 | 36 | echo '<div class="gallery_images">'; |
| 6 | 37 | $attachments = array_filter( explode( ',', $meta ) ); |
| 7 | - if ( $attachments ) | |
| 8 | - foreach ( $attachments as $attachment_id ) { | |
| 9 | - $img = wp_get_attachment_image_src($attachment_id, 'thumbnail'); | |
| 10 | - $imgfull = wp_get_attachment_image_src($attachment_id, 'full'); | |
| 11 | - echo '<a class="of-uploaded-image" target="_blank" rel="external" href="' . esc_url($imgfull[0]) . '">'; | |
| 12 | - echo '<img class="gallery-widget-image" id="gallery_widget_image_'.esc_attr($attachment_id). '" src="' . esc_url($img[0]) . '" />'; | |
| 38 | + if ( $attachments ) : | |
| 39 | + foreach ( $attachments as $attachment_id ) { | |
| 40 | + $img = wp_get_attachment_image_src($attachment_id, 'thumbnail'); | |
| 41 | + $imgfull = wp_get_attachment_image_src($attachment_id, 'full'); | |
| 42 | + echo '<a class="of-uploaded-image edit-kttk-meta-gal" data-attachment-id="'.esc_attr($attachment_id).'" href="#">'; | |
| 43 | + echo '<img class="gallery-widget-image" id="gallery_widget_image_'.esc_attr($attachment_id). '" src="' . esc_url($img[0]) . '" width="'.esc_attr($img[1]).'" height="'.esc_attr($img[2]).'" />'; | |
| 13 | 44 | echo '</a>'; |
| 14 | 45 | } |
| 46 | + endif; | |
| 15 | 47 | echo '</div>'; |
| 16 | - echo ' <input type="hidden" id="' . esc_attr($field['id']) . '" name="' . esc_attr($field['id']) . '" class="gallery_values" value="' . esc_attr($meta) . '" />'; | |
| 17 | - echo '<a href="#" onclick="return false;" id="edit-gallery" class="gallery-attachments button button-primary">' . __('Add/Edit Gallery', 'kadencetoolkit') . '</a>'; | |
| 18 | - echo '<a href="#" onclick="return false;" id="clear-gallery" class="gallery-attachments button">' . __('Clear Gallery', 'kadencetoolkit') . '</a>'; | |
| 48 | + echo ' <input type="hidden" id="' . esc_attr($field->args( 'id' )) . '" name="' . esc_attr($field->args( 'id' )) . '" class="gallery_values" value="' . esc_attr($meta) . '" />'; | |
| 49 | + echo '<a href="#" onclick="return false;" id="edit-gallery" class="kttk-gallery-attachments button button-primary">' . __('Add/Edit Gallery', 'virtue-toolkit') . '</a>'; | |
| 50 | + echo '<a href="#" onclick="return false;" id="clear-gallery" class="kttk-gallery-attachments button">' . __('Clear Gallery', 'virtue-toolkit') . '</a>'; | |
| 19 | 51 | echo '</div>'; |
| 20 | - | |
| 21 | - if ( ! empty( $field['desc'] ) ) echo '<p class="cmb_metabox_description">' . $field['desc'] . '</p>'; | |
| 52 | + $desc = $field->args('desc'); | |
| 53 | + if ( !empty( $desc)) { | |
| 54 | + echo '<p class="cmb_metabox_description">' . $field->args( 'desc' ) . '</p>'; | |
| 55 | + } | |
| 22 | 56 | } |
| 23 | -add_filter( 'cmb_render_kad_gallery', 'kad_gallery_field', 10, 2 ); | |
| 57 | +add_filter( 'cmb2_render_kad_gallery', 'kadence_toolkit_ascend_gallery_field', 10, 2 ); | |
| 24 | 58 | |
| 25 | -function kad_gallery_field_sanitise( $field, $meta ) { | |
| 26 | - if ( empty( $meta ) ) { | |
| 27 | - $meta = ''; | |
| 28 | - } else { | |
| 29 | - $meta = $meta; | |
| 30 | - } | |
| 31 | - return $meta; | |
| 32 | -} | |
| 33 | -$the_theme = wp_get_theme(); | |
| 34 | -if( ($the_theme->get( 'Name' ) == 'Pinnacle' || $the_theme->get( 'Template') == 'pinnacle') && ( $the_theme->get( 'Version') >= '1.0.6' ) ) { | |
| 35 | -add_filter( 'cmb_meta_boxes', 'kadence_pinnacletoolkit_metaboxes', 100 ); | |
| 36 | -} | |
| 37 | 59 | |
| 38 | -function kadence_pinnacletoolkit_metaboxes( array $meta_boxes ) { | |
| 60 | +function kadence_toolkit_pinnacle_metaboxes() { | |
| 39 | 61 | |
| 40 | 62 | // Start with an underscore to hide fields from custom fields list |
| 41 | 63 | $prefix = '_kad_'; |
| 42 | -$meta_boxes[] = array( | |
| 43 | - 'id' => 'subtitle_metabox', | |
| 44 | - 'title' => __( "Page Title and Subtitle", 'kadencetoolkit' ), | |
| 45 | - 'pages' => array( 'page' ), // Post type | |
| 46 | - 'context' => 'normal', | |
| 47 | - 'priority' => 'default', | |
| 48 | - 'show_names' => true, // Show field names on the left | |
| 49 | - 'fields' => array( | |
| 50 | - array( | |
| 51 | - 'name' => __( "Subtitle", 'kadencetoolkit' ), | |
| 52 | - 'desc' => __( "Subtitle will go below page title", 'kadencetoolkit' ), | |
| 53 | - 'id' => $prefix . 'subtitle', | |
| 54 | - 'type' => 'textarea_code', | |
| 55 | - ), | |
| 56 | - array( | |
| 57 | - 'name' => __("Hide Page Title", 'kadencetoolkit' ), | |
| 58 | - 'desc' => '', | |
| 59 | - 'id' => $prefix . 'pagetitle_hide', | |
| 60 | - 'type' => 'select', | |
| 61 | - 'options' => array( | |
| 62 | - array( 'name' => __("Default", 'kadencetoolkit' ), 'value' => 'default', ), | |
| 63 | - array( 'name' => __("Show", 'kadencetoolkit' ), 'value' => 'show', ), | |
| 64 | - array( 'name' => __("Hide", 'kadencetoolkit' ), 'value' => 'hide', ), | |
| 65 | - ), | |
| 66 | - ), | |
| 67 | - array( | |
| 68 | - 'name' => __("Page Title background behind Header", 'kadencetoolkit' ), | |
| 69 | - 'desc' => '', | |
| 70 | - 'id' => $prefix . 'pagetitle_behind_head', | |
| 71 | - 'type' => 'select', | |
| 72 | - 'options' => array( | |
| 73 | - array( 'name' => __("Default", 'kadencetoolkit' ), 'value' => 'default', ), | |
| 74 | - array( 'name' => __("Place behind Header", 'kadencetoolkit' ), 'value' => 'true', ), | |
| 75 | - array( 'name' => __("Don't place behind Header", 'kadencetoolkit' ), 'value' => 'false', ), | |
| 76 | - ), | |
| 77 | - ), | |
| 78 | - ) | |
| 79 | - ); | |
| 80 | -$meta_boxes[] = array( | |
| 81 | - 'id' => 'subtitle_metabox', | |
| 82 | - 'title' => __( "Post Title and Subtitle", 'kadencetoolkit' ), | |
| 83 | - 'pages' => array( 'product', 'post', 'portfolio'), // Post type | |
| 84 | - 'context' => 'normal', | |
| 85 | - 'priority' => 'default', | |
| 86 | - 'show_names' => true, // Show field names on the left | |
| 87 | - 'fields' => array( | |
| 88 | - array( | |
| 89 | - 'name' => __( "Post Header Title", 'kadencetoolkit' ), | |
| 90 | - 'desc' => __( "Post Header Title", 'kadencetoolkit' ), | |
| 91 | - 'id' => $prefix . 'post_header_title', | |
| 92 | - 'type' => 'textarea_code', | |
| 93 | - ), | |
| 94 | - array( | |
| 95 | - 'name' => __( "Subtitle", 'kadencetoolkit' ), | |
| 96 | - 'desc' => __( "Subtitle will go below post title", 'kadencetoolkit' ), | |
| 97 | - 'id' => $prefix . 'subtitle', | |
| 98 | - 'type' => 'textarea_code', | |
| 99 | - ), | |
| 100 | - array( | |
| 101 | - 'name' => __("Hide Page Title", 'kadencetoolkit' ), | |
| 102 | - 'desc' => '', | |
| 103 | - 'id' => $prefix . 'pagetitle_hide', | |
| 104 | - 'type' => 'select', | |
| 105 | - 'options' => array( | |
| 106 | - array( 'name' => __("Default", 'kadencetoolkit' ), 'value' => 'default', ), | |
| 107 | - array( 'name' => __("Show", 'kadencetoolkit' ), 'value' => 'show', ), | |
| 108 | - array( 'name' => __("Hide", 'kadencetoolkit' ), 'value' => 'hide', ), | |
| 109 | - ), | |
| 110 | - ), | |
| 111 | - array( | |
| 112 | - 'name' => __("Page Title background behind Header", 'kadencetoolkit' ), | |
| 113 | - 'desc' => '', | |
| 114 | - 'id' => $prefix . 'pagetitle_behind_head', | |
| 115 | - 'type' => 'select', | |
| 116 | - 'options' => array( | |
| 117 | - array( 'name' => __("Default", 'kadencetoolkit' ), 'value' => 'default', ), | |
| 118 | - array( 'name' => __("Place behind Header", 'kadencetoolkit' ), 'value' => 'true', ), | |
| 119 | - array( 'name' => __("Don't place behind Header", 'kadencetoolkit' ), 'value' => 'false', ), | |
| 120 | - ), | |
| 121 | - ), | |
| 122 | - ) | |
| 123 | - ); | |
| 124 | -$meta_boxes[] = array( | |
| 125 | - 'id' => 'gallery_post_metabox', | |
| 126 | - 'title' => __("Gallery Post Options", 'kadencetoolkit'), | |
| 127 | - 'pages' => array( 'post',), // Post type | |
| 128 | - //'show_on' => array( 'key' => 'format', 'value' => 'standard'), | |
| 129 | - 'context' => 'normal', | |
| 130 | - 'priority' => 'high', | |
| 131 | - 'show_names' => true, // Show field names on the left | |
| 132 | - 'fields' => array( | |
| 133 | - | |
| 134 | - array( | |
| 135 | - 'name' => __("Post Head Content", 'kadencetoolkit' ), | |
| 136 | - 'desc' => '', | |
| 137 | - 'id' => $prefix . 'gallery_blog_head', | |
| 138 | - 'type' => 'select', | |
| 139 | - 'options' => array( | |
| 140 | - array( 'name' => __("Gallery Post Default", 'kadencetoolkit' ), 'value' => 'default', ), | |
| 141 | - array( 'name' => __("Image Slider - (Flex Slider)", 'kadencetoolkit' ), 'value' => 'flex', ), | |
| 142 | - array( 'name' => __("Carousel Slider - (Caroufedsel Slider)", 'kadencetoolkit' ), 'value' => 'carouselslider', ), | |
| 143 | - array( 'name' => __("None", 'kadencetoolkit' ), 'value' => 'none', ), | |
| 144 | - ), | |
| 145 | - ), | |
| 146 | - array( | |
| 147 | - 'name' => __("Post Slider Gallery", 'kadencetoolkit' ), | |
| 148 | - 'desc' => __("Add images for gallery here", 'kadencetoolkit' ), | |
| 149 | - 'id' => $prefix . 'image_gallery', | |
| 150 | - 'type' => 'kad_gallery', | |
| 151 | - ), | |
| 152 | - array( | |
| 153 | - 'name' => __("Max Slider Height", 'kadencetoolkit' ), | |
| 154 | - 'desc' => __("Default is: 400 (Note: just input number, example: 350)", 'kadencetoolkit' ), | |
| 155 | - 'id' => $prefix . 'gallery_posthead_height', | |
| 156 | - 'type' => 'text_small', | |
| 157 | - ), | |
| 158 | - array( | |
| 159 | - 'name' => __("Max Slider Width", 'kadencetoolkit' ), | |
| 160 | - 'desc' => __("Default is: 848 or 1140 on fullwidth posts (Note: just input number, example: 650, only applys to Image Slider)", 'kadencetoolkit' ), | |
| 161 | - 'id' => $prefix . 'gallery_posthead_width', | |
| 162 | - 'type' => 'text_small', | |
| 163 | - ), | |
| 164 | - array( | |
| 165 | - 'name' => __("Post Summary", 'kadencetoolkit' ), | |
| 166 | - 'desc' => '', | |
| 167 | - 'id' => $prefix . 'gallery_post_summery', | |
| 168 | - 'type' => 'select', | |
| 169 | - 'options' => array( | |
| 170 | - array( 'name' => __('Gallery Post Default', 'kadencetoolkit' ), 'value' => 'default', ), | |
| 171 | - array( 'name' => __('Portrait Image (feature image)', 'kadencetoolkit'), 'value' => 'img_portrait', ), | |
| 172 | - array( 'name' => __('Landscape Image (feature image)', 'kadencetoolkit'), 'value' => 'img_landscape', ), | |
| 173 | - array( 'name' => __('Portrait Image Slider', 'kadencetoolkit'), 'value' => 'slider_portrait', ), | |
| 174 | - array( 'name' => __('Landscape Image Slider', 'kadencetoolkit'), 'value' => 'slider_landscape', ), | |
| 175 | - ), | |
| 176 | - ), | |
| 64 | + $kttk_page_subtitle = new_cmb2_box( array( | |
| 65 | + 'id' => 'subtitle_metabox', | |
| 66 | + 'title' => __( "Page Title and Subtitle", 'virtue-toolkit' ), | |
| 67 | + 'object_types' => array( 'page'), | |
| 68 | + 'priority' => 'high', | |
| 69 | + ) ); | |
| 70 | + $kttk_page_subtitle->add_field( array( | |
| 71 | + 'name' => __( "Subtitle", 'virtue-toolkit' ), | |
| 72 | + 'desc' => __( "Subtitle will go below page title", 'virtue-toolkit' ), | |
| 73 | + 'id' => $prefix . 'subtitle', | |
| 74 | + 'type' => 'textarea_code', | |
| 75 | + 'options' => array( 'disable_codemirror' => true ), | |
| 76 | + ) ); | |
| 77 | + $kttk_page_subtitle->add_field( array( | |
| 78 | + 'name' => __("Hide Page Title", 'virtue-toolkit' ), | |
| 79 | + 'desc' => '', | |
| 80 | + 'id' => $prefix . 'pagetitle_hide', | |
| 81 | + 'type' => 'select', | |
| 82 | + 'options' => array( | |
| 83 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 84 | + 'show' => __("Show", 'virtue-toolkit' ), | |
| 85 | + 'hide' => __("Hide", 'virtue-toolkit' ), | |
| 177 | 86 | ), |
| 178 | - ); | |
| 179 | -$meta_boxes[] = array( | |
| 180 | - 'id' => 'video_post_metabox', | |
| 181 | - 'title' => __("Video Post Options", 'kadencetoolkit'), | |
| 182 | - 'pages' => array( 'post',), // Post type | |
| 183 | - //'show_on' => array( 'key' => 'format', 'value' => 'standard'), | |
| 184 | - 'context' => 'normal', | |
| 185 | - 'priority' => 'high', | |
| 186 | - 'show_names' => true, // Show field names on the left | |
| 187 | - 'fields' => array( | |
| 188 | - | |
| 189 | - array( | |
| 190 | - 'name' => __("Post Head Content", 'kadencetoolkit' ), | |
| 191 | - 'desc' => '', | |
| 192 | - 'id' => $prefix . 'video_blog_head', | |
| 193 | - 'type' => 'select', | |
| 194 | - 'options' => array( | |
| 195 | - array( 'name' => __("Video Post Default", 'kadencetoolkit' ), 'value' => 'default', ), | |
| 196 | - array( 'name' => __("Video", 'kadencetoolkit' ), 'value' => 'video', ), | |
| 197 | - array( 'name' => __("None", 'kadencetoolkit' ), 'value' => 'none', ), | |
| 198 | - ), | |
| 199 | - ), | |
| 200 | - array( | |
| 201 | - 'name' => __('Video Post embed code', 'kadencetoolkit'), | |
| 202 | - 'desc' => __('Place Embed Code Here, works with youtube, vimeo. (Use the featured image for screen shot)', 'kadencetoolkit'), | |
| 203 | - 'id' => $prefix . 'post_video', | |
| 204 | - 'type' => 'textarea_code', | |
| 205 | - ), | |
| 206 | - array( | |
| 207 | - 'name' => __("Max Video Width", 'kadencetoolkit' ), | |
| 208 | - 'desc' => __("Default is: 848 or 1140 on fullwidth posts (Note: just input number, example: 650, does not apply to carousel slider)", 'kadencetoolkit' ), | |
| 209 | - 'id' => $prefix . 'video_posthead_width', | |
| 210 | - 'type' => 'text_small', | |
| 211 | - ), | |
| 212 | - array( | |
| 213 | - 'name' => __("Post Summary", 'kadencetoolkit' ), | |
| 214 | - 'desc' => '', | |
| 215 | - 'id' => $prefix . 'video_post_summery', | |
| 216 | - 'type' => 'select', | |
| 217 | - 'options' => array( | |
| 218 | - array( 'name' => __('Video Post Default', 'kadencetoolkit' ), 'value' => 'default', ), | |
| 219 | - array( 'name' => __('Video - (when possible)', 'kadencetoolkit'), 'value' => 'video', ), | |
| 220 | - array( 'name' => __('Portrait Image (feature image)', 'kadencetoolkit'), 'value' => 'img_portrait', ), | |
| 221 | - array( 'name' => __('Landscape Image (feature image)', 'kadencetoolkit'), 'value' => 'img_landscape', ), | |
| 222 | - ), | |
| 223 | - ), | |
| 87 | + ) ); | |
| 88 | + $kttk_page_subtitle->add_field( array( | |
| 89 | + 'name' => __("Page Title background behind Header", 'virtue-toolkit' ), | |
| 90 | + 'desc' => '', | |
| 91 | + 'id' => $prefix . 'pagetitle_behind_head', | |
| 92 | + 'type' => 'select', | |
| 93 | + 'options' => array( | |
| 94 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 95 | + 'true' => __("Place behind Header", 'virtue-toolkit' ), | |
| 96 | + 'false' => __("Don't place behind Header", 'virtue-toolkit' ), | |
| 224 | 97 | ), |
| 225 | - ); | |
| 226 | -$meta_boxes[] = array( | |
| 227 | - 'id' => 'portfolio_post_metabox', | |
| 228 | - 'title' => __('Portfolio Post Options', 'kadencetoolkit'), | |
| 229 | - 'pages' => array( 'portfolio' ), // Post type | |
| 230 | - 'context' => 'normal', | |
| 231 | - 'priority' => 'high', | |
| 232 | - 'show_names' => true, // Show field names on the left | |
| 233 | - 'fields' => array( | |
| 234 | - | |
| 235 | - array( | |
| 236 | - 'name' => __('Project Layout', 'kadencetoolkit'), | |
| 237 | - 'desc' => '<a href="http://docs.kadencethemes.com/pinnacle/#portfolio_posts" target="_blank" >Whats the difference?</a>', | |
| 238 | - 'id' => $prefix . 'ppost_layout', | |
| 239 | - 'type' => 'radio_inline', | |
| 240 | - 'options' => array( | |
| 241 | - array( 'name' => __('Beside 40%', 'kadencetoolkit'), 'value' => 'beside', ), | |
| 242 | - array( 'name' => __('Beside 33%', 'kadencetoolkit'), 'value' => 'besidesmall', ), | |
| 243 | - array( 'name' => __('Above', 'kadencetoolkit'), 'value' => 'above', ), | |
| 244 | - array( 'name' => __('Three Rows', 'kadencetoolkit'), 'value' => 'three', ), | |
| 245 | - ), | |
| 246 | - ), | |
| 247 | - array( | |
| 248 | - 'name' => __('Project Options', 'kadencetoolkit'), | |
| 249 | - 'desc' => '', | |
| 250 | - 'id' => $prefix . 'ppost_type', | |
| 251 | - 'type' => 'select', | |
| 252 | - 'options' => array( | |
| 253 | - array( 'name' => __('Image', 'kadencetoolkit'), 'value' => 'image', ), | |
| 254 | - array( 'name' => __('Image Slider (Flex Slider)', 'kadencetoolkit'), 'value' => 'flex', ), | |
| 255 | - array( 'name' => __('Carousel Slider', 'kadencetoolkit'), 'value' => 'carousel', ), | |
| 256 | - array( 'name' => __('Video', 'kadencetoolkit'), 'value' => 'video', ), | |
| 257 | - array( 'name' => __('None', 'kadencetoolkit'), 'value' => 'none', ), | |
| 258 | - ), | |
| 259 | - ), | |
| 260 | - array( | |
| 261 | - 'name' => __("Portfolio Slider/Images", 'kadencetoolkit' ), | |
| 262 | - 'desc' => __("Add images for post here", 'kadencetoolkit' ), | |
| 263 | - 'id' => $prefix . 'image_gallery', | |
| 264 | - 'type' => 'kad_gallery', | |
| 265 | - ), | |
| 266 | - array( | |
| 267 | - 'name' => __("Max Image/Slider Height", 'kadencetoolkit' ), | |
| 268 | - 'desc' => __("Default is: 450 (Note: just input number, example: 350)", 'kadencetoolkit' ), | |
| 269 | - 'id' => $prefix . 'posthead_height', | |
| 270 | - 'type' => 'text_small', | |
| 271 | - ), | |
| 272 | - array( | |
| 273 | - 'name' => __("Max Image/Slider Width", 'kadencetoolkit' ), | |
| 274 | - 'desc' => __("Default is: 670 or 1140 on above or three row layouts (Note: just input number, example: 650)", 'kadencetoolkit' ), | |
| 275 | - 'id' => $prefix . 'posthead_width', | |
| 276 | - 'type' => 'text_small', | |
| 277 | - ), | |
| 278 | - array( | |
| 279 | - 'name' => __('Value 01 Title', 'kadencetoolkit'), | |
| 280 | - 'desc' => __('ex. Project Type:', 'kadencetoolkit'), | |
| 281 | - 'id' => $prefix . 'project_val01_title', | |
| 282 | - 'type' => 'text_medium', | |
| 283 | - ), | |
| 284 | - array( | |
| 285 | - 'name' => __('Value 01 Description', 'kadencetoolkit'), | |
| 286 | - 'desc' => __('ex. Character Illustration', 'kadencetoolkit'), | |
| 287 | - 'id' => $prefix . 'project_val01_description', | |
| 288 | - 'type' => 'text_medium', | |
| 289 | - ), | |
| 290 | - array( | |
| 291 | - 'name' => __('Value 02 Title', 'kadencetoolkit'), | |
| 292 | - 'desc' => __('ex. Skills Needed:', 'kadencetoolkit'), | |
| 293 | - 'id' => $prefix . 'project_val02_title', | |
| 294 | - 'type' => 'text_medium', | |
| 295 | - ), | |
| 296 | - array( | |
| 297 | - 'name' => __('Value 02 Description', 'kadencetoolkit'), | |
| 298 | - 'desc' => __('ex. Photoshop, Illustrator', 'kadencetoolkit'), | |
| 299 | - 'id' => $prefix . 'project_val02_description', | |
| 300 | - 'type' => 'text_medium', | |
| 301 | - ), | |
| 302 | - array( | |
| 303 | - 'name' => __('Value 03 Title', 'kadencetoolkit'), | |
| 304 | - 'desc' => __('ex. Customer:', 'kadencetoolkit'), | |
| 305 | - 'id' => $prefix . 'project_val03_title', | |
| 306 | - 'type' => 'text_medium', | |
| 307 | - ), | |
| 308 | - array( | |
| 309 | - 'name' => __('Value 03 Description', 'kadencetoolkit'), | |
| 310 | - 'desc' => __('ex. Example Inc', 'kadencetoolkit'), | |
| 311 | - 'id' => $prefix . 'project_val03_description', | |
| 312 | - 'type' => 'text_medium', | |
| 313 | - ), | |
| 314 | - array( | |
| 315 | - 'name' => __('Value 04 Title', 'kadencetoolkit'), | |
| 316 | - 'desc' => __('ex. Project Year:', 'kadencetoolkit'), | |
| 317 | - 'id' => $prefix . 'project_val04_title', | |
| 318 | - 'type' => 'text_medium', | |
| 319 | - ), | |
| 320 | - array( | |
| 321 | - 'name' => __('Value 04 Description', 'kadencetoolkit'), | |
| 322 | - 'desc' => __('ex. 2013', 'kadencetoolkit'), | |
| 323 | - 'id' => $prefix . 'project_val04_description', | |
| 324 | - 'type' => 'text_medium', | |
| 325 | - ), | |
| 326 | - array( | |
| 327 | - 'name' => __('External Website', 'kadencetoolkit'), | |
| 328 | - 'desc' => __('ex. Website:', 'kadencetoolkit'), | |
| 329 | - 'id' => $prefix . 'project_val05_title', | |
| 330 | - 'type' => 'text_medium', | |
| 331 | - ), | |
| 332 | - array( | |
| 333 | - 'name' => __('Website Address', 'kadencetoolkit'), | |
| 334 | - 'desc' => __('ex. http://www.example.com', 'kadencetoolkit'), | |
| 335 | - 'id' => $prefix . 'project_val05_description', | |
| 336 | - 'type' => 'text_medium', | |
| 337 | - ), | |
| 338 | - array( | |
| 339 | - 'name' => __('If Video Project', 'kadencetoolkit'), | |
| 340 | - 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'kadencetoolkit'), | |
| 341 | - 'id' => $prefix . 'post_video', | |
| 342 | - 'type' => 'textarea_code', | |
| 343 | - ), | |
| 344 | - | |
| 98 | + ) ); | |
| 99 | + | |
| 100 | + // Post Subtitle | |
| 101 | + $kttk_post_subtitle = new_cmb2_box( array( | |
| 102 | + 'id' => 'post_subtitle_metabox', | |
| 103 | + 'title' => __( "Post Title and Subtitle", 'virtue-toolkit' ), | |
| 104 | + 'object_types' => array( 'product', 'post', 'portfolio'), | |
| 105 | + 'priority' => 'high', | |
| 106 | + ) ); | |
| 107 | + $kttk_post_subtitle->add_field( array( | |
| 108 | + 'name' => __( "Post Header Title", 'virtue-toolkit' ), | |
| 109 | + 'desc' => '', | |
| 110 | + 'id' => $prefix . 'post_header_title', | |
| 111 | + 'type' => 'textarea_code', | |
| 112 | + 'options' => array( 'disable_codemirror' => true ), | |
| 113 | + ) ); | |
| 114 | + $kttk_post_subtitle->add_field( array( | |
| 115 | + 'name' => __( "Subtitle", 'virtue-toolkit' ), | |
| 116 | + 'desc' => __( "Subtitle will go below post title", 'virtue-toolkit' ), | |
| 117 | + 'id' => $prefix . 'subtitle', | |
| 118 | + 'type' => 'textarea_code', | |
| 119 | + 'options' => array( 'disable_codemirror' => true ), | |
| 120 | + ) ); | |
| 121 | + $kttk_post_subtitle->add_field( array( | |
| 122 | + 'name' => __("Hide Post Title", 'virtue-toolkit' ), | |
| 123 | + 'desc' => '', | |
| 124 | + 'id' => $prefix . 'pagetitle_hide', | |
| 125 | + 'type' => 'select', | |
| 126 | + 'options' => array( | |
| 127 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 128 | + 'show' => __("Show", 'virtue-toolkit' ), | |
| 129 | + 'hide' => __("Hide", 'virtue-toolkit' ), | |
| 345 | 130 | ), |
| 346 | - ); | |
| 347 | - $meta_boxes[] = array( | |
| 348 | - 'id' => 'portfolio_post_carousel_metabox', | |
| 349 | - 'title' => __('Bottom Carousel Options', 'kadencetoolkit'), | |
| 350 | - 'pages' => array( 'portfolio' ), // Post type | |
| 351 | - 'context' => 'normal', | |
| 352 | - 'priority' => 'high', | |
| 353 | - 'show_names' => true, // Show field names on the left | |
| 354 | - 'fields' => array( | |
| 355 | - array( | |
| 356 | - 'name' => __('Carousel Title', 'kadencetoolkit'), | |
| 357 | - 'desc' => __('ex. Similar Projects', 'kadencetoolkit'), | |
| 358 | - 'id' => $prefix . 'portfolio_carousel_title', | |
| 359 | - 'type' => 'text_medium', | |
| 360 | - ), | |
| 361 | - array( | |
| 362 | - 'name' => __('Bottom Portfolio Carousel', 'kadencetoolkit'), | |
| 363 | - 'desc' => __('Display a carousel with portfolio items below project?', 'kadencetoolkit'), | |
| 364 | - 'id' => $prefix . 'portfolio_carousel_recent', | |
| 365 | - 'type' => 'select', | |
| 366 | - 'options' => array( | |
| 367 | - array( 'name' => __('Default', 'kadencetoolkit'), 'value' => 'defualt', ), | |
| 368 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 369 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 370 | - ), | |
| 371 | - ), | |
| 372 | - array( | |
| 373 | - 'name' => __('Carousel Items', 'kadencetoolkit'), | |
| 374 | - 'desc' => '', | |
| 375 | - 'id' => $prefix . 'portfolio_carousel_group', | |
| 376 | - 'type' => 'select', | |
| 377 | - 'options' => array( | |
| 378 | - array( 'name' => __('Default', 'kadencetoolkit'), 'value' => 'defualt', ), | |
| 379 | - array( 'name' => __('All Portfolio Posts', 'kadencetoolkit'), 'value' => 'all', ), | |
| 380 | - array( 'name' => __('Only of same Portfolio Type', 'kadencetoolkit'), 'value' => 'cat', ), | |
| 381 | - ), | |
| 382 | - ), | |
| 383 | - array( | |
| 384 | - 'name' => __('Carousel Order', 'kadencetoolkit'), | |
| 385 | - 'desc' => '', | |
| 386 | - 'id' => $prefix . 'portfolio_carousel_order', | |
| 387 | - 'type' => 'select', | |
| 388 | - 'options' => array( | |
| 389 | - array( 'name' => __('Menu Order', 'kadencetoolkit'), 'value' => 'menu_order', ), | |
| 390 | - array( 'name' => __('Title', 'kadencetoolkit'), 'value' => 'title', ), | |
| 391 | - array( 'name' => __('Date', 'kadencetoolkit'), 'value' => 'date', ), | |
| 392 | - array( 'name' => __('Random', 'kadencetoolkit'), 'value' => 'rand', ), | |
| 393 | - ), | |
| 394 | - ), | |
| 395 | - | |
| 131 | + ) ); | |
| 132 | + $kttk_post_subtitle->add_field( array( | |
| 133 | + 'name' => __("Post Title background behind Header", 'virtue-toolkit' ), | |
| 134 | + 'desc' => '', | |
| 135 | + 'id' => $prefix . 'pagetitle_behind_head', | |
| 136 | + 'type' => 'select', | |
| 137 | + 'options' => array( | |
| 138 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 139 | + 'true' => __("Place behind Header", 'virtue-toolkit' ), | |
| 140 | + 'false' => __("Don't place behind Header", 'virtue-toolkit' ), | |
| 396 | 141 | ), |
| 397 | - ); | |
| 398 | - $meta_boxes[] = array( | |
| 399 | - 'id' => 'portfolio_metabox', | |
| 400 | - 'title' => __('Portfolio Page Options', 'kadencetoolkit'), | |
| 401 | - 'pages' => array( 'page' ), // Post type | |
| 402 | - 'show_on' => array('key' => 'page-template', 'value' => array( 'template-portfolio-grid.php')), | |
| 403 | - 'context' => 'normal', | |
| 404 | - 'priority' => 'high', | |
| 405 | - 'show_names' => true, // Show field names on the left | |
| 406 | - 'fields' => array( | |
| 407 | - array( | |
| 408 | - 'name' => __('Style', 'kadencetoolkit'), | |
| 409 | - 'desc' => '', | |
| 410 | - 'id' => $prefix . 'portfolio_style', | |
| 411 | - 'type' => 'select', | |
| 412 | - 'options' => array( | |
| 413 | - array( 'name' => __('Default', 'kadencetoolkit'), 'value' => 'default', ), | |
| 414 | - array( 'name' => __('Post Boxes', 'kadencetoolkit'), 'value' => 'padded_style', ), | |
| 415 | - array( 'name' => __('Flat with Margin', 'kadencetoolkit'), 'value' => 'flat-w-margin', ), | |
| 416 | - ), | |
| 417 | - ), | |
| 418 | - array( | |
| 419 | - 'name' => __('Hover Style', 'kadencetoolkit'), | |
| 420 | - 'desc' => '', | |
| 421 | - 'id' => $prefix . 'portfolio_hover_style', | |
| 422 | - 'type' => 'select', | |
| 423 | - 'options' => array( | |
| 424 | - array( 'name' => __('Default', 'kadencetoolkit'), 'value' => 'default', ), | |
| 425 | - array( 'name' => __('Light', 'kadencetoolkit'), 'value' => 'p_lightstyle', ), | |
| 426 | - array( 'name' => __('Dark', 'kadencetoolkit'), 'value' => 'p_darkstyle', ), | |
| 427 | - array( 'name' => __('Primary Color', 'kadencetoolkit'), 'value' => 'p_primarystyle', ), | |
| 428 | - ), | |
| 429 | - ), | |
| 430 | - array( | |
| 431 | - 'name' => __('Columns', 'kadencetoolkit'), | |
| 432 | - 'desc' => '', | |
| 433 | - 'id' => $prefix . 'portfolio_columns', | |
| 434 | - 'type' => 'select', | |
| 435 | - 'options' => array( | |
| 436 | - array( 'name' => __('Four Column', 'kadencetoolkit'), 'value' => '4', ), | |
| 437 | - array( 'name' => __('Three Column', 'kadencetoolkit'), 'value' => '3', ), | |
| 438 | - array( 'name' => __('Two Column', 'kadencetoolkit'), 'value' => '2', ), | |
| 439 | - array( 'name' => __('Five Column', 'kadencetoolkit'), 'value' => '5', ), | |
| 440 | - ), | |
| 441 | - ), | |
| 442 | - array( | |
| 443 | - 'name' => __('Portfolio Work Types', 'kadencetoolkit'), | |
| 444 | - 'id' => $prefix .'portfolio_type', | |
| 445 | - 'type' => 'imag_select_taxonomy', | |
| 446 | - 'taxonomy' => 'portfolio-type', | |
| 447 | - ), | |
| 448 | - array( | |
| 449 | - 'name' => __('Order Items By', 'kadencetoolkit'), | |
| 450 | - 'desc' => '', | |
| 451 | - 'id' => $prefix . 'portfolio_order', | |
| 452 | - 'type' => 'select', | |
| 453 | - 'options' => array( | |
| 454 | - array( 'name' => __('Menu Order', 'kadencetoolkit'), 'value' => 'menu_order', ), | |
| 455 | - array( 'name' => __('Title', 'kadencetoolkit'), 'value' => 'title', ), | |
| 456 | - array( 'name' => __('Date', 'kadencetoolkit'), 'value' => 'date', ), | |
| 457 | - array( 'name' => __('Random', 'kadencetoolkit'), 'value' => 'rand', ), | |
| 458 | - ), | |
| 459 | - ), | |
| 460 | - array( | |
| 461 | - 'name' => __('Items per Page', 'kadencetoolkit'), | |
| 462 | - 'desc' => __('How many portfolio items per page', 'kadencetoolkit'), | |
| 463 | - 'id' => $prefix . 'portfolio_items', | |
| 464 | - 'type' => 'select', | |
| 465 | - 'options' => array( | |
| 466 | - array( 'name' => __('All', 'kadencetoolkit'), 'value' => 'all', ), | |
| 467 | - array( 'name' => '3', 'value' => '3', ), | |
| 468 | - array( 'name' => '4', 'value' => '4', ), | |
| 469 | - array( 'name' => '5', 'value' => '5', ), | |
| 470 | - array( 'name' => '6', 'value' => '6', ), | |
| 471 | - array( 'name' => '7', 'value' => '7', ), | |
| 472 | - array( 'name' => '8', 'value' => '8', ), | |
| 473 | - array( 'name' => '9', 'value' => '9', ), | |
| 474 | - array( 'name' => '10', 'value' => '10', ), | |
| 475 | - array( 'name' => '11', 'value' => '11', ), | |
| 476 | - array( 'name' => '12', 'value' => '12', ), | |
| 477 | - array( 'name' => '13', 'value' => '13', ), | |
| 478 | - array( 'name' => '14', 'value' => '14', ), | |
| 479 | - array( 'name' => '15', 'value' => '15', ), | |
| 480 | - array( 'name' => '16', 'value' => '16', ), | |
| 481 | - ), | |
| 482 | - ), | |
| 483 | - array( | |
| 484 | - 'name' => __('Image Ratio?', 'kadencetoolkit'), | |
| 485 | - 'desc' => '', | |
| 486 | - 'id' => $prefix . 'portfolio_img_ratio', | |
| 487 | - 'type' => 'select', | |
| 488 | - 'options' => array( | |
| 489 | - array( 'name' => __('Default', 'kadencetoolkit'), 'value' => 'default', ), | |
| 490 | - array( 'name' => __('Square 1:1', 'kadencetoolkit'), 'value' => 'square', ), | |
| 491 | - array( 'name' => __('Portrait 3:4', 'kadencetoolkit'), 'value' => 'portrait', ), | |
| 492 | - array( 'name' => __('Landscape 4:3', 'kadencetoolkit'), 'value' => 'landscape', ), | |
| 493 | - array( 'name' => __('Wide Landscape 4:2', 'kadencetoolkit'), 'value' => 'widelandscape', ), | |
| 494 | - ), | |
| 495 | - ), | |
| 496 | - array( | |
| 497 | - 'name' => __('Display Item Work Types', 'kadencetoolkit'), | |
| 498 | - 'desc' => '', | |
| 499 | - 'id' => $prefix . 'portfolio_item_types', | |
| 500 | - 'type' => 'checkbox', | |
| 501 | - ), | |
| 502 | - array( | |
| 503 | - 'name' => __('Display Item Excerpt', 'kadencetoolkit'), | |
| 504 | - 'desc' => '', | |
| 505 | - 'id' => $prefix . 'portfolio_item_excerpt', | |
| 506 | - 'type' => 'checkbox', | |
| 507 | - ), | |
| 508 | - array( | |
| 509 | - 'name' => __('Add Lightbox link in each item', 'kadencetoolkit'), | |
| 510 | - 'desc' => '', | |
| 511 | - 'id' => $prefix . 'portfolio_lightbox', | |
| 512 | - 'type' => 'checkbox', | |
| 513 | - ), | |
| 514 | - | |
| 515 | - )); | |
| 516 | - $meta_boxes[] = array( | |
| 517 | - 'id' => 'pagefeature_metabox', | |
| 518 | - 'title' => __('Feature Page Options', 'kadencetoolkit'), | |
| 519 | - 'pages' => array( 'page' ), // Post type | |
| 520 | - 'show_on' => array('key' => 'page-template', 'value' => array( 'template-feature.php')), | |
| 521 | - 'context' => 'normal', | |
| 522 | - 'priority' => 'high', | |
| 523 | - 'show_names' => true, // Show field names on the left | |
| 524 | - 'fields' => array( | |
| 525 | - | |
| 526 | - array( | |
| 527 | - 'name' => __('Header Options', 'kadencetoolkit'), | |
| 528 | - 'desc' => __('If image slider make sure images uploaded are at-least 1170px wide.', 'kadencetoolkit'), | |
| 529 | - 'id' => $prefix . 'page_head', | |
| 530 | - 'type' => 'select', | |
| 531 | - 'defualt' => 'pagetitle', | |
| 532 | - 'options' => array( | |
| 533 | - array( 'name' => __('Page Title', 'kadencetoolkit'), 'value' => 'pagetitle', ), | |
| 534 | - array( 'name' => __('Image Slider (Flex Slider)', 'kadencetoolkit'), 'value' => 'flex', ), | |
| 535 | - array( 'name' => __('Carousel Slider', 'kadencetoolkit'), 'value' => 'carousel', ), | |
| 536 | - array( 'name' => __('Video', 'kadencetoolkit'), 'value' => 'video', ), | |
| 537 | - ), | |
| 538 | - ), | |
| 539 | - array( | |
| 540 | - 'name' => __("Slider Images", 'kadencetoolkit' ), | |
| 541 | - 'desc' => __("Add for flex, carousel, and image carousel.", 'kadencetoolkit' ), | |
| 542 | - 'id' => $prefix . 'image_gallery', | |
| 543 | - 'type' => 'kad_gallery', | |
| 544 | - ), | |
| 545 | - array( | |
| 546 | - 'name' => __('If Cyclone Slider', 'kadencetoolkit'), | |
| 547 | - 'desc' => __('Paste Cyclone slider shortcode here (example: [cycloneslider id="slider1"])', 'kadencetoolkit'), | |
| 548 | - 'id' => $prefix . 'shortcode_slider', | |
| 549 | - 'type' => 'textarea_code', | |
| 550 | - ), | |
| 551 | - array( | |
| 552 | - 'name' => __('Max Image/Slider Height', 'kadencetoolkit'), | |
| 553 | - 'desc' => __('Default is: 400 (Note: just input number, example: 350)', 'kadencetoolkit'), | |
| 554 | - 'id' => $prefix . 'posthead_height', | |
| 555 | - 'type' => 'text_small', | |
| 556 | - ), | |
| 557 | - array( | |
| 558 | - 'name' => __("Max Image/Slider Width", 'kadencetoolkit' ), | |
| 559 | - 'desc' => __("Default is: 1140 on fullwidth posts (Note: just input number, example: 650, does not apply to Carousel slider)", 'kadencetoolkit' ), | |
| 560 | - 'id' => $prefix . 'posthead_width', | |
| 561 | - 'type' => 'text_small', | |
| 562 | - ), | |
| 563 | - array( | |
| 564 | - 'name' => __('If Video Post', 'kadencetoolkit'), | |
| 565 | - 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'kadencetoolkit'), | |
| 566 | - 'id' => $prefix . 'post_video', | |
| 567 | - 'type' => 'textarea_code', | |
| 568 | - ), | |
| 569 | - | |
| 570 | - )); | |
| 571 | - $meta_boxes[] = array( | |
| 572 | - 'id' => 'contact_metabox', | |
| 573 | - 'title' => __('Contact Page Options', 'kadencetoolkit'), | |
| 574 | - 'pages' => array( 'page' ), // Post type | |
| 575 | - 'show_on' => array('key' => 'page-template', 'value' => array( 'template-contact.php')), | |
| 576 | - 'context' => 'normal', | |
| 577 | - 'priority' => 'high', | |
| 578 | - 'show_names' => true, // Show field names on the left | |
| 579 | - 'fields' => array( | |
| 580 | - | |
| 581 | - array( | |
| 582 | - 'name' => __('Use Contact Form', 'kadencetoolkit'), | |
| 583 | - 'desc' => '', | |
| 584 | - 'id' => $prefix .'contact_form', | |
| 585 | - 'type' => 'select', | |
| 586 | - 'options' => array( | |
| 587 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 588 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 589 | - ), | |
| 590 | - ), | |
| 591 | - array( | |
| 592 | - 'name' => __('Contact Form Title', 'kadencetoolkit'), | |
| 593 | - 'desc' => __('ex. Send us an Email', 'kadencetoolkit'), | |
| 594 | - 'id' => $prefix . 'contact_form_title', | |
| 595 | - 'type' => 'text', | |
| 596 | - ), | |
| 597 | - array( | |
| 598 | - 'name' => __('Contact Form Email Recipient', 'kadencetoolkit'), | |
| 599 | - 'desc' => __('ex. [email protected]', 'kadencetoolkit'), | |
| 600 | - 'id' => $prefix . 'contact_form_email', | |
| 601 | - 'type' => 'text', | |
| 602 | - ), | |
| 603 | - array( | |
| 604 | - 'name' => __('Use Simple Math Question', 'kadencetoolkit'), | |
| 605 | - 'desc' => 'Adds a simple math question to form.', | |
| 606 | - 'id' => $prefix .'contact_form_math', | |
| 607 | - 'type' => 'select', | |
| 608 | - 'options' => array( | |
| 609 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 610 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 611 | - ), | |
| 612 | - ), | |
| 613 | - array( | |
| 614 | - 'name' => __('Use Map', 'kadencetoolkit'), | |
| 615 | - 'desc' => '', | |
| 616 | - 'id' => $prefix .'contact_map', | |
| 617 | - 'type' => 'select', | |
| 618 | - 'options' => array( | |
| 619 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 620 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 621 | - ), | |
| 622 | - ), | |
| 623 | - array( | |
| 624 | - 'name' => __('Address', 'kadencetoolkit'), | |
| 625 | - 'desc' => __('Enter your Location', 'kadencetoolkit'), | |
| 626 | - 'id' => $prefix . 'contact_address', | |
| 627 | - 'type' => 'text', | |
| 628 | - ), | |
| 629 | - array( | |
| 630 | - 'name' => __('Map Type', 'kadencetoolkit'), | |
| 631 | - 'desc' => '', | |
| 632 | - 'id' => $prefix . 'contact_maptype', | |
| 633 | - 'type' => 'select', | |
| 634 | - 'options' => array( | |
| 635 | - array( 'name' => __('ROADMAP', 'kadencetoolkit'), 'value' => 'ROADMAP', ), | |
| 636 | - array( 'name' => __('HYBRID', 'kadencetoolkit'), 'value' => 'HYBRID', ), | |
| 637 | - array( 'name' => __('TERRAIN', 'kadencetoolkit'), 'value' => 'TERRAIN', ), | |
| 638 | - array( 'name' => __('SATELLITE', 'kadencetoolkit'), 'value' => 'SATELLITE', ), | |
| 639 | - ), | |
| 640 | - ), | |
| 641 | - array( | |
| 642 | - 'name' => __('Map Zoom Level', 'kadencetoolkit'), | |
| 643 | - 'desc' => __('A good place to start is 15', 'kadencetoolkit'), | |
| 644 | - 'id' => $prefix . 'contact_zoom', | |
| 645 | - 'std' => '15', | |
| 646 | - 'type' => 'select', | |
| 647 | - 'options' => array( | |
| 648 | - array( 'name' => __('1 (World View)', 'kadencetoolkit'), 'value' => '1', ), | |
| 649 | - array( 'name' => '2', 'value' => '2', ), | |
| 650 | - array( 'name' => '3', 'value' => '3', ), | |
| 651 | - array( 'name' => '4', 'value' => '4', ), | |
| 652 | - array( 'name' => '5', 'value' => '5', ), | |
| 653 | - array( 'name' => '6', 'value' => '6', ), | |
| 654 | - array( 'name' => '7', 'value' => '7', ), | |
| 655 | - array( 'name' => '8', 'value' => '8', ), | |
| 656 | - array( 'name' => '9', 'value' => '9', ), | |
| 657 | - array( 'name' => '10', 'value' => '10', ), | |
| 658 | - array( 'name' => '11', 'value' => '11', ), | |
| 659 | - array( 'name' => '12', 'value' => '12', ), | |
| 660 | - array( 'name' => '13', 'value' => '13', ), | |
| 661 | - array( 'name' => '14', 'value' => '14', ), | |
| 662 | - array( 'name' => '15', 'value' => '15', ), | |
| 663 | - array( 'name' => '16', 'value' => '16', ), | |
| 664 | - array( 'name' => '17', 'value' => '17', ), | |
| 665 | - array( 'name' => '18', 'value' => '18', ), | |
| 666 | - array( 'name' => '19', 'value' => '19', ), | |
| 667 | - array( 'name' => '20', 'value' => '20', ), | |
| 668 | - array( 'name' => __('21 (Street View)', 'kadencetoolkit'), 'value' => '21', ), | |
| 669 | - ), | |
| 670 | - ), | |
| 671 | - array( | |
| 672 | - 'name' => __('Map Height', 'kadencetoolkit'), | |
| 673 | - 'desc' => __('Default is 300', 'kadencetoolkit'), | |
| 674 | - 'id' => $prefix . 'contact_mapheight', | |
| 675 | - 'type' => 'text_small', | |
| 676 | - ), | |
| 677 | - )); | |
| 142 | + ) ); | |
| 678 | 143 | |
| 679 | - return $meta_boxes; | |
| 144 | + // Gallery Post | |
| 145 | + $kttk_gallery_post = new_cmb2_box( array( | |
| 146 | + 'id' => 'gallery_post_metabox', | |
| 147 | + 'title' => __( "Gallery Post Options", 'virtue-toolkit' ), | |
| 148 | + 'object_types' => array( 'post'), | |
| 149 | + 'priority' => 'high', | |
| 150 | + ) ); | |
| 151 | + $kttk_gallery_post->add_field( array( | |
| 152 | + 'name' => __("Post Head Content", 'virtue-toolkit' ), | |
| 153 | + 'desc' => '', | |
| 154 | + 'id' => $prefix . 'gallery_blog_head', | |
| 155 | + 'type' => 'select', | |
| 156 | + 'options' => array( | |
| 157 | + 'default' => __("Gallery Post Default", 'virtue-toolkit' ), | |
| 158 | + 'flex' => __("Image Slider - (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 159 | + 'carouselslider' => __("Image Slider - (Different Image Ratio)", 'virtue-toolkit' ), | |
| 160 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 161 | + ), | |
| 162 | + ) ); | |
| 163 | + $kttk_gallery_post->add_field( array( | |
| 164 | + 'name' => __("Post Slider Gallery", 'virtue-toolkit' ), | |
| 165 | + 'desc' => __("Add images for gallery here", 'virtue-toolkit' ), | |
| 166 | + 'id' => $prefix . 'image_gallery', | |
| 167 | + 'type' => 'kad_gallery', | |
| 168 | + ) ); | |
| 169 | + $kttk_gallery_post->add_field( array( | |
| 170 | + 'name' => __("Max Slider Height", 'virtue-toolkit' ), | |
| 171 | + 'desc' => __("Default is: 400 (Note: just input number, example: 350)", 'virtue-toolkit' ), | |
| 172 | + 'id' => $prefix . 'gallery_posthead_height', | |
| 173 | + 'type' => 'text_small', | |
| 174 | + ) ); | |
| 175 | + $kttk_gallery_post->add_field( array( | |
| 176 | + 'name' => __("Max Slider Width", 'virtue-toolkit' ), | |
| 177 | + 'desc' => __("Default is: 848 or 1140 on fullwidth posts (Note: just input number, example: 650, only applys to Image Slider)", 'virtue-toolkit' ), | |
| 178 | + 'id' => $prefix . 'gallery_posthead_width', | |
| 179 | + 'type' => 'text_small', | |
| 180 | + ) ); | |
| 181 | + $kttk_gallery_post->add_field( array( | |
| 182 | + 'name' => __("Post Summary", 'virtue-toolkit' ), | |
| 183 | + 'desc' => '', | |
| 184 | + 'id' => $prefix . 'gallery_post_summery', | |
| 185 | + 'type' => 'select', | |
| 186 | + 'options' => array( | |
| 187 | + 'default' => __("Gallery Post Default", 'virtue-toolkit' ), | |
| 188 | + 'img_portrait' => __("Portrait Image (Featured image)", 'virtue-toolkit' ), | |
| 189 | + 'img_landscape' => __("Landscape Image (Featured image)", 'virtue-toolkit' ), | |
| 190 | + 'slider_portrait' => __("Portrait Image Slider", 'virtue-toolkit' ), | |
| 191 | + 'slider_landscape' => __("Landscape Image Slider", 'virtue-toolkit' ), | |
| 192 | + ), | |
| 193 | + ) ); | |
| 194 | + | |
| 195 | + // Video Post | |
| 196 | + $kttk_video_post = new_cmb2_box( array( | |
| 197 | + 'id' => 'video_post_metabox', | |
| 198 | + 'title' => __( "Video Post Options", 'virtue-toolkit' ), | |
| 199 | + 'object_types' => array( 'post'), | |
| 200 | + 'priority' => 'high', | |
| 201 | + ) ); | |
| 202 | + $kttk_video_post->add_field( array( | |
| 203 | + 'name' => __("Post Head Content", 'virtue-toolkit' ), | |
| 204 | + 'desc' => '', | |
| 205 | + 'id' => $prefix . 'video_blog_head', | |
| 206 | + 'type' => 'select', | |
| 207 | + 'options' => array( | |
| 208 | + 'default' => __("Video Post Default", 'virtue-toolkit' ), | |
| 209 | + 'video' => __("Video", 'virtue-toolkit' ), | |
| 210 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 211 | + ), | |
| 212 | + ) ); | |
| 213 | + $kttk_video_post->add_field( array( | |
| 214 | + 'name' => __("Video Post embed code", 'virtue-toolkit' ), | |
| 215 | + 'desc' => __('Place Embed Code Here, works with youtube, vimeo. (Use the featured image for screen shot)', 'virtue-toolkit'), | |
| 216 | + 'id' => $prefix . 'post_video', | |
| 217 | + 'type' => 'textarea_code', | |
| 218 | + 'options' => array( 'disable_codemirror' => true ), | |
| 219 | + ) ); | |
| 220 | + $kttk_video_post->add_field( array( | |
| 221 | + 'name' => __("Max Video Width", 'virtue-toolkit' ), | |
| 222 | + 'desc' => __("Default is: 848 or 1140 on fullwidth posts (Note: just input number, example: 650 )", 'virtue-toolkit' ), | |
| 223 | + 'id' => $prefix . 'video_posthead_width', | |
| 224 | + 'type' => 'text_small', | |
| 225 | + ) ); | |
| 226 | + $kttk_video_post->add_field( array( | |
| 227 | + 'name' => __("Post Summary", 'virtue-toolkit' ), | |
| 228 | + 'desc' => '', | |
| 229 | + 'id' => $prefix . 'video_post_summery', | |
| 230 | + 'type' => 'select', | |
| 231 | + 'options' => array( | |
| 232 | + 'default' => __("Video Post Default", 'virtue-toolkit' ), | |
| 233 | + 'video' => __("Video - (when possible)", 'virtue-toolkit' ), | |
| 234 | + 'img_portrait' => __("Portrait Image (Featured image)", 'virtue-toolkit' ), | |
| 235 | + 'img_landscape' => __("Landscape Image (Featured image)", 'virtue-toolkit' ), | |
| 236 | + ), | |
| 237 | + ) ); | |
| 238 | + | |
| 239 | + // Portfolio post | |
| 240 | + $kttk_portfolio_post = new_cmb2_box( array( | |
| 241 | + 'id' => 'portfolio_post_metabox', | |
| 242 | + 'title' => __( "Portfolio Post Options", 'virtue-toolkit' ), | |
| 243 | + 'object_types' => array( 'portfolio'), | |
| 244 | + 'priority' => 'high', | |
| 245 | + ) ); | |
| 246 | + $kttk_portfolio_post->add_field( array( | |
| 247 | + 'name' => __("Project Layout", 'virtue-toolkit' ), | |
| 248 | + 'desc' => '<a href="http://docs.kadencethemes.com/pinnacle-free/portfolio-posts/" target="_blank" >Whats the difference?</a>', | |
| 249 | + 'id' => $prefix . 'ppost_layout', | |
| 250 | + 'type' => 'radio_inline', | |
| 251 | + 'options' => array( | |
| 252 | + 'beside' => __("Beside 40%", 'virtue-toolkit' ), | |
| 253 | + 'besidesmall' => __("Beside 33%", 'virtue-toolkit' ), | |
| 254 | + 'above' => __("Above", 'virtue-toolkit' ), | |
| 255 | + 'three' => __("Three Rows", 'virtue-toolkit' ), | |
| 256 | + ), | |
| 257 | + ) ); | |
| 258 | + $kttk_portfolio_post->add_field( array( | |
| 259 | + 'name' => __("Project Options", 'virtue-toolkit' ), | |
| 260 | + 'desc' => '', | |
| 261 | + 'id' => $prefix . 'ppost_type', | |
| 262 | + 'type' => 'select', | |
| 263 | + 'options' => array( | |
| 264 | + 'image' => __("Image", 'virtue-toolkit' ), | |
| 265 | + 'flex' => __("Image Slider (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 266 | + 'carousel' => __("Image Slider (Different Image Ratio)", 'virtue-toolkit' ), | |
| 267 | + 'video' => __("Video", 'virtue-toolkit' ), | |
| 268 | + 'imagegrid' => __("Image Grid", 'virtue-toolkit' ), | |
| 269 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 270 | + ), | |
| 271 | + ) ); | |
| 272 | + $kttk_portfolio_post->add_field( array( | |
| 273 | + 'name' => __("Columns (Only for Image Grid option)", 'virtue-toolkit' ), | |
| 274 | + 'desc' => '', | |
| 275 | + 'id' => $prefix . 'portfolio_img_grid_columns', | |
| 276 | + 'type' => 'select', | |
| 277 | + 'options' => array( | |
| 278 | + '4' => __("Four Column", 'virtue-toolkit' ), | |
| 279 | + '3' => __("Three Column", 'virtue-toolkit' ), | |
| 280 | + '2' => __("Two Column", 'virtue-toolkit' ), | |
| 281 | + '5' => __("Five Column", 'virtue-toolkit' ), | |
| 282 | + '6' => __("Six Column", 'virtue-toolkit' ), | |
| 283 | + ), | |
| 284 | + ) ); | |
| 285 | + $kttk_portfolio_post->add_field( array( | |
| 286 | + 'name' => __("Portfolio Slider/Images", 'virtue-toolkit' ), | |
| 287 | + 'desc' => __("Add images for post here", 'virtue-toolkit' ), | |
| 288 | + 'id' => $prefix . 'image_gallery', | |
| 289 | + 'type' => 'kad_gallery', | |
| 290 | + ) ); | |
| 291 | + $kttk_portfolio_post->add_field( array( | |
| 292 | + 'name' => __("Max Image/Slider Height", 'virtue-toolkit' ), | |
| 293 | + 'desc' => __("Default is: 450 (Note: just input number, example: 350)", 'virtue-toolkit' ), | |
| 294 | + 'id' => $prefix . 'posthead_height', | |
| 295 | + 'type' => 'text_small', | |
| 296 | + ) ); | |
| 297 | + $kttk_portfolio_post->add_field( array( | |
| 298 | + 'name' => __("Max Image/Slider Width", 'virtue-toolkit' ), | |
| 299 | + 'desc' => __("Default is: 670 or 1140 on above or three row layouts (Note: just input number, example: 650)", 'virtue-toolkit' ), | |
| 300 | + 'id' => $prefix . 'posthead_width', | |
| 301 | + 'type' => 'text_small', | |
| 302 | + ) ); | |
| 303 | + $kttk_portfolio_post->add_field( array( | |
| 304 | + 'name' => __('Value 01 Title', 'virtue-toolkit'), | |
| 305 | + 'desc' => __('ex. Project Type:', 'virtue-toolkit'), | |
| 306 | + 'id' => $prefix . 'project_val01_title', | |
| 307 | + 'type' => 'text_medium', | |
| 308 | + ) ); | |
| 309 | + $kttk_portfolio_post->add_field( array( | |
| 310 | + 'name' => __('Value 01 Description', 'virtue-toolkit'), | |
| 311 | + 'desc' => __('ex. Character Illustration', 'virtue-toolkit'), | |
| 312 | + 'id' => $prefix . 'project_val01_description', | |
| 313 | + 'type' => 'text_medium', | |
| 314 | + ) ); | |
| 315 | + $kttk_portfolio_post->add_field( array( | |
| 316 | + 'name' => __('Value 02 Title', 'virtue-toolkit'), | |
| 317 | + 'desc' => __('ex. Skills Needed:', 'virtue-toolkit'), | |
| 318 | + 'id' => $prefix . 'project_val02_title', | |
| 319 | + 'type' => 'text_medium', | |
| 320 | + ) ); | |
| 321 | + $kttk_portfolio_post->add_field( array( | |
| 322 | + 'name' => __('Value 02 Description', 'virtue-toolkit'), | |
| 323 | + 'desc' => __('ex. Photoshop, Illustrator', 'virtue-toolkit'), | |
| 324 | + 'id' => $prefix . 'project_val02_description', | |
| 325 | + 'type' => 'text_medium', | |
| 326 | + ) ); | |
| 327 | + $kttk_portfolio_post->add_field( array( | |
| 328 | + 'name' => __('Value 03 Title', 'virtue-toolkit'), | |
| 329 | + 'desc' => __('ex. Customer:', 'virtue-toolkit'), | |
| 330 | + 'id' => $prefix . 'project_val03_title', | |
| 331 | + 'type' => 'text_medium', | |
| 332 | + ) ); | |
| 333 | + $kttk_portfolio_post->add_field( array( | |
| 334 | + 'name' => __('Value 03 Description', 'virtue-toolkit'), | |
| 335 | + 'desc' => __('ex. Example Inc', 'virtue-toolkit'), | |
| 336 | + 'id' => $prefix . 'project_val03_description', | |
| 337 | + 'type' => 'text_medium', | |
| 338 | + ) ); | |
| 339 | + $kttk_portfolio_post->add_field( array( | |
| 340 | + 'name' => __('Value 04 Title', 'virtue-toolkit'), | |
| 341 | + 'desc' => __('ex. Project Year:', 'virtue-toolkit'), | |
| 342 | + 'id' => $prefix . 'project_val04_title', | |
| 343 | + 'type' => 'text_medium', | |
| 344 | + ) ); | |
| 345 | + $kttk_portfolio_post->add_field( array( | |
| 346 | + 'name' => __('Value 04 Description', 'virtue-toolkit'), | |
| 347 | + 'desc' => __('ex. 2013', 'virtue-toolkit'), | |
| 348 | + 'id' => $prefix . 'project_val04_description', | |
| 349 | + 'type' => 'text_medium', | |
| 350 | + ) ); | |
| 351 | + $kttk_portfolio_post->add_field( array( | |
| 352 | + 'name' => __('External Website', 'virtue-toolkit'), | |
| 353 | + 'desc' => __('ex. Website:', 'virtue-toolkit'), | |
| 354 | + 'id' => $prefix . 'project_val05_title', | |
| 355 | + 'type' => 'text_medium', | |
| 356 | + ) ); | |
| 357 | + $kttk_portfolio_post->add_field( array( | |
| 358 | + 'name' => __('Website Address', 'virtue-toolkit'), | |
| 359 | + 'desc' => __('ex. http://www.example.com', 'virtue-toolkit'), | |
| 360 | + 'id' => $prefix . 'project_val05_description', | |
| 361 | + 'type' => 'text_medium', | |
| 362 | + ) ); | |
| 363 | + $kttk_portfolio_post->add_field( array( | |
| 364 | + 'name' => __('If Video Project', 'virtue-toolkit'), | |
| 365 | + 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'virtue-toolkit'), | |
| 366 | + 'id' => $prefix . 'post_video', | |
| 367 | + 'type' => 'textarea_code', | |
| 368 | + 'options' => array( 'disable_codemirror' => true ), | |
| 369 | + ) ); | |
| 370 | + | |
| 371 | + // Portfolio Post Carousel | |
| 372 | + $kttk_portfolio_post_carousel = new_cmb2_box( array( | |
| 373 | + 'id' => 'portfolio_post_carousel_metabox', | |
| 374 | + 'title' => __( "Bottom Carousel Options", 'virtue-toolkit' ), | |
| 375 | + 'object_types' => array( 'portfolio'), | |
| 376 | + 'priority' => 'high', | |
| 377 | + ) ); | |
| 378 | + $kttk_portfolio_post_carousel->add_field( array( | |
| 379 | + 'name' => __("Carousel Title", 'virtue-toolkit' ), | |
| 380 | + 'desc' => __('ex. Similar Projects', 'virtue-toolkit'), | |
| 381 | + 'id' => $prefix . 'portfolio_carousel_title', | |
| 382 | + 'type' => 'text_medium', | |
| 383 | + ) ); | |
| 384 | + $kttk_portfolio_post_carousel->add_field( array( | |
| 385 | + 'name' => __("Bottom Portfolio Carousel", 'virtue-toolkit' ), | |
| 386 | + 'desc' => __('Display a carousel with portfolio items below project?', 'virtue-toolkit'), | |
| 387 | + 'id' => $prefix . 'portfolio_carousel_recent', | |
| 388 | + 'type' => 'select', | |
| 389 | + 'options' => array( | |
| 390 | + 'defualt' => __("Default", 'virtue-toolkit' ), | |
| 391 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 392 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 393 | + ), | |
| 394 | + ) ); | |
| 395 | + $kttk_portfolio_post_carousel->add_field( array( | |
| 396 | + 'name' => __("Carousel Items", 'virtue-toolkit' ), | |
| 397 | + 'desc' => '', | |
| 398 | + 'id' => $prefix . 'portfolio_carousel_group', | |
| 399 | + 'type' => 'select', | |
| 400 | + 'options' => array( | |
| 401 | + 'defualt' => __("Default", 'virtue-toolkit' ), | |
| 402 | + 'all' => __("All Portfolio Posts", 'virtue-toolkit' ), | |
| 403 | + 'cat' => __("Only of same Portfolio Type", 'virtue-toolkit' ), | |
| 404 | + ), | |
| 405 | + ) ); | |
| 406 | + $kttk_portfolio_post_carousel->add_field( array( | |
| 407 | + 'name' => __("Carousel Order", 'virtue-toolkit' ), | |
| 408 | + 'desc' => '', | |
| 409 | + 'id' => $prefix . 'portfolio_carousel_order', | |
| 410 | + 'type' => 'select', | |
| 411 | + 'options' => array( | |
| 412 | + 'menu_order' => __("Menu Order", 'virtue-toolkit' ), | |
| 413 | + 'title' => __("Title", 'virtue-toolkit' ), | |
| 414 | + 'date' => __("Date", 'virtue-toolkit' ), | |
| 415 | + 'rand' => __("Random", 'virtue-toolkit' ), | |
| 416 | + ), | |
| 417 | + ) ); | |
| 418 | + | |
| 419 | + // Portfolio Grid Page | |
| 420 | + $kttk_portfolio_page = new_cmb2_box( array( | |
| 421 | + 'id' => 'portfolio_metabox', | |
| 422 | + 'title' => __( "Portfolio Page Options", 'virtue-toolkit' ), | |
| 423 | + 'object_types' => array( 'page'), | |
| 424 | + 'show_on' => array( 'key' => 'page-template', 'value' => 'template-portfolio-grid.php' ), | |
| 425 | + 'priority' => 'high', | |
| 426 | + ) ); | |
| 427 | + $kttk_portfolio_page->add_field( array( | |
| 428 | + 'name' => __("Style", 'virtue-toolkit' ), | |
| 429 | + 'desc' => '', | |
| 430 | + 'id' => $prefix . 'portfolio_style', | |
| 431 | + 'type' => 'select', | |
| 432 | + 'options' => array( | |
| 433 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 434 | + 'padded_style' => __("Post Boxes", 'virtue-toolkit' ), | |
| 435 | + 'flat-w-margin' => __("Flat with Margin", 'virtue-toolkit' ), | |
| 436 | + ), | |
| 437 | + ) ); | |
| 438 | + $kttk_portfolio_page->add_field( array( | |
| 439 | + 'name' => __("Hover Style", 'virtue-toolkit' ), | |
| 440 | + 'desc' => '', | |
| 441 | + 'id' => $prefix . 'portfolio_hover_style', | |
| 442 | + 'type' => 'select', | |
| 443 | + 'options' => array( | |
| 444 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 445 | + 'p_lightstyle' => __("Light", 'virtue-toolkit' ), | |
| 446 | + 'p_darkstyle' => __("Dark", 'virtue-toolkit' ), | |
| 447 | + 'p_primarystyle' => __("Primary Color", 'virtue-toolkit' ), | |
| 448 | + ), | |
| 449 | + ) ); | |
| 450 | + $kttk_portfolio_page->add_field( array( | |
| 451 | + 'name' => __("Columns", 'virtue-toolkit' ), | |
| 452 | + 'desc' => '', | |
| 453 | + 'id' => $prefix . 'portfolio_columns', | |
| 454 | + 'type' => 'select', | |
| 455 | + 'options' => array( | |
| 456 | + '4' => __("Four Column", 'virtue-toolkit' ), | |
| 457 | + '3' => __("Three Column", 'virtue-toolkit' ), | |
| 458 | + '2' => __("Two Column", 'virtue-toolkit' ), | |
| 459 | + '5' => __("Five Column", 'virtue-toolkit' ), | |
| 460 | + ), | |
| 461 | + ) ); | |
| 462 | + $kttk_portfolio_page->add_field( array( | |
| 463 | + 'name' => __("Portfolio Work Types", 'virtue-toolkit' ), | |
| 464 | + 'desc' => '', | |
| 465 | + 'id' => $prefix . 'portfolio_type', | |
| 466 | + 'type' => 'kttk_select_type', | |
| 467 | + 'taxonomy' => 'portfolio-type', | |
| 468 | + ) ); | |
| 469 | + $kttk_portfolio_page->add_field( array( | |
| 470 | + 'name' => __("Order Items By", 'virtue-toolkit' ), | |
| 471 | + 'desc' => '', | |
| 472 | + 'id' => $prefix . 'portfolio_order', | |
| 473 | + 'type' => 'select', | |
| 474 | + 'options' => array( | |
| 475 | + 'menu_order' => __("Menu Order", 'virtue-toolkit' ), | |
| 476 | + 'title' => __("Title", 'virtue-toolkit' ), | |
| 477 | + 'date' => __("Date", 'virtue-toolkit' ), | |
| 478 | + 'rand' => __("Random", 'virtue-toolkit' ), | |
| 479 | + ), | |
| 480 | + ) ); | |
| 481 | + $kttk_portfolio_page->add_field( array( | |
| 482 | + 'name' => __("Items per Page", 'virtue-toolkit' ), | |
| 483 | + 'desc' => __('How many portfolio items per page', 'virtue-toolkit'), | |
| 484 | + 'id' => $prefix . 'portfolio_items', | |
| 485 | + 'type' => 'select', | |
| 486 | + 'options' => array( | |
| 487 | + 'all' => __("All", 'virtue-toolkit' ), | |
| 488 | + '3' => __("3", 'virtue-toolkit' ), | |
| 489 | + '4' => __("4", 'virtue-toolkit' ), | |
| 490 | + '5' => __("5", 'virtue-toolkit' ), | |
| 491 | + '6' => __("6", 'virtue-toolkit' ), | |
| 492 | + '7' => __("7", 'virtue-toolkit' ), | |
| 493 | + '8' => __("8", 'virtue-toolkit' ), | |
| 494 | + '9' => __("9", 'virtue-toolkit' ), | |
| 495 | + '10' => __("10", 'virtue-toolkit' ), | |
| 496 | + '11' => __("11", 'virtue-toolkit' ), | |
| 497 | + '12' => __("12", 'virtue-toolkit' ), | |
| 498 | + '13' => __("13", 'virtue-toolkit' ), | |
| 499 | + '14' => __("14", 'virtue-toolkit' ), | |
| 500 | + '15' => __("15", 'virtue-toolkit' ), | |
| 501 | + '16' => __("16", 'virtue-toolkit' ), | |
| 502 | + ), | |
| 503 | + ) ); | |
| 504 | + $kttk_portfolio_page->add_field( array( | |
| 505 | + 'name' => __("Image Ratio?", 'virtue-toolkit' ), | |
| 506 | + 'desc' => '', | |
| 507 | + 'id' => $prefix . 'portfolio_img_ratio', | |
| 508 | + 'type' => 'select', | |
| 509 | + 'options' => array( | |
| 510 | + 'menu_order' => __("Default", 'virtue-toolkit' ), | |
| 511 | + 'square' => __("Square 1:1", 'virtue-toolkit' ), | |
| 512 | + 'portrait' => __("Portrait 3:4", 'virtue-toolkit' ), | |
| 513 | + 'landscape' => __("Landscape 4:3", 'virtue-toolkit' ), | |
| 514 | + 'widelandscape' => __("Wide Landscape 4:2", 'virtue-toolkit' ), | |
| 515 | + ), | |
| 516 | + ) ); | |
| 517 | + $kttk_portfolio_page->add_field( array( | |
| 518 | + 'name' => __('Display Item Work Types', 'virtue-toolkit'), | |
| 519 | + 'desc' => '', | |
| 520 | + 'id' => $prefix . 'portfolio_item_types', | |
| 521 | + 'type' => 'checkbox', | |
| 522 | + ) ); | |
| 523 | + $kttk_portfolio_page->add_field( array( | |
| 524 | + 'name' => __('Display Item Excerpt', 'virtue-toolkit'), | |
| 525 | + 'desc' => '', | |
| 526 | + 'id' => $prefix . 'portfolio_item_excerpt', | |
| 527 | + 'type' => 'checkbox', | |
| 528 | + ) ); | |
| 529 | + $kttk_portfolio_page->add_field( array( | |
| 530 | + 'name' => __('Add Lightbox link in each item', 'virtue-toolkit'), | |
| 531 | + 'desc' => '', | |
| 532 | + 'id' => $prefix . 'portfolio_lightbox', | |
| 533 | + 'type' => 'checkbox', | |
| 534 | + ) ); | |
| 535 | + | |
| 536 | + // Page Feature | |
| 537 | + $kttk_feature_page = new_cmb2_box( array( | |
| 538 | + 'id' => 'pagefeature_metabox', | |
| 539 | + 'title' => __( "Feature Page Options", 'virtue-toolkit' ), | |
| 540 | + 'object_types' => array( 'page' ), | |
| 541 | + 'show_on' => array( 'key' => 'page-template', 'value' => 'template-feature.php' ), | |
| 542 | + 'priority' => 'high', | |
| 543 | + ) ); | |
| 544 | + $kttk_feature_page->add_field( array( | |
| 545 | + 'name' => __("Header Options", 'virtue-toolkit' ), | |
| 546 | + 'desc' => __('If image slider make sure images uploaded are at-least 1170px wide.', 'virtue-toolkit'), | |
| 547 | + 'id' => $prefix . 'page_head', | |
| 548 | + 'type' => 'select', | |
| 549 | + 'default' => 'pagetitle', | |
| 550 | + 'options' => array( | |
| 551 | + 'pagetitle' => __("Page Title", 'virtue-toolkit' ), | |
| 552 | + 'flex' => __("Image Slider (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 553 | + 'carousel' => __("Image Slider (Different Image Ratio)", 'virtue-toolkit' ), | |
| 554 | + 'video' => __("Flat with Margin", 'virtue-toolkit' ), | |
| 555 | + ), | |
| 556 | + ) ); | |
| 557 | + $kttk_feature_page->add_field( array( | |
| 558 | + 'name' => __("Slider Images", 'virtue-toolkit' ), | |
| 559 | + 'desc' => __("Add images for post here", 'virtue-toolkit' ), | |
| 560 | + 'id' => $prefix . 'image_gallery', | |
| 561 | + 'type' => 'kad_gallery', | |
| 562 | + ) ); | |
| 563 | + $kttk_feature_page->add_field( array( | |
| 564 | + 'name' => __("Max Image/Slider Height", 'virtue-toolkit' ), | |
| 565 | + 'desc' => __("Default is: 400 (Note: just input number, example: 350)", 'virtue-toolkit' ), | |
| 566 | + 'id' => $prefix . 'posthead_height', | |
| 567 | + 'type' => 'text_small', | |
| 568 | + ) ); | |
| 569 | + $kttk_feature_page->add_field( array( | |
| 570 | + 'name' => __("Max Image/Slider Width", 'virtue-toolkit' ), | |
| 571 | + 'desc' => __("Default is: 1140 (Note: just input number, example: 650)", 'virtue-toolkit' ), | |
| 572 | + 'id' => $prefix . 'posthead_width', | |
| 573 | + 'type' => 'text_small', | |
| 574 | + ) ); | |
| 575 | + $kttk_feature_page->add_field( array( | |
| 576 | + 'name' => __("If Video Post", 'virtue-toolkit' ), | |
| 577 | + 'desc' => __("Place Embed Code Here, works with youtube, vimeo.", 'virtue-toolkit' ), | |
| 578 | + 'id' => $prefix . 'post_video', | |
| 579 | + 'type' => 'textarea_code', | |
| 580 | + 'options' => array( 'disable_codemirror' => true ), | |
| 581 | + ) ); | |
| 582 | + | |
| 583 | + // Contact Page | |
| 584 | + $kttk_contact_page = new_cmb2_box( array( | |
| 585 | + 'id' => 'contact_metabox', | |
| 586 | + 'title' => __( "Contact Page Options", 'virtue-toolkit' ), | |
| 587 | + 'object_types' => array( 'page' ), | |
| 588 | + 'show_on' => array( 'key' => 'page-template', 'value' => 'template-contact.php' ), | |
| 589 | + 'priority' => 'high', | |
| 590 | + ) ); | |
| 591 | + $kttk_contact_page->add_field( array( | |
| 592 | + 'name' => __("Use Contact Form", 'virtue-toolkit' ), | |
| 593 | + 'desc' => '', | |
| 594 | + 'id' => $prefix . 'contact_form', | |
| 595 | + 'type' => 'select', | |
| 596 | + 'options' => array( | |
| 597 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 598 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 599 | + ), | |
| 600 | + ) ); | |
| 601 | + $kttk_contact_page->add_field( array( | |
| 602 | + 'name' => __("Contact Form Title", 'virtue-toolkit' ), | |
| 603 | + 'desc' => __('ex. Send us an Email', 'virtue-toolkit'), | |
| 604 | + 'id' => $prefix . 'contact_form_title', | |
| 605 | + 'type' => 'text', | |
| 606 | + ) ); | |
| 607 | + $kttk_contact_page->add_field( array( | |
| 608 | + 'name' => __("Contact Form Email Recipient", 'virtue-toolkit' ), | |
| 609 | + 'desc' => __('ex. [email protected]', 'virtue-toolkit'), | |
| 610 | + 'id' => $prefix . 'contact_form_email', | |
| 611 | + 'type' => 'text', | |
| 612 | + ) ); | |
| 613 | + $kttk_contact_page->add_field( array( | |
| 614 | + 'name' => __("Use Simple Math Question", 'virtue-toolkit' ), | |
| 615 | + 'desc' => __('Adds a simple math question to form.', 'virtue-toolkit'), | |
| 616 | + 'id' => $prefix . 'contact_form_math', | |
| 617 | + 'type' => 'select', | |
| 618 | + 'options' => array( | |
| 619 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 620 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 621 | + ), | |
| 622 | + ) ); | |
| 623 | + $kttk_contact_page->add_field( array( | |
| 624 | + 'name' => __("Use Map", 'virtue-toolkit' ), | |
| 625 | + 'desc' => __('You need free api for google maps to work, add in the theme options > misc settings.', 'virtue-toolkit'), | |
| 626 | + 'id' => $prefix . 'contact_map', | |
| 627 | + 'type' => 'select', | |
| 628 | + 'options' => array( | |
| 629 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 630 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 631 | + ), | |
| 632 | + ) ); | |
| 633 | + $kttk_contact_page->add_field( array( | |
| 634 | + 'name' => __("Address", 'virtue-toolkit' ), | |
| 635 | + 'desc' => __('Enter your Location', 'virtue-toolkit'), | |
| 636 | + 'id' => $prefix . 'contact_address', | |
| 637 | + 'type' => 'text', | |
| 638 | + ) ); | |
| 639 | + $kttk_contact_page->add_field( array( | |
| 640 | + 'name' => __("Map Type", 'virtue-toolkit' ), | |
| 641 | + 'desc' => '', | |
| 642 | + 'id' => $prefix . 'contact_maptype', | |
| 643 | + 'type' => 'select', | |
| 644 | + 'options' => array( | |
| 645 | + 'ROADMAP' => __("ROADMAP", 'virtue-toolkit' ), | |
| 646 | + 'HYBRID' => __("HYBRID", 'virtue-toolkit' ), | |
| 647 | + 'TERRAIN' => __("TERRAIN", 'virtue-toolkit' ), | |
| 648 | + 'SATELLITE' => __("SATELLITE", 'virtue-toolkit' ), | |
| 649 | + ), | |
| 650 | + ) ); | |
| 651 | + $kttk_contact_page->add_field( array( | |
| 652 | + 'name' => __("Map Zoom Level", 'virtue-toolkit' ), | |
| 653 | + 'desc' => __('A good place to start is 15', 'virtue-toolkit'), | |
| 654 | + 'id' => $prefix . 'contact_zoom', | |
| 655 | + 'type' => 'select', | |
| 656 | + 'options' => array( | |
| 657 | + '1' => __("1 (World View)", 'virtue-toolkit' ), | |
| 658 | + '2' => __("2", 'virtue-toolkit' ), | |
| 659 | + '3' => __("3", 'virtue-toolkit' ), | |
| 660 | + '4' => __("4", 'virtue-toolkit' ), | |
| 661 | + '5' => __("5", 'virtue-toolkit' ), | |
| 662 | + '6' => __("6", 'virtue-toolkit' ), | |
| 663 | + '7' => __("7", 'virtue-toolkit' ), | |
| 664 | + '8' => __("8", 'virtue-toolkit' ), | |
| 665 | + '9' => __("9", 'virtue-toolkit' ), | |
| 666 | + '10' => __("10", 'virtue-toolkit' ), | |
| 667 | + '11' => __("11", 'virtue-toolkit' ), | |
| 668 | + '12' => __("12", 'virtue-toolkit' ), | |
| 669 | + '13' => __("13", 'virtue-toolkit' ), | |
| 670 | + '14' => __("14", 'virtue-toolkit' ), | |
| 671 | + '15' => __("15", 'virtue-toolkit' ), | |
| 672 | + '16' => __("16", 'virtue-toolkit' ), | |
| 673 | + '17' => __("17", 'virtue-toolkit' ), | |
| 674 | + '18' => __("18", 'virtue-toolkit' ), | |
| 675 | + '19' => __("19", 'virtue-toolkit' ), | |
| 676 | + '20' => __("20", 'virtue-toolkit' ), | |
| 677 | + '21' => __("21 (Street View)", 'virtue-toolkit' ), | |
| 678 | + ), | |
| 679 | + ) ); | |
| 680 | + $kttk_contact_page->add_field( array( | |
| 681 | + 'name' => __("Map Height", 'virtue-toolkit' ), | |
| 682 | + 'desc' => __('Default is 300', 'virtue-toolkit'), | |
| 683 | + 'id' => $prefix . 'contact_mapheight', | |
| 684 | + 'type' => 'text_small', | |
| 685 | + ) ); | |
| 686 | + | |
| 680 | 687 | } |
| 681 | 688 | |
| 682 | 689 | |
| 683 | -$the_theme = wp_get_theme(); | |
| 684 | -if( ($the_theme->get( 'Name' ) == 'Virtue' || $the_theme->get( 'Template') == 'virtue') && ( $the_theme->get( 'Version') >= '2.3.5' ) ) { | |
| 685 | -add_filter( 'cmb_meta_boxes', 'kadence_virtuetoolkit_metaboxes', 100 ); | |
| 690 | +function kadence_toolkit_virtue_metaboxes() { | |
| 691 | + | |
| 692 | + $prefix = '_kad_'; | |
| 693 | + | |
| 694 | + $kttk_page_subtitle = new_cmb2_box( array( | |
| 695 | + 'id' => 'subtitle_metabox', | |
| 696 | + 'title' => __( 'Page Title and Subtitle', 'virtue-toolkit' ), | |
| 697 | + 'object_types' => array( 'page' ), | |
| 698 | + 'priority' => 'high', | |
| 699 | + ) ); | |
| 700 | + $kttk_page_subtitle->add_field( array( | |
| 701 | + 'name' => __( 'Subtitle', 'virtue-toolkit' ), | |
| 702 | + 'desc' => __( 'Subtitle will go below page title', 'virtue-toolkit' ), | |
| 703 | + 'id' => $prefix . 'subtitle', | |
| 704 | + 'type' => 'textarea_small', | |
| 705 | + ) ); | |
| 706 | + | |
| 707 | + // Video Post | |
| 708 | + $kttk_video_post = new_cmb2_box( array( | |
| 709 | + 'id' => 'post_video_metabox', | |
| 710 | + 'title' => __( "Post Video Box", 'virtue-toolkit' ), | |
| 711 | + 'object_types' => array( 'post' ), | |
| 712 | + 'priority' => 'high', | |
| 713 | + ) ); | |
| 714 | + $kttk_video_post->add_field( array( | |
| 715 | + 'name' => __("If Video Post", 'virtue-toolkit' ), | |
| 716 | + 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'virtue-toolkit'), | |
| 717 | + 'id' => $prefix . 'post_video', | |
| 718 | + 'type' => 'textarea_code', | |
| 719 | + 'options' => array( 'disable_codemirror' => true ), | |
| 720 | + ) ); | |
| 721 | + | |
| 722 | + // Portfolio Post | |
| 723 | + $kttk_portfolio_post = new_cmb2_box( array( | |
| 724 | + 'id' => 'portfolio_post_metabox', | |
| 725 | + 'title' => __( "Portfolio Post Options", 'virtue-toolkit' ), | |
| 726 | + 'object_types' => array( 'portfolio' ), | |
| 727 | + 'priority' => 'high', | |
| 728 | + ) ); | |
| 729 | + $kttk_portfolio_post->add_field( array( | |
| 730 | + 'name' => __("Project Layout", 'virtue-toolkit' ), | |
| 731 | + 'desc' => '<a href="http://docs.kadencethemes.com/virtue-free/portfolio-posts/" target="_new" >Whats the difference?</a>', | |
| 732 | + 'id' => $prefix . 'ppost_layout', | |
| 733 | + 'type' => 'radio_inline', | |
| 734 | + 'options' => array( | |
| 735 | + 'beside' => __("Beside", 'virtue-toolkit' ), | |
| 736 | + 'above' => __("Above", 'virtue-toolkit' ), | |
| 737 | + 'three' => __("Three Rows", 'virtue-toolkit' ), | |
| 738 | + ), | |
| 739 | + ) ); | |
| 740 | + $kttk_portfolio_post->add_field( array( | |
| 741 | + 'name' => __("Project Options", 'virtue-toolkit' ), | |
| 742 | + 'desc' => '', | |
| 743 | + 'id' => $prefix . 'ppost_type', | |
| 744 | + 'type' => 'select', | |
| 745 | + 'options' => array( | |
| 746 | + 'image' => __("Image", 'virtue-toolkit' ), | |
| 747 | + 'flex' => __("Image Slider", 'virtue-toolkit' ), | |
| 748 | + 'carousel' => __("Carousel Slider", 'virtue-toolkit' ), | |
| 749 | + 'imagegrid' => __("Image Grid", 'virtue-toolkit' ), | |
| 750 | + 'video' => __("Video", 'virtue-toolkit' ), | |
| 751 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 752 | + ), | |
| 753 | + ) ); | |
| 754 | + $kttk_portfolio_post->add_field( array( | |
| 755 | + 'name' => __("Columns (Only for Image Grid option)", 'virtue-toolkit' ), | |
| 756 | + 'desc' => '', | |
| 757 | + 'id' => $prefix . 'portfolio_img_grid_columns', | |
| 758 | + 'type' => 'select', | |
| 759 | + 'options' => array( | |
| 760 | + '4' => __("Four Column", 'virtue-toolkit' ), | |
| 761 | + '3' => __("Three Column", 'virtue-toolkit' ), | |
| 762 | + '2' => __("Two Column", 'virtue-toolkit' ), | |
| 763 | + '5' => __("Five Column", 'virtue-toolkit' ), | |
| 764 | + '6' => __("Six Column", 'virtue-toolkit' ), | |
| 765 | + ), | |
| 766 | + ) ); | |
| 767 | + $kttk_portfolio_post->add_field( array( | |
| 768 | + 'name' => __("Max Image/Slider Height", 'virtue-toolkit' ), | |
| 769 | + 'desc' => __("Default is: 450 <b>(Note: just input number, example: 350)</b>", 'virtue-toolkit' ), | |
| 770 | + 'id' => $prefix . 'posthead_height', | |
| 771 | + 'type' => 'text_small', | |
| 772 | + ) ); | |
| 773 | + $kttk_portfolio_post->add_field( array( | |
| 774 | + 'name' => __("Max Image/Slider Width", 'virtue-toolkit' ), | |
| 775 | + 'desc' => __("Default is: 670 or 1140 on <b>above</b> or <b>three row</b> layouts (Note: just input number, example: 650)</b>", 'virtue-toolkit' ), | |
| 776 | + 'id' => $prefix . 'posthead_width', | |
| 777 | + 'type' => 'text_small', | |
| 778 | + ) ); | |
| 779 | + $kttk_portfolio_post->add_field( array( | |
| 780 | + 'name' => __("Auto Play Slider?", 'virtue-toolkit' ), | |
| 781 | + 'desc' => '', | |
| 782 | + 'id' => $prefix . 'portfolio_autoplay', | |
| 783 | + 'type' => 'select', | |
| 784 | + 'options' => array( | |
| 785 | + 'Yes' => __("Yes", 'virtue-toolkit' ), | |
| 786 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 787 | + ), | |
| 788 | + ) ); | |
| 789 | + $kttk_portfolio_post->add_field( array( | |
| 790 | + 'name' => __("Value 01 Title", 'virtue-toolkit' ), | |
| 791 | + 'desc' => __('ex. Project Type:', 'virtue-toolkit'), | |
| 792 | + 'id' => $prefix . 'project_val01_title', | |
| 793 | + 'type' => 'text_medium', | |
| 794 | + ) ); | |
| 795 | + $kttk_portfolio_post->add_field( array( | |
| 796 | + 'name' => __("Value 01 Description", 'virtue-toolkit' ), | |
| 797 | + 'desc' => __('ex. Character Illustration', 'virtue-toolkit'), | |
| 798 | + 'id' => $prefix . 'project_val01_description', | |
| 799 | + 'type' => 'text_medium', | |
| 800 | + ) ); | |
| 801 | + $kttk_portfolio_post->add_field( array( | |
| 802 | + 'name' => __("Value 02 Title", 'virtue-toolkit' ), | |
| 803 | + 'desc' => __('ex. Skills Needed:', 'virtue-toolkit'), | |
| 804 | + 'id' => $prefix . 'project_val02_title', | |
| 805 | + 'type' => 'text_medium', | |
| 806 | + ) ); | |
| 807 | + $kttk_portfolio_post->add_field( array( | |
| 808 | + 'name' => __("Value 02 Description", 'virtue-toolkit' ), | |
| 809 | + 'desc' => __('ex. Photoshop, Illustrator', 'virtue-toolkit'), | |
| 810 | + 'id' => $prefix . 'project_val02_description', | |
| 811 | + 'type' => 'text_medium', | |
| 812 | + ) ); | |
| 813 | + $kttk_portfolio_post->add_field( array( | |
| 814 | + 'name' => __("Value 03 Title", 'virtue-toolkit' ), | |
| 815 | + 'desc' => __('ex. Customer:', 'virtue-toolkit'), | |
| 816 | + 'id' => $prefix . 'project_val03_title', | |
| 817 | + 'type' => 'text_medium', | |
| 818 | + ) ); | |
| 819 | + $kttk_portfolio_post->add_field( array( | |
| 820 | + 'name' => __("Value 03 Description", 'virtue-toolkit' ), | |
| 821 | + 'desc' => __('ex. Example Inc', 'virtue-toolkit'), | |
| 822 | + 'id' => $prefix . 'project_val03_description', | |
| 823 | + 'type' => 'text_medium', | |
| 824 | + ) ); | |
| 825 | + $kttk_portfolio_post->add_field( array( | |
| 826 | + 'name' => __("Value 04 Title", 'virtue-toolkit' ), | |
| 827 | + 'desc' => __('ex. Project Year:', 'virtue-toolkit'), | |
| 828 | + 'id' => $prefix . 'project_val04_title', | |
| 829 | + 'type' => 'text_medium', | |
| 830 | + ) ); | |
| 831 | + $kttk_portfolio_post->add_field( array( | |
| 832 | + 'name' => __("Value 04 Description", 'virtue-toolkit' ), | |
| 833 | + 'desc' => __('ex. 2013', 'virtue-toolkit'), | |
| 834 | + 'id' => $prefix . 'project_val04_description', | |
| 835 | + 'type' => 'text_medium', | |
| 836 | + ) ); | |
| 837 | + $kttk_portfolio_post->add_field( array( | |
| 838 | + 'name' => __("External Website", 'virtue-toolkit' ), | |
| 839 | + 'desc' => __('ex. Website:', 'virtue-toolkit'), | |
| 840 | + 'id' => $prefix . 'project_val05_title', | |
| 841 | + 'type' => 'text_medium', | |
| 842 | + ) ); | |
| 843 | + $kttk_portfolio_post->add_field( array( | |
| 844 | + 'name' => __("Website Address", 'virtue-toolkit' ), | |
| 845 | + 'desc' => __('ex. http://www.example.com', 'virtue-toolkit'), | |
| 846 | + 'id' => $prefix . 'project_val05_description', | |
| 847 | + 'type' => 'text_medium', | |
| 848 | + ) ); | |
| 849 | + $kttk_portfolio_post->add_field( array( | |
| 850 | + 'name' => __("If Video Project", 'virtue-toolkit' ), | |
| 851 | + 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'virtue-toolkit'), | |
| 852 | + 'id' => $prefix . 'post_video', | |
| 853 | + 'type' => 'textarea_code', | |
| 854 | + 'options' => array( 'disable_codemirror' => true ), | |
| 855 | + ) ); | |
| 856 | + $kttk_portfolio_post->add_field( array( | |
| 857 | + 'name' => __("Similar Portfolio Item Carousel", 'virtue-toolkit' ), | |
| 858 | + 'desc' => __('Display a carousel with similar portfolio items below project?', 'virtue-toolkit'), | |
| 859 | + 'id' => $prefix . 'portfolio_carousel_recent', | |
| 860 | + 'type' => 'select', | |
| 861 | + 'options' => array( | |
| 862 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 863 | + 'yes' => __("Yes - Display Recent Projects", 'virtue-toolkit' ), | |
| 864 | + ), | |
| 865 | + ) ); | |
| 866 | + $kttk_portfolio_post->add_field( array( | |
| 867 | + 'name' => __("Carousel Title", 'virtue-toolkit' ), | |
| 868 | + 'desc' => __('ex. Similar Projects', 'virtue-toolkit'), | |
| 869 | + 'id' => $prefix . 'portfolio_carousel_title', | |
| 870 | + 'type' => 'text_medium', | |
| 871 | + ) ); | |
| 872 | + | |
| 873 | + // Portfolio Page Grid | |
| 874 | + $kttk_portfolio_page = new_cmb2_box( array( | |
| 875 | + 'id' => 'portfolio_metabox', | |
| 876 | + 'title' => __( "Portfolio Page Options", 'virtue-toolkit' ), | |
| 877 | + 'object_types' => array( 'page' ), | |
| 878 | + 'show_on' => array( 'key' => 'page-template', 'value' => 'page-portfolio.php' ), | |
| 879 | + 'priority' => 'high', | |
| 880 | + ) ); | |
| 881 | + $kttk_portfolio_page->add_field( array( | |
| 882 | + 'name' => __("Columns", 'virtue-toolkit' ), | |
| 883 | + 'desc' => '', | |
| 884 | + 'id' => $prefix . 'portfolio_columns', | |
| 885 | + 'type' => 'select', | |
| 886 | + 'options' => array( | |
| 887 | + '4' => __("Four Column", 'virtue-toolkit' ), | |
| 888 | + '3' => __("Three Column", 'virtue-toolkit' ), | |
| 889 | + '2' => __("Two Column", 'virtue-toolkit' ), | |
| 890 | + ), | |
| 891 | + ) ); | |
| 892 | + $kttk_portfolio_page->add_field( array( | |
| 893 | + 'name' => __("Portfolio Work Types", 'virtue-toolkit' ), | |
| 894 | + 'desc' => '', | |
| 895 | + 'id' => $prefix . 'portfolio_type', | |
| 896 | + 'type' => 'kttk_select_type', | |
| 897 | + 'taxonomy' => 'portfolio-type', | |
| 898 | + ) ); | |
| 899 | + $kttk_portfolio_page->add_field( array( | |
| 900 | + 'name' => __("Order Items By", 'virtue-toolkit' ), | |
| 901 | + 'desc' => '', | |
| 902 | + 'id' => $prefix . 'portfolio_order', | |
| 903 | + 'type' => 'select', | |
| 904 | + 'options' => array( | |
| 905 | + 'menu_order' => __("Menu Order", 'virtue-toolkit' ), | |
| 906 | + 'title' => __("Title", 'virtue-toolkit' ), | |
| 907 | + 'date' => __("Date", 'virtue-toolkit' ), | |
| 908 | + 'rand' => __("Random", 'virtue-toolkit' ), | |
| 909 | + ), | |
| 910 | + ) ); | |
| 911 | + $kttk_portfolio_page->add_field( array( | |
| 912 | + 'name' => __("Items per Page", 'virtue-toolkit' ), | |
| 913 | + 'desc' => __('How many portfolio items per page', 'virtue-toolkit'), | |
| 914 | + 'id' => $prefix . 'portfolio_items', | |
| 915 | + 'type' => 'select', | |
| 916 | + 'options' => array( | |
| 917 | + 'all' => __("All", 'virtue-toolkit' ), | |
| 918 | + '3' => __("3", 'virtue-toolkit' ), | |
| 919 | + '4' => __("4", 'virtue-toolkit' ), | |
| 920 | + '5' => __("5", 'virtue-toolkit' ), | |
| 921 | + '6' => __("6", 'virtue-toolkit' ), | |
| 922 | + '7' => __("7", 'virtue-toolkit' ), | |
| 923 | + '8' => __("8", 'virtue-toolkit' ), | |
| 924 | + '9' => __("9", 'virtue-toolkit' ), | |
| 925 | + '10' => __("10", 'virtue-toolkit' ), | |
| 926 | + '11' => __("11", 'virtue-toolkit' ), | |
| 927 | + '12' => __("12", 'virtue-toolkit' ), | |
| 928 | + '13' => __("13", 'virtue-toolkit' ), | |
| 929 | + '14' => __("14", 'virtue-toolkit' ), | |
| 930 | + '15' => __("15", 'virtue-toolkit' ), | |
| 931 | + '16' => __("16", 'virtue-toolkit' ), | |
| 932 | + ), | |
| 933 | + ) ); | |
| 934 | + $kttk_portfolio_page->add_field( array( | |
| 935 | + 'name' => __("Set image height", 'virtue-toolkit' ), | |
| 936 | + 'desc' => __('Default is 1:1 ratio <b>(Note: just input number, example: 350)</b>', 'virtue-toolkit'), | |
| 937 | + 'id' => $prefix . 'portfolio_img_crop', | |
| 938 | + 'type' => 'text_small', | |
| 939 | + ) ); | |
| 940 | + $kttk_portfolio_page->add_field( array( | |
| 941 | + 'name' => __("Display Item Work Types", 'virtue-toolkit' ), | |
| 942 | + 'desc' => '', | |
| 943 | + 'id' => $prefix . 'portfolio_item_types', | |
| 944 | + 'type' => 'checkbox', | |
| 945 | + ) ); | |
| 946 | + $kttk_portfolio_page->add_field( array( | |
| 947 | + 'name' => __("Display Item Excerpt", 'virtue-toolkit' ), | |
| 948 | + 'desc' => '', | |
| 949 | + 'id' => $prefix . 'portfolio_item_excerpt', | |
| 950 | + 'type' => 'checkbox', | |
| 951 | + ) ); | |
| 952 | + $kttk_portfolio_page->add_field( array( | |
| 953 | + 'name' => __("Add Lightbox link in the top right of each item", 'virtue-toolkit' ), | |
| 954 | + 'desc' => '', | |
| 955 | + 'id' => $prefix . 'portfolio_lightbox', | |
| 956 | + 'type' => 'select', | |
| 957 | + 'options' => array( | |
| 958 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 959 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 960 | + ), | |
| 961 | + ) ); | |
| 962 | + | |
| 963 | + // Feature Page | |
| 964 | + $kttk_feature_page = new_cmb2_box( array( | |
| 965 | + 'id' => 'pagefeature_metabox', | |
| 966 | + 'title' => __( "Feature Page Options", 'virtue-toolkit' ), | |
| 967 | + 'object_types' => array( 'page' ), | |
| 968 | + 'show_on' => array( 'key' => 'page-template', 'value' => array( 'page-feature.php', 'page-feature-sidebar.php') ), | |
| 969 | + 'priority' => 'high', | |
| 970 | + ) ); | |
| 971 | + $kttk_feature_page->add_field( array( | |
| 972 | + 'name' => __("Feature Options", 'virtue-toolkit' ), | |
| 973 | + 'desc' => __('If image slider make sure images uploaded are at least 1140px wide.', 'virtue-toolkit'), | |
| 974 | + 'id' => $prefix . 'page_head', | |
| 975 | + 'type' => 'select', | |
| 976 | + 'options' => array( | |
| 977 | + 'flex' => __("Image Slider", 'virtue-toolkit' ), | |
| 978 | + 'video' => __("Video", 'virtue-toolkit' ), | |
| 979 | + 'image' => __("Image", 'virtue-toolkit' ), | |
| 980 | + ), | |
| 981 | + ) ); | |
| 982 | + $kttk_feature_page->add_field( array( | |
| 983 | + 'name' => __("Slider Gallery", 'virtue-toolkit' ), | |
| 984 | + 'desc' => __('Add images for gallery here', 'virtue-toolkit'), | |
| 985 | + 'id' => $prefix . 'image_gallery', | |
| 986 | + 'type' => 'kad_gallery', | |
| 987 | + ) ); | |
| 988 | + $kttk_feature_page->add_field( array( | |
| 989 | + 'name' => __("Max Image/Slider Height", 'virtue-toolkit' ), | |
| 990 | + 'desc' => __('Default is: 400 <b>(Note: just input number, example: 350)</b>', 'virtue-toolkit'), | |
| 991 | + 'id' => $prefix . 'posthead_height', | |
| 992 | + 'type' => 'text_small', | |
| 993 | + ) ); | |
| 994 | + $kttk_feature_page->add_field( array( | |
| 995 | + 'name' => __("Max Image/Slider Width", 'virtue-toolkit' ), | |
| 996 | + 'desc' => __('Default is: 1140 <b>(Note: just input number, example: 650, does not apply to Carousel slider)</b>', 'virtue-toolkit'), | |
| 997 | + 'id' => $prefix . 'posthead_width', | |
| 998 | + 'type' => 'text_small', | |
| 999 | + ) ); | |
| 1000 | + $kttk_feature_page->add_field( array( | |
| 1001 | + 'name' => __("Use Lightbox for Feature Image", 'virtue-toolkit' ), | |
| 1002 | + 'desc' => __('If feature option is set to image, choose to use lightbox link with image.', 'virtue-toolkit'), | |
| 1003 | + 'id' => $prefix . 'feature_img_lightbox', | |
| 1004 | + 'type' => 'select', | |
| 1005 | + 'options' => array( | |
| 1006 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 1007 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 1008 | + ), | |
| 1009 | + ) ); | |
| 1010 | + $kttk_feature_page->add_field( array( | |
| 1011 | + 'name' => __("If Video Post", 'virtue-toolkit' ), | |
| 1012 | + 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'virtue-toolkit'), | |
| 1013 | + 'id' => $prefix . 'post_video', | |
| 1014 | + 'type' => 'textarea_code', | |
| 1015 | + 'options' => array( 'disable_codemirror' => true ), | |
| 1016 | + ) ); | |
| 1017 | + | |
| 1018 | + // Contact Page | |
| 1019 | + $kttk_contact_page = new_cmb2_box( array( | |
| 1020 | + 'id' => 'contact_metabox', | |
| 1021 | + 'title' => __( "Contact Page Options", 'virtue-toolkit' ), | |
| 1022 | + 'object_types' => array( 'page' ), | |
| 1023 | + 'show_on' => array( 'key' => 'page-template', 'value' => 'page-contact.php' ), | |
| 1024 | + 'priority' => 'high', | |
| 1025 | + ) ); | |
| 1026 | + $kttk_contact_page->add_field( array( | |
| 1027 | + 'name' => __("Use Contact Form", 'virtue-toolkit' ), | |
| 1028 | + 'desc' => '', | |
| 1029 | + 'id' => $prefix . 'contact_form', | |
| 1030 | + 'type' => 'select', | |
| 1031 | + 'options' => array( | |
| 1032 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 1033 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 1034 | + ), | |
| 1035 | + ) ); | |
| 1036 | + $kttk_contact_page->add_field( array( | |
| 1037 | + 'name' => __("Contact Form Title", 'virtue-toolkit' ), | |
| 1038 | + 'desc' => __('ex. Send us an Email', 'virtue-toolkit'), | |
| 1039 | + 'id' => $prefix . 'contact_form_title', | |
| 1040 | + 'type' => 'text', | |
| 1041 | + ) ); | |
| 1042 | + $kttk_contact_page->add_field( array( | |
| 1043 | + 'name' => __("Use Simple Math Question", 'virtue-toolkit' ), | |
| 1044 | + 'desc' => __('Adds a simple math question to form.', 'virtue-toolkit'), | |
| 1045 | + 'id' => $prefix . 'contact_form_math', | |
| 1046 | + 'type' => 'select', | |
| 1047 | + 'options' => array( | |
| 1048 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 1049 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 1050 | + ), | |
| 1051 | + ) ); | |
| 1052 | + $kttk_contact_page->add_field( array( | |
| 1053 | + 'name' => __("Use Map", 'virtue-toolkit' ), | |
| 1054 | + 'desc' => __('You need free api for google maps to work, add in the theme options > misc settings.', 'virtue-toolkit'), | |
| 1055 | + 'id' => $prefix . 'contact_map', | |
| 1056 | + 'type' => 'select', | |
| 1057 | + 'options' => array( | |
| 1058 | + 'no' => __("No", 'virtue-toolkit' ), | |
| 1059 | + 'yes' => __("Yes", 'virtue-toolkit' ), | |
| 1060 | + ), | |
| 1061 | + ) ); | |
| 1062 | + $kttk_contact_page->add_field( array( | |
| 1063 | + 'name' => __("Address", 'virtue-toolkit' ), | |
| 1064 | + 'desc' => __('Enter your Location', 'virtue-toolkit'), | |
| 1065 | + 'id' => $prefix . 'contact_address', | |
| 1066 | + 'type' => 'text', | |
| 1067 | + ) ); | |
| 1068 | + $kttk_contact_page->add_field( array( | |
| 1069 | + 'name' => __("Map Type", 'virtue-toolkit' ), | |
| 1070 | + 'desc' => '', | |
| 1071 | + 'id' => $prefix . 'contact_maptype', | |
| 1072 | + 'type' => 'select', | |
| 1073 | + 'options' => array( | |
| 1074 | + 'ROADMAP' => __("ROADMAP", 'virtue-toolkit' ), | |
| 1075 | + 'HYBRID' => __("HYBRID", 'virtue-toolkit' ), | |
| 1076 | + 'TERRAIN' => __("TERRAIN", 'virtue-toolkit' ), | |
| 1077 | + 'SATELLITE' => __("SATELLITE", 'virtue-toolkit' ), | |
| 1078 | + ), | |
| 1079 | + ) ); | |
| 1080 | + $kttk_contact_page->add_field( array( | |
| 1081 | + 'name' => __("Map Zoom Level", 'virtue-toolkit' ), | |
| 1082 | + 'desc' => __('A good place to start is 15', 'virtue-toolkit'), | |
| 1083 | + 'id' => $prefix . 'contact_zoom', | |
| 1084 | + 'type' => 'select', | |
| 1085 | + 'options' => array( | |
| 1086 | + '1' => __("1 (World View)", 'virtue-toolkit' ), | |
| 1087 | + '2' => __("2", 'virtue-toolkit' ), | |
| 1088 | + '3' => __("3", 'virtue-toolkit' ), | |
| 1089 | + '4' => __("4", 'virtue-toolkit' ), | |
| 1090 | + '5' => __("5", 'virtue-toolkit' ), | |
| 1091 | + '6' => __("6", 'virtue-toolkit' ), | |
| 1092 | + '7' => __("7", 'virtue-toolkit' ), | |
| 1093 | + '8' => __("8", 'virtue-toolkit' ), | |
| 1094 | + '9' => __("9", 'virtue-toolkit' ), | |
| 1095 | + '10' => __("10", 'virtue-toolkit' ), | |
| 1096 | + '11' => __("11", 'virtue-toolkit' ), | |
| 1097 | + '12' => __("12", 'virtue-toolkit' ), | |
| 1098 | + '13' => __("13", 'virtue-toolkit' ), | |
| 1099 | + '14' => __("14", 'virtue-toolkit' ), | |
| 1100 | + '15' => __("15", 'virtue-toolkit' ), | |
| 1101 | + '16' => __("16", 'virtue-toolkit' ), | |
| 1102 | + '17' => __("17", 'virtue-toolkit' ), | |
| 1103 | + '18' => __("18", 'virtue-toolkit' ), | |
| 1104 | + '19' => __("19", 'virtue-toolkit' ), | |
| 1105 | + '20' => __("20", 'virtue-toolkit' ), | |
| 1106 | + '21' => __("21 (Street View)", 'virtue-toolkit' ), | |
| 1107 | + ), | |
| 1108 | + ) ); | |
| 1109 | + $kttk_contact_page->add_field( array( | |
| 1110 | + 'name' => __("Map Height", 'virtue-toolkit' ), | |
| 1111 | + 'desc' => __('Default is 300', 'virtue-toolkit'), | |
| 1112 | + 'id' => $prefix . 'contact_mapheight', | |
| 1113 | + 'type' => 'text_small', | |
| 1114 | + ) ); | |
| 1115 | + | |
| 1116 | + // Gallery Post | |
| 1117 | + $kttk_gallery_post = new_cmb2_box( array( | |
| 1118 | + 'id' => 'virtue_post_gallery', | |
| 1119 | + 'title' => __( "Slider Images", 'virtue-toolkit' ), | |
| 1120 | + 'object_types' => array( 'post', 'portfolio' ), | |
| 1121 | + 'priority' => 'high', | |
| 1122 | + ) ); | |
| 1123 | + $kttk_gallery_post->add_field( array( | |
| 1124 | + 'name' => __("Slider Gallery", 'virtue-toolkit' ), | |
| 1125 | + 'desc' => __('Add images for gallery here', 'virtue-toolkit'), | |
| 1126 | + 'id' => $prefix . 'image_gallery', | |
| 1127 | + 'type' => 'kad_gallery', | |
| 1128 | + ) ); | |
| 1129 | + | |
| 686 | 1130 | } |
| 687 | -function kadence_virtuetoolkit_metaboxes( array $meta_boxes ) { | |
| 688 | 1131 | |
| 689 | - // Start with an underscore to hide fields from custom fields list | |
| 1132 | + | |
| 1133 | +function kadence_toolkit_ascend_metabox() { | |
| 690 | 1134 | $prefix = '_kad_'; |
| 691 | - $meta_boxes[] = array( | |
| 692 | - 'id' => 'post_video_metabox', | |
| 693 | - 'title' => __('Post Video Box', 'kadencetoolkit'), | |
| 694 | - 'pages' => array( 'post',), // Post type | |
| 695 | - 'context' => 'normal', | |
| 696 | - 'priority' => 'high', | |
| 697 | - 'show_names' => true, | |
| 698 | - 'fields' => array( | |
| 699 | - | |
| 700 | - array( | |
| 701 | - 'name' => __('If Video Post', 'kadencetoolkit'), | |
| 702 | - 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'kadencetoolkit'), | |
| 703 | - 'id' => $prefix . 'post_video', | |
| 704 | - 'type' => 'textarea_code', | |
| 705 | - ), | |
| 706 | - ), | |
| 707 | - ); | |
| 708 | - $meta_boxes[] = array( | |
| 709 | - 'id' => 'portfolio_post_metabox', | |
| 710 | - 'title' => __('Portfolio Post Options', 'kadencetoolkit'), | |
| 711 | - 'pages' => array( 'portfolio' ), // Post type | |
| 712 | - 'context' => 'normal', | |
| 713 | - 'priority' => 'high', | |
| 714 | - 'show_names' => true, // Show field names on the left | |
| 715 | - 'fields' => array( | |
| 716 | - | |
| 717 | - array( | |
| 718 | - 'name' => __('Project Layout', 'kadencetoolkit'), | |
| 719 | - 'desc' => '<a href="http://docs.kadencethemes.com/virtue/#portfolio_posts" target="_new" >Whats the difference?</a>', | |
| 720 | - 'id' => $prefix . 'ppost_layout', | |
| 721 | - 'type' => 'radio_inline', | |
| 722 | - 'options' => array( | |
| 723 | - array( 'name' => __('Beside', 'kadencetoolkit'), 'value' => 'beside', ), | |
| 724 | - array( 'name' => __('Above', 'kadencetoolkit'), 'value' => 'above', ), | |
| 725 | - array( 'name' => __('Three Rows', 'kadencetoolkit'), 'value' => 'three', ), | |
| 726 | - ), | |
| 1135 | + // GALLERY POST | |
| 1136 | + $kt_gallery_post = new_cmb2_box( array( | |
| 1137 | + 'id' => 'gallery_post_metabox', | |
| 1138 | + 'title' => __("Gallery Post Options", 'virtue-toolkit'), | |
| 1139 | + 'object_types' => array( 'post'), | |
| 1140 | + 'priority' => 'high', | |
| 1141 | + ) ); | |
| 1142 | + | |
| 1143 | + $kt_gallery_post->add_field( array( | |
| 1144 | + 'name' => __("Post Head Content", 'virtue-toolkit' ), | |
| 1145 | + 'desc' => '', | |
| 1146 | + 'id' => $prefix . 'gallery_blog_head', | |
| 1147 | + 'type' => 'select', | |
| 1148 | + 'options' => array( | |
| 1149 | + 'default' => __("Gallery Post Default", 'virtue-toolkit' ), | |
| 1150 | + 'flex' => __("Image Slider - (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 1151 | + 'carouselslider' => __("Image Slider - (Different Image Ratio)", 'virtue-toolkit' ), | |
| 1152 | + 'thumbslider' => __("Image Slider with thumbnails - (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 1153 | + 'imgcarousel' => __("Image Carousel - (Muiltiple Images Showing At Once)", 'virtue-toolkit' ), | |
| 1154 | + 'gallery' => __("Image Collage - (Use 2 to 5 images)", 'virtue-toolkit' ), | |
| 1155 | + 'shortcode' => __("Shortcode", 'virtue-toolkit' ), | |
| 1156 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 727 | 1157 | ), |
| 728 | - array( | |
| 729 | - 'name' => __('Project Options', 'kadencetoolkit'), | |
| 730 | - 'desc' => '', | |
| 731 | - 'id' => $prefix . 'ppost_type', | |
| 732 | - 'type' => 'select', | |
| 733 | - 'options' => array( | |
| 734 | - array( 'name' => __('Image', 'kadencetoolkit'), 'value' => 'image', ), | |
| 735 | - array( 'name' => __('Image Slider', 'kadencetoolkit'), 'value' => 'flex', ), | |
| 736 | - array( 'name' => __('Carousel Slider', 'kadencetoolkit'), 'value' => 'carousel', ), | |
| 737 | - array( 'name' => __('Video', 'kadencetoolkit'), 'value' => 'video', ), | |
| 738 | - array( 'name' => __('None', 'kadencetoolkit'), 'value' => 'none', ), | |
| 739 | - ), | |
| 1158 | + ) ); | |
| 1159 | + $kt_gallery_post->add_field( array( | |
| 1160 | + 'name' => __("Post Slider Gallery", 'virtue-toolkit' ), | |
| 1161 | + 'desc' => __("Add images for gallery here - Use large images", 'virtue-toolkit' ), | |
| 1162 | + 'id' => $prefix . 'image_gallery', | |
| 1163 | + 'type' => 'kad_gallery', | |
| 1164 | + ) ); | |
| 1165 | + | |
| 1166 | + $kt_gallery_post->add_field( array( | |
| 1167 | + 'name' => __('Gallery Post Shortcode', 'virtue-toolkit'), | |
| 1168 | + 'desc' => __('If using shortcode place here.', 'virtue-toolkit'), | |
| 1169 | + 'id' => $prefix . 'post_gallery_shortcode', | |
| 1170 | + 'type' => 'textarea_code', | |
| 1171 | + 'options' => array( 'disable_codemirror' => true ), | |
| 1172 | + ) ); | |
| 1173 | + $kt_gallery_post->add_field( array( | |
| 1174 | + 'name' => __("Max Slider/Image Height", 'virtue-toolkit' ), | |
| 1175 | + 'desc' => __("Note: just input number, example: 350", 'virtue-toolkit' ), | |
| 1176 | + 'id' => $prefix . 'gallery_posthead_height', | |
| 1177 | + 'type' => 'text_small', | |
| 1178 | + ) ); | |
| 1179 | + $kt_gallery_post->add_field( array( | |
| 1180 | + 'name' => __("Max Slider/Image Width", 'virtue-toolkit' ), | |
| 1181 | + 'desc' => __("Note: just input number, example: 650", 'virtue-toolkit' ), | |
| 1182 | + 'id' => $prefix . 'gallery_posthead_width', | |
| 1183 | + 'type' => 'text_small', | |
| 1184 | + ) ); | |
| 1185 | + $kt_gallery_post->add_field( array( | |
| 1186 | + 'name' => __("Post Summary", 'virtue-toolkit' ), | |
| 1187 | + 'desc' => '', | |
| 1188 | + 'id' => $prefix . 'gallery_post_summery', | |
| 1189 | + 'type' => 'select', | |
| 1190 | + 'options' => array( | |
| 1191 | + 'default' => __('Gallery Post Default', 'virtue-toolkit' ), | |
| 1192 | + 'img_portrait' => __('Portrait Image (feature image)', 'virtue-toolkit'), | |
| 1193 | + 'img_landscape' => __('Landscape Image (feature image)', 'virtue-toolkit'), | |
| 1194 | + 'slider_portrait' => __('Portrait Image Slider', 'virtue-toolkit'), | |
| 1195 | + 'slider_landscape' => __('Landscape Image Slider', 'virtue-toolkit'), | |
| 1196 | + 'gallery_grid' => __('Photo Collage - (Use 2 to 5 images)', 'virtue-toolkit'), | |
| 740 | 1197 | ), |
| 741 | - array( | |
| 742 | - 'name' => __("Max Image/Slider Height", 'kadencetoolkit' ), | |
| 743 | - 'desc' => __("Default is: 450 <b>(Note: just input number, example: 350)</b>", 'kadencetoolkit' ), | |
| 744 | - 'id' => $prefix . 'posthead_height', | |
| 745 | - 'type' => 'text_small', | |
| 1198 | + ) ); | |
| 1199 | + // VIDEO POST | |
| 1200 | + $kt_video_post = new_cmb2_box( array( | |
| 1201 | + 'id' => 'video_post_metabox', | |
| 1202 | + 'title' => __("Video Post Options", 'virtue-toolkit'), | |
| 1203 | + 'object_types' => array( 'post'), | |
| 1204 | + 'priority' => 'high', | |
| 1205 | + ) ); | |
| 1206 | + $kt_video_post->add_field( array( | |
| 1207 | + 'name' => __("Post Head Content", 'virtue-toolkit' ), | |
| 1208 | + 'desc' => '', | |
| 1209 | + 'id' => $prefix . 'video_blog_head', | |
| 1210 | + 'type' => 'select', | |
| 1211 | + 'options' => array( | |
| 1212 | + 'default' => __("Video Post Default", 'virtue-toolkit' ), | |
| 1213 | + 'video' => __("Video", 'virtue-toolkit' ), | |
| 1214 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 746 | 1215 | ), |
| 747 | - array( | |
| 748 | - 'name' => __("Max Image/Slider Width", 'kadencetoolkit' ), | |
| 749 | - 'desc' => __("Default is: 670 or 1140 on <b>above</b> or <b>three row</b> layouts (Note: just input number, example: 650)</b>", 'kadencetoolkit' ), | |
| 750 | - 'id' => $prefix . 'posthead_width', | |
| 751 | - 'type' => 'text_small', | |
| 1216 | + ) ); | |
| 1217 | + | |
| 1218 | + $kt_video_post->add_field( array( | |
| 1219 | + 'name' => __('Video post embed', 'virtue-toolkit'), | |
| 1220 | + 'desc' => __('Place url, embed code or shortcode, works with youtube, vimeo. (Use the featured image for screen shot)', 'virtue-toolkit'), | |
| 1221 | + 'id' => $prefix . 'post_video', | |
| 1222 | + 'type' => 'textarea_code', | |
| 1223 | + 'options' => array( 'disable_codemirror' => true ), | |
| 1224 | + ) ); | |
| 1225 | + $kt_video_post->add_field( array( | |
| 1226 | + 'name' => __("Video Meta Title", 'virtue-toolkit' ), | |
| 1227 | + 'desc' => __("Used for SEO purposes", 'virtue-toolkit' ), | |
| 1228 | + 'id' => $prefix . 'video_meta_title', | |
| 1229 | + 'type' => 'text', | |
| 1230 | + ) ); | |
| 1231 | + $kt_video_post->add_field( array( | |
| 1232 | + 'name' => __("Video Meta description", 'virtue-toolkit' ), | |
| 1233 | + 'desc' => __("Used for SEO purposes", 'virtue-toolkit' ), | |
| 1234 | + 'id' => $prefix . 'video_meta_description', | |
| 1235 | + 'type' => 'text', | |
| 1236 | + ) ); | |
| 1237 | + $kt_video_post->add_field( array( | |
| 1238 | + 'name' => __("Max Video Width", 'virtue-toolkit' ), | |
| 1239 | + 'desc' => __("Note: just input number, example: 650", 'virtue-toolkit' ), | |
| 1240 | + 'id' => $prefix . 'video_posthead_width', | |
| 1241 | + 'type' => 'text_small', | |
| 1242 | + ) ); | |
| 1243 | + $kt_video_post->add_field( array( | |
| 1244 | + 'name' => __("Post Summary", 'virtue-toolkit' ), | |
| 1245 | + 'desc' => '', | |
| 1246 | + 'id' => $prefix . 'video_post_summery', | |
| 1247 | + 'type' => 'select', | |
| 1248 | + 'options' => array( | |
| 1249 | + 'default' => __('Video Post Default', 'virtue-toolkit' ), | |
| 1250 | + 'video' => __('Video - (when possible)', 'virtue-toolkit'), | |
| 1251 | + 'img_portrait' => __('Portrait Image (feature image)', 'virtue-toolkit'), | |
| 1252 | + 'img_landscape' => __('Landscape Image (feature image)', 'virtue-toolkit'), | |
| 752 | 1253 | ), |
| 753 | - array( | |
| 754 | - 'name' => __('Auto Play Slider?', 'kadencetoolkit'), | |
| 755 | - 'desc' => '', | |
| 756 | - 'id' => $prefix . 'portfolio_autoplay', | |
| 757 | - 'type' => 'select', | |
| 758 | - 'options' => array( | |
| 759 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'Yes', ), | |
| 760 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 761 | - ), | |
| 762 | - ), | |
| 763 | - array( | |
| 764 | - 'name' => __('Value 01 Title', 'kadencetoolkit'), | |
| 765 | - 'desc' => __('ex. Project Type:', 'kadencetoolkit'), | |
| 766 | - 'id' => $prefix . 'project_val01_title', | |
| 767 | - 'type' => 'text_medium', | |
| 768 | - ), | |
| 769 | - array( | |
| 770 | - 'name' => __('Value 01 Description', 'kadencetoolkit'), | |
| 771 | - 'desc' => __('ex. Character Illustration', 'kadencetoolkit'), | |
| 772 | - 'id' => $prefix . 'project_val01_description', | |
| 773 | - 'type' => 'text_medium', | |
| 774 | - ), | |
| 775 | - array( | |
| 776 | - 'name' => __('Value 02 Title', 'kadencetoolkit'), | |
| 777 | - 'desc' => __('ex. Skills Needed:', 'kadencetoolkit'), | |
| 778 | - 'id' => $prefix . 'project_val02_title', | |
| 779 | - 'type' => 'text_medium', | |
| 780 | - ), | |
| 781 | - array( | |
| 782 | - 'name' => __('Value 02 Description', 'kadencetoolkit'), | |
| 783 | - 'desc' => __('ex. Photoshop, Illustrator', 'kadencetoolkit'), | |
| 784 | - 'id' => $prefix . 'project_val02_description', | |
| 785 | - 'type' => 'text_medium', | |
| 786 | - ), | |
| 787 | - array( | |
| 788 | - 'name' => __('Value 03 Title', 'kadencetoolkit'), | |
| 789 | - 'desc' => __('ex. Customer:', 'kadencetoolkit'), | |
| 790 | - 'id' => $prefix . 'project_val03_title', | |
| 791 | - 'type' => 'text_medium', | |
| 792 | - ), | |
| 793 | - array( | |
| 794 | - 'name' => __('Value 03 Description', 'kadencetoolkit'), | |
| 795 | - 'desc' => __('ex. Example Inc', 'kadencetoolkit'), | |
| 796 | - 'id' => $prefix . 'project_val03_description', | |
| 797 | - 'type' => 'text_medium', | |
| 798 | - ), | |
| 799 | - array( | |
| 800 | - 'name' => __('Value 04 Title', 'kadencetoolkit'), | |
| 801 | - 'desc' => __('ex. Project Year:', 'kadencetoolkit'), | |
| 802 | - 'id' => $prefix . 'project_val04_title', | |
| 803 | - 'type' => 'text_medium', | |
| 804 | - ), | |
| 805 | - array( | |
| 806 | - 'name' => __('Value 04 Description', 'kadencetoolkit'), | |
| 807 | - 'desc' => __('ex. 2013', 'kadencetoolkit'), | |
| 808 | - 'id' => $prefix . 'project_val04_description', | |
| 809 | - 'type' => 'text_medium', | |
| 810 | - ), | |
| 811 | - array( | |
| 812 | - 'name' => __('External Website', 'kadencetoolkit'), | |
| 813 | - 'desc' => __('ex. Website:', 'kadencetoolkit'), | |
| 814 | - 'id' => $prefix . 'project_val05_title', | |
| 815 | - 'type' => 'text_medium', | |
| 816 | - ), | |
| 817 | - array( | |
| 818 | - 'name' => __('Website Address', 'kadencetoolkit'), | |
| 819 | - 'desc' => __('ex. http://www.example.com', 'kadencetoolkit'), | |
| 820 | - 'id' => $prefix . 'project_val05_description', | |
| 821 | - 'type' => 'text_medium', | |
| 822 | - ), | |
| 823 | - array( | |
| 824 | - 'name' => __('If Video Project', 'kadencetoolkit'), | |
| 825 | - 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'kadencetoolkit'), | |
| 826 | - 'id' => $prefix . 'post_video', | |
| 827 | - 'type' => 'textarea_code', | |
| 828 | - ), | |
| 829 | - array( | |
| 830 | - 'name' => __('Similar Portfolio Item Carousel', 'kadencetoolkit'), | |
| 831 | - 'desc' => __('Display a carousel with similar portfolio items below project?', 'kadencetoolkit'), | |
| 832 | - 'id' => $prefix . 'portfolio_carousel_recent', | |
| 833 | - 'type' => 'select', | |
| 834 | - 'options' => array( | |
| 835 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 836 | - array( 'name' => __('Yes - Display Recent Projects', 'kadencetoolkit'), 'value' => 'recent', ), | |
| 837 | - ), | |
| 838 | - ), | |
| 839 | - array( | |
| 840 | - 'name' => __('Carousel Title', 'kadencetoolkit'), | |
| 841 | - 'desc' => __('ex. Similar Projects', 'kadencetoolkit'), | |
| 842 | - 'id' => $prefix . 'portfolio_carousel_title', | |
| 843 | - 'type' => 'text_medium', | |
| 844 | - ), | |
| 845 | - | |
| 1254 | + ) ); | |
| 1255 | + // Quote | |
| 1256 | + $kt_quote_post = new_cmb2_box( array( | |
| 1257 | + 'id' => 'quote_post_metabox', | |
| 1258 | + 'title' => __("Quote Post Options", 'virtue-toolkit'), | |
| 1259 | + 'object_types' => array( 'post'), | |
| 1260 | + 'priority' => 'high', | |
| 1261 | + ) ); | |
| 1262 | + $kt_quote_post->add_field( array( | |
| 1263 | + 'name' => __("Quote author", 'virtue-toolkit' ), | |
| 1264 | + 'id' => $prefix . 'quote_author', | |
| 1265 | + 'type' => 'text', | |
| 1266 | + ) ); | |
| 1267 | + | |
| 1268 | + // Portfolio | |
| 1269 | + $kt_portfolio_post = new_cmb2_box( array( | |
| 1270 | + 'id' => 'portfolio_post_metabox', | |
| 1271 | + 'title' => __("Portfolio Options", 'virtue-toolkit'), | |
| 1272 | + 'object_types' => array('portfolio'), | |
| 1273 | + 'priority' => 'high', | |
| 1274 | + ) ); | |
| 1275 | + $kt_portfolio_post->add_field( array( | |
| 1276 | + 'name' => __('Project Layout', 'virtue-toolkit'), | |
| 1277 | + 'desc' => '', | |
| 1278 | + 'id' => $prefix . 'ppost_layout', | |
| 1279 | + 'type' => 'radio_inline', | |
| 1280 | + 'options' => array( | |
| 1281 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 1282 | + 'beside' => __("Beside 40%", 'virtue-toolkit' ), | |
| 1283 | + 'besidesmall' => __("Beside 33%", 'virtue-toolkit' ), | |
| 1284 | + 'above' => __("Above", 'virtue-toolkit' ), | |
| 846 | 1285 | ), |
| 847 | - ); | |
| 848 | -$meta_boxes[] = array( | |
| 849 | - 'id' => 'portfolio_metabox', | |
| 850 | - 'title' => __('Portfolio Page Options', 'kadencetoolkit'), | |
| 851 | - 'pages' => array( 'page' ), // Post type | |
| 852 | - 'show_on' => array('key' => 'page-template', 'value' => array( 'page-portfolio.php' )), | |
| 853 | - 'context' => 'normal', | |
| 854 | - 'priority' => 'high', | |
| 855 | - 'show_names' => true, // Show field names on the left | |
| 856 | - 'fields' => array( | |
| 857 | - | |
| 858 | - array( | |
| 859 | - 'name' => __('Columns', 'kadencetoolkit'), | |
| 860 | - 'desc' => '', | |
| 861 | - 'id' => $prefix . 'portfolio_columns', | |
| 862 | - 'type' => 'select', | |
| 863 | - 'options' => array( | |
| 864 | - array( 'name' => __('Four Column', 'kadencetoolkit'), 'value' => '4', ), | |
| 865 | - array( 'name' => __('Three Column', 'kadencetoolkit'), 'value' => '3', ), | |
| 866 | - array( 'name' => __('Two Column', 'kadencetoolkit'), 'value' => '2', ), | |
| 867 | - ), | |
| 868 | - ), | |
| 869 | - array( | |
| 870 | - 'name' => __('Portfolio Work Types', 'kadencetoolkit'), | |
| 871 | - 'desc' => '', | |
| 872 | - 'id' => $prefix .'portfolio_type', | |
| 873 | - 'type' => 'imag_select_taxonomy', | |
| 874 | - 'taxonomy' => 'portfolio-type', | |
| 875 | - ), | |
| 876 | - array( | |
| 877 | - 'name' => __('Order Items By', 'kadencetoolkit'), | |
| 878 | - 'desc' => '', | |
| 879 | - 'id' => $prefix . 'portfolio_order', | |
| 880 | - 'type' => 'select', | |
| 881 | - 'options' => array( | |
| 882 | - array( 'name' => __('Menu Order', 'kadencetoolkit'), 'value' => 'menu_order', ), | |
| 883 | - array( 'name' => __('Title', 'kadencetoolkit'), 'value' => 'title', ), | |
| 884 | - array( 'name' => __('Date', 'kadencetoolkit'), 'value' => 'date', ), | |
| 885 | - array( 'name' => __('Random', 'kadencetoolkit'), 'value' => 'rand', ), | |
| 886 | - ), | |
| 887 | - ), | |
| 888 | - array( | |
| 889 | - 'name' => __('Items per Page', 'kadencetoolkit'), | |
| 890 | - 'desc' => __('How many portfolio items per page', 'kadencetoolkit'), | |
| 891 | - 'id' => $prefix . 'portfolio_items', | |
| 892 | - 'type' => 'select', | |
| 893 | - 'options' => array( | |
| 894 | - array( 'name' => __('All', 'kadencetoolkit'), 'value' => 'all', ), | |
| 895 | - array( 'name' => '3', 'value' => '3', ), | |
| 896 | - array( 'name' => '4', 'value' => '4', ), | |
| 897 | - array( 'name' => '5', 'value' => '5', ), | |
| 898 | - array( 'name' => '6', 'value' => '6', ), | |
| 899 | - array( 'name' => '7', 'value' => '7', ), | |
| 900 | - array( 'name' => '8', 'value' => '8', ), | |
| 901 | - array( 'name' => '9', 'value' => '9', ), | |
| 902 | - array( 'name' => '10', 'value' => '10', ), | |
| 903 | - array( 'name' => '11', 'value' => '11', ), | |
| 904 | - array( 'name' => '12', 'value' => '12', ), | |
| 905 | - array( 'name' => '13', 'value' => '13', ), | |
| 906 | - array( 'name' => '14', 'value' => '14', ), | |
| 907 | - array( 'name' => '15', 'value' => '15', ), | |
| 908 | - array( 'name' => '16', 'value' => '16', ), | |
| 909 | - ), | |
| 910 | - ), | |
| 911 | - array( | |
| 912 | - 'name' => __('Set image height', 'kadencetoolkit'), | |
| 913 | - 'desc' => __('Default is 1:1 ratio <b>(Note: just input number, example: 350)</b>', 'kadencetoolkit'), | |
| 914 | - 'id' => $prefix . 'portfolio_img_crop', | |
| 915 | - 'type' => 'text_small', | |
| 916 | - ), | |
| 917 | - array( | |
| 918 | - 'name' => __('Display Item Work Types', 'kadencetoolkit'), | |
| 919 | - 'desc' => '', | |
| 920 | - 'id' => $prefix . 'portfolio_item_types', | |
| 921 | - 'type' => 'checkbox', | |
| 922 | - 'std' => '1' | |
| 923 | - ), | |
| 924 | - array( | |
| 925 | - 'name' => __('Display Item Excerpt', 'kadencetoolkit'), | |
| 926 | - 'desc' => '', | |
| 927 | - 'id' => $prefix . 'portfolio_item_excerpt', | |
| 928 | - 'type' => 'checkbox', | |
| 929 | - 'std' => '1' | |
| 930 | - ), | |
| 931 | - array( | |
| 932 | - 'name' => __('Add Lightbox link in the top right of each item', 'kadencetoolkit'), | |
| 933 | - 'desc' => '', | |
| 934 | - 'id' => $prefix . 'portfolio_lightbox', | |
| 935 | - 'type' => 'select', | |
| 936 | - 'options' => array( | |
| 937 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 938 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 939 | - ), | |
| 940 | - ), | |
| 941 | - | |
| 942 | - )); | |
| 943 | -$meta_boxes[] = array( | |
| 944 | - 'id' => 'pagefeature_metabox', | |
| 945 | - 'title' => __('Feature Page Options', 'kadencetoolkit'), | |
| 946 | - 'pages' => array( 'page' ), // Post type | |
| 947 | - 'show_on' => array('key' => 'page-template', 'value' => array( 'page-feature.php', 'page-feature-sidebar.php')), | |
| 948 | - 'context' => 'normal', | |
| 949 | - 'priority' => 'high', | |
| 950 | - 'show_names' => true, // Show field names on the left | |
| 951 | - 'fields' => array( | |
| 952 | - | |
| 953 | - array( | |
| 954 | - 'name' => __('Feature Options', 'kadencetoolkit'), | |
| 955 | - 'desc' => __('If image slider make sure images uploaded are at least 1140px wide.', 'kadencetoolkit'), | |
| 956 | - 'id' => $prefix . 'page_head', | |
| 957 | - 'type' => 'select', | |
| 958 | - 'options' => array( | |
| 959 | - array( 'name' => __('Image Slider', 'kadencetoolkit'), 'value' => 'flex', ), | |
| 960 | - array( 'name' => __('Video', 'kadencetoolkit'), 'value' => 'video', ), | |
| 961 | - array( 'name' => __('Image', 'kadencetoolkit'), 'value' => 'image', ), | |
| 962 | - ), | |
| 963 | - ), | |
| 964 | - array( | |
| 965 | - 'name' => __('Max Image/Slider Height', 'kadencetoolkit'), | |
| 966 | - 'desc' => __('Default is: 400 <b>(Note: just input number, example: 350)</b>', 'kadencetoolkit'), | |
| 967 | - 'id' => $prefix . 'posthead_height', | |
| 968 | - 'type' => 'text_small', | |
| 969 | - ), | |
| 970 | - array( | |
| 971 | - 'name' => __("Max Image/Slider Width", 'kadencetoolkit' ), | |
| 972 | - 'desc' => __("Default is: 1140 <b>(Note: just input number, example: 650, does not apply to Carousel slider)</b>", 'kadencetoolkit' ), | |
| 973 | - 'id' => $prefix . 'posthead_width', | |
| 974 | - 'type' => 'text_small', | |
| 975 | - ), | |
| 976 | - array( | |
| 977 | - 'name' => __('Use Lightbox for Feature Image', 'kadencetoolkit'), | |
| 978 | - 'desc' => __("If feature option is set to image, choose to use lightbox link with image.", 'kadencetoolkit' ), | |
| 979 | - 'id' => $prefix . 'feature_img_lightbox', | |
| 980 | - 'type' => 'select', | |
| 981 | - 'options' => array( | |
| 982 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 983 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 984 | - ), | |
| 985 | - ), | |
| 986 | - array( | |
| 987 | - 'name' => __('If Video Post', 'kadencetoolkit'), | |
| 988 | - 'desc' => __('Place Embed Code Here, works with youtube, vimeo...', 'kadencetoolkit'), | |
| 989 | - 'id' => $prefix . 'post_video', | |
| 990 | - 'type' => 'textarea_code', | |
| 991 | - ), | |
| 992 | - | |
| 993 | - )); | |
| 994 | -$meta_boxes[] = array( | |
| 995 | - 'id' => 'contact_metabox', | |
| 996 | - 'title' => __('Contact Page Options', 'kadencetoolkit'), | |
| 997 | - 'pages' => array( 'page' ), // Post type | |
| 998 | - 'show_on' => array('key' => 'page-template', 'value' => array( 'page-contact.php')), | |
| 999 | - 'context' => 'normal', | |
| 1000 | - 'priority' => 'high', | |
| 1001 | - 'show_names' => true, // Show field names on the left | |
| 1002 | - 'fields' => array( | |
| 1003 | - | |
| 1004 | - array( | |
| 1005 | - 'name' => __('Use Contact Form', 'kadencetoolkit'), | |
| 1006 | - 'desc' => '', | |
| 1007 | - 'id' => $prefix .'contact_form', | |
| 1008 | - 'type' => 'select', | |
| 1009 | - 'options' => array( | |
| 1010 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 1011 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 1012 | - ), | |
| 1013 | - ), | |
| 1014 | - array( | |
| 1015 | - 'name' => __('Contact Form Title', 'kadencetoolkit'), | |
| 1016 | - 'desc' => __('ex. Send us an Email', 'kadencetoolkit'), | |
| 1017 | - 'id' => $prefix . 'contact_form_title', | |
| 1018 | - 'type' => 'text', | |
| 1019 | - ), | |
| 1020 | - array( | |
| 1021 | - 'name' => __('Use Simple Math Question', 'kadencetoolkit'), | |
| 1022 | - 'desc' => 'Adds a simple math question to form.', | |
| 1023 | - 'id' => $prefix .'contact_form_math', | |
| 1024 | - 'type' => 'select', | |
| 1025 | - 'options' => array( | |
| 1026 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 1027 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 1028 | - ), | |
| 1029 | - ), | |
| 1030 | - array( | |
| 1031 | - 'name' => __('Use Map', 'kadencetoolkit'), | |
| 1032 | - 'desc' => '', | |
| 1033 | - 'id' => $prefix .'contact_map', | |
| 1034 | - 'type' => 'select', | |
| 1035 | - 'options' => array( | |
| 1036 | - array( 'name' => __('No', 'kadencetoolkit'), 'value' => 'no', ), | |
| 1037 | - array( 'name' => __('Yes', 'kadencetoolkit'), 'value' => 'yes', ), | |
| 1038 | - ), | |
| 1039 | - ), | |
| 1040 | - array( | |
| 1041 | - 'name' => __('Address', 'kadencetoolkit'), | |
| 1042 | - 'desc' => __('Enter your Location', 'kadencetoolkit'), | |
| 1043 | - 'id' => $prefix . 'contact_address', | |
| 1044 | - 'type' => 'text', | |
| 1045 | - ), | |
| 1046 | - array( | |
| 1047 | - 'name' => __('Map Type', 'kadencetoolkit'), | |
| 1048 | - 'desc' => '', | |
| 1049 | - 'id' => $prefix . 'contact_maptype', | |
| 1050 | - 'type' => 'select', | |
| 1051 | - 'options' => array( | |
| 1052 | - array( 'name' => __('ROADMAP', 'kadencetoolkit'), 'value' => 'ROADMAP', ), | |
| 1053 | - array( 'name' => __('HYBRID', 'kadencetoolkit'), 'value' => 'HYBRID', ), | |
| 1054 | - array( 'name' => __('TERRAIN', 'kadencetoolkit'), 'value' => 'TERRAIN', ), | |
| 1055 | - array( 'name' => __('SATELLITE', 'kadencetoolkit'), 'value' => 'SATELLITE', ), | |
| 1056 | - ), | |
| 1057 | - ), | |
| 1058 | - array( | |
| 1059 | - 'name' => __('Map Zoom Level', 'kadencetoolkit'), | |
| 1060 | - 'desc' => __('A good place to start is 15', 'kadencetoolkit'), | |
| 1061 | - 'id' => $prefix . 'contact_zoom', | |
| 1062 | - 'std' => '15', | |
| 1063 | - 'type' => 'select', | |
| 1064 | - 'options' => array( | |
| 1065 | - array( 'name' => __('1 (World View)', 'kadencetoolkit'), 'value' => '1', ), | |
| 1066 | - array( 'name' => '2', 'value' => '2', ), | |
| 1067 | - array( 'name' => '3', 'value' => '3', ), | |
| 1068 | - array( 'name' => '4', 'value' => '4', ), | |
| 1069 | - array( 'name' => '5', 'value' => '5', ), | |
| 1070 | - array( 'name' => '6', 'value' => '6', ), | |
| 1071 | - array( 'name' => '7', 'value' => '7', ), | |
| 1072 | - array( 'name' => '8', 'value' => '8', ), | |
| 1073 | - array( 'name' => '9', 'value' => '9', ), | |
| 1074 | - array( 'name' => '10', 'value' => '10', ), | |
| 1075 | - array( 'name' => '11', 'value' => '11', ), | |
| 1076 | - array( 'name' => '12', 'value' => '12', ), | |
| 1077 | - array( 'name' => '13', 'value' => '13', ), | |
| 1078 | - array( 'name' => '14', 'value' => '14', ), | |
| 1079 | - array( 'name' => '15', 'value' => '15', ), | |
| 1080 | - array( 'name' => '16', 'value' => '16', ), | |
| 1081 | - array( 'name' => '17', 'value' => '17', ), | |
| 1082 | - array( 'name' => '18', 'value' => '18', ), | |
| 1083 | - array( 'name' => '19', 'value' => '19', ), | |
| 1084 | - array( 'name' => '20', 'value' => '20', ), | |
| 1085 | - array( 'name' => __('21 (Street View)', 'kadencetoolkit'), 'value' => '21', ), | |
| 1086 | - ), | |
| 1087 | - ), | |
| 1088 | - array( | |
| 1089 | - 'name' => __('Map Height', 'kadencetoolkit'), | |
| 1090 | - 'desc' => __('Default is 300', 'kadencetoolkit'), | |
| 1091 | - 'id' => $prefix . 'contact_mapheight', | |
| 1092 | - 'type' => 'text_small', | |
| 1093 | - ), | |
| 1094 | - | |
| 1095 | - )); | |
| 1096 | -$meta_boxes[] = array( | |
| 1097 | - 'id' => 'virtue_post_gallery', | |
| 1098 | - 'title' => __("Slider Images", 'kadencetoolkit'), | |
| 1099 | - 'pages' => array( 'post', 'page', 'portfolio'), // Post type | |
| 1100 | - 'context' => 'normal', | |
| 1101 | - 'priority' => 'high', | |
| 1102 | - 'show_names' => true, // Show field names on the left | |
| 1103 | - 'fields' => array( | |
| 1104 | - array( | |
| 1105 | - 'name' => __("Slider Gallery", 'kadencetoolkit' ), | |
| 1106 | - 'desc' => __("Add images for gallery here", 'kadencetoolkit' ), | |
| 1107 | - 'id' => $prefix . 'image_gallery', | |
| 1108 | - 'type' => 'kad_gallery', | |
| 1109 | - ), | |
| 1110 | - )); | |
| 1111 | - | |
| 1112 | - return $meta_boxes; | |
| 1113 | -} | |
| 1114 | - | |
| 1115 | -add_action( 'init', 'initialize_kadence_toolkit_meta_boxes', 10 ); | |
| 1116 | -function initialize_kadence_toolkit_meta_boxes() { | |
| 1117 | - | |
| 1118 | - if ( ! class_exists( 'cmb_Meta_Box' ) ) { | |
| 1119 | - require_once 'cmb/init.php'; | |
| 1120 | - } | |
| 1121 | - | |
| 1286 | + ) ); | |
| 1287 | + $kt_portfolio_post->add_field( array( | |
| 1288 | + 'name' => __('Project Options', 'virtue-toolkit'), | |
| 1289 | + 'desc' => '', | |
| 1290 | + 'id' => $prefix . 'ppost_type', | |
| 1291 | + 'type' => 'select', | |
| 1292 | + 'options' => array( | |
| 1293 | + 'image' => __("Image", 'virtue-toolkit' ), | |
| 1294 | + 'flex' => __("Image Slider (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 1295 | + 'carouselslider' => __("Image Slider - (Different Image Ratio)", 'virtue-toolkit' ), | |
| 1296 | + 'thumbslider' => __("Image Slider with thumbnails (Cropped Image Ratio)", 'virtue-toolkit' ), | |
| 1297 | + 'imgcarousel' => __("Image Carousel - (Muiltiple Images Showing At Once)", 'virtue-toolkit' ), | |
| 1298 | + 'collage' => __("Image Collage - (Use 2 to 5 images)", 'virtue-toolkit' ), | |
| 1299 | + 'imagegrid' => __("Image Grid", 'virtue-toolkit' ), | |
| 1300 | + 'video' => __("Video", 'virtue-toolkit' ), | |
| 1301 | + 'none' => __("None", 'virtue-toolkit' ), | |
| 1302 | + ), | |
| 1303 | + ) ); | |
| 1304 | + $kt_portfolio_post->add_field( array( | |
| 1305 | + 'name' => __('Columns', 'virtue-toolkit'), | |
| 1306 | + 'desc' => '', | |
| 1307 | + 'id' => $prefix . 'portfolio_img_grid_columns', | |
| 1308 | + 'type' => 'select', | |
| 1309 | + 'default' => '3', | |
| 1310 | + 'options' => array( | |
| 1311 | + '2' => __("Two Columns", 'virtue-toolkit' ), | |
| 1312 | + '3' => __("Three Columns", 'virtue-toolkit' ), | |
| 1313 | + '4' => __("Four Columns", 'virtue-toolkit' ), | |
| 1314 | + '5' => __("Five Columns", 'virtue-toolkit' ), | |
| 1315 | + '6' => __("Six Columns", 'virtue-toolkit' ), | |
| 1316 | + ), | |
| 1317 | + ) ); | |
| 1318 | + $kt_portfolio_post->add_field( array( | |
| 1319 | + 'name' => __("Portfolio Image Gallery", 'virtue-toolkit' ), | |
| 1320 | + 'desc' => __("Add images for gallery here - Use large images", 'virtue-toolkit' ), | |
| 1321 | + 'id' => $prefix . 'image_gallery', | |
| 1322 | + 'type' => 'kad_gallery', | |
| 1323 | + ) ); | |
| 1324 | + $kt_portfolio_post->add_field( array( | |
| 1325 | + 'name' => __('Video embed', 'virtue-toolkit'), | |
| 1326 | + 'desc' => __('Place url, embed code or shortcode, works with youtube, vimeo. (Use the featured image for screen shot)', 'virtue-toolkit'), | |
| 1327 | + 'id' => $prefix . 'post_video', | |
| 1328 | + 'type' => 'textarea_code', | |
| 1329 | + 'options' => array( 'disable_codemirror' => true ), | |
| 1330 | + ) ); | |
| 1331 | + $kt_portfolio_post->add_field( array( | |
| 1332 | + 'name' => __("Max Slider/Image Width", 'virtue-toolkit' ), | |
| 1333 | + 'desc' => __("Note: just input number, example: 650", 'virtue-toolkit' ), | |
| 1334 | + 'id' => $prefix . 'portfolio_slider_width', | |
| 1335 | + 'type' => 'text_small', | |
| 1336 | + ) ); | |
| 1337 | + $kt_portfolio_post->add_field( array( | |
| 1338 | + 'name' => __("Max Slider/Image Height", 'virtue-toolkit' ), | |
| 1339 | + 'desc' => __("Note: just input number, example: 350", 'virtue-toolkit' ), | |
| 1340 | + 'id' => $prefix . 'portfolio_slider_height', | |
| 1341 | + 'type' => 'text_small', | |
| 1342 | + ) ); | |
| 1343 | + // Portfolio Carousel | |
| 1344 | + $kt_portfolio_carousel = new_cmb2_box( array( | |
| 1345 | + 'id' => 'portfolio_post_carousel_metabox', | |
| 1346 | + 'title' => __("Portfolio Bottom Carousel Options", 'virtue-toolkit'), | |
| 1347 | + 'object_types' => array('portfolio'), | |
| 1348 | + 'priority' => 'high', | |
| 1349 | + ) ); | |
| 1350 | + $kt_portfolio_carousel->add_field( array( | |
| 1351 | + 'name' => __('Carousel Title', 'virtue-toolkit'), | |
| 1352 | + 'desc' => __('ex. Similar Projects', 'virtue-toolkit'), | |
| 1353 | + 'id' => $prefix . 'portfolio_carousel_title', | |
| 1354 | + 'type' => 'text_medium', | |
| 1355 | + )); | |
| 1356 | + $kt_portfolio_carousel->add_field( array( | |
| 1357 | + 'name' => __('Bottom Portfolio Carousel', 'virtue-toolkit'), | |
| 1358 | + 'desc' => __('Display a carousel with portfolio items below project?', 'virtue-toolkit'), | |
| 1359 | + 'id' => $prefix . 'portfolio_carousel', | |
| 1360 | + 'type' => 'select', | |
| 1361 | + 'options' => array( | |
| 1362 | + 'default' => __("Default", 'virtue-toolkit' ), | |
| 1363 | + 'related' => __("Related Post Carousel", 'virtue-toolkit' ), | |
| 1364 | + 'recent' => __("Recent Portfolio Carousel", 'virtue-toolkit' ), | |
| 1365 | + 'none' => __("No Carousel", 'virtue-toolkit' ), | |
| 1366 | + ), | |
| 1367 | + )); | |
| 1122 | 1368 | } |