| 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 |
} |
| 33 |
// Build Metaboxs for gallery |
| 34 |
function kadence_toolkit_ascend_gallery_field( $field, $meta ) { |
| 35 |
echo '<div class="kad-gallery kttk_meta_image_gallery">'; |
| 36 |
echo '<div class="gallery_images">'; |
| 37 |
$attachments = array_filter( explode( ',', $meta ) ); |
| 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]).'" />'; |
| 44 |
echo '</a>'; |
| 45 |
} |
| 46 |
endif; |
| 47 |
echo '</div>'; |
| 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>'; |
| 51 |
echo '</div>'; |
| 52 |
$desc = $field->args('desc'); |
| 53 |
if ( !empty( $desc)) { |
| 54 |
echo '<p class="cmb_metabox_description">' . $field->args( 'desc' ) . '</p>'; |
| 55 |
} |
| 56 |
} |
| 57 |
add_filter( 'cmb2_render_kad_gallery', 'kadence_toolkit_ascend_gallery_field', 10, 2 ); |
| 58 |
|
| 59 |
|
| 60 |
function kadence_toolkit_pinnacle_metaboxes() { |
| 61 |
|
| 62 |
// Start with an underscore to hide fields from custom fields list |
| 63 |
$prefix = '_kad_'; |
| 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' ), |
| 86 |
), |
| 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' ), |
| 97 |
), |
| 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' ), |
| 130 |
), |
| 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' ), |
| 141 |
), |
| 142 |
) ); |
| 143 |
|
| 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 |
|
| 687 |
} |
| 688 |
|
| 689 |
|
| 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 |
|
| 1130 |
} |
| 1131 |
|
| 1132 |
|
| 1133 |
function kadence_toolkit_ascend_metabox() { |
| 1134 |
$prefix = '_kad_'; |
| 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' ), |
| 1157 |
), |
| 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'), |
| 1197 |
), |
| 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' ), |
| 1215 |
), |
| 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'), |
| 1253 |
), |
| 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' ), |
| 1285 |
), |
| 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 |
)); |
| 1368 |
} |