| 1 |
<?php |
| 2 |
/* |
| 3 |
* All metabox create here. |
| 4 |
* |
| 5 |
* @link http://awesomebootstrap.net |
| 6 |
* @since 1.0.0 |
| 7 |
* @package Gallery box wordpress plugin |
| 8 |
*/ |
| 9 |
|
| 10 |
//add group fields |
| 11 |
|
| 12 |
/** |
| 13 |
* Hook in and add a metabox to demonstrate grouped fields |
| 14 |
*/ |
| 15 |
if (!function_exists('gbox_meta_group')) : |
| 16 |
function gbox_meta_group() |
| 17 |
{ |
| 18 |
/** |
| 19 |
* Gallery box meta field groups |
| 20 |
*/ |
| 21 |
$gallery_box_meta = new_cmb2_box(array( |
| 22 |
'id' => 'm_gallery', |
| 23 |
'title' => __('Choose gallery type and click to add item', 'gallery-box'), |
| 24 |
'object_types' => array('gallery_box',), |
| 25 |
'context' => 'advanced', |
| 26 |
'priority' => 'high', |
| 27 |
'closed' => false, |
| 28 |
'tabs' => array( |
| 29 |
|
| 30 |
'gbox_welcome' => array( |
| 31 |
'label' => __('Welcome tab', 'gallery-box'), |
| 32 |
// 'show_on_cb' => 'cmb2_tabs_show_if_front_page', |
| 33 |
'icon' => 'dashicons-format-image', // Dashicon |
| 34 |
), |
| 35 |
'simg' => array( |
| 36 |
'label' => __('Quick imaegs Gallery', 'gallery-box'), |
| 37 |
// 'show_on_cb' => 'cmb2_tabs_show_if_front_page', |
| 38 |
'icon' => 'dashicons-format-image', // Dashicon |
| 39 |
), |
| 40 |
'image' => array( |
| 41 |
'label' => __('Advance Image Gallery', 'gallery-box'), |
| 42 |
// 'show_on_cb' => 'cmb2_tabs_show_if_front_page', |
| 43 |
'icon' => 'dashicons-images-alt2', // Dashicon |
| 44 |
), |
| 45 |
'portfolio' => array( |
| 46 |
'label' => __('Portfolio Gallery', 'gallery-box'), |
| 47 |
// 'show_on_cb' => 'cmb2_tabs_show_if_front_page', |
| 48 |
'icon' => 'dashicons-portfolio', // Dashicon |
| 49 |
), |
| 50 |
'youtubee' => array( |
| 51 |
'label' => __('Youtube gallery', 'gallery-box'), |
| 52 |
'icon' => 'dashicons-video-alt2', // Dashicon |
| 53 |
), |
| 54 |
'vime' => array( |
| 55 |
'label' => __('Vimeo gallery', 'gallery-box'), |
| 56 |
'icon' => 'dashicons-video-alt', // Custom icon, using image |
| 57 |
), |
| 58 |
'iframe' => array( |
| 59 |
'label' => __('iframe gallery', 'gallery-box'), |
| 60 |
'icon' => 'dashicons-welcome-view-site', // Custom icon, using image |
| 61 |
), |
| 62 |
'tabgallery' => array( |
| 63 |
'label' => __('Gallery Tab pro', 'gallery-box'), |
| 64 |
'icon' => 'dashicons-admin-generic', // Custom icon, using image |
| 65 |
), |
| 66 |
'css' => array( |
| 67 |
'label' => __('Custom css', 'gallery-box'), |
| 68 |
'icon' => 'dashicons-admin-generic', // Custom icon, using image |
| 69 |
), |
| 70 |
'donation' => array( |
| 71 |
'label' => __('Upgrade pro', 'gallery-box'), |
| 72 |
'icon' => 'dashicons-visibility', // Custom icon, using image |
| 73 |
), |
| 74 |
), |
| 75 |
)); |
| 76 |
|
| 77 |
/* |
| 78 |
* welcome tab |
| 79 |
* |
| 80 |
*/ |
| 81 |
$gallery_box_meta->add_field(array( |
| 82 |
'name' => '', |
| 83 |
'desc' => __( |
| 84 |
' |
| 85 |
<div class="gboxwelcome-text"> |
| 86 |
<div class="gboxwel-img"> |
| 87 |
<img src="' . plugin_dir_url(dirname(__FILE__)) . 'images/image-small.jpg' . '" alt="" /> |
| 88 |
</div> |
| 89 |
<div class="gboxwel-text"> |
| 90 |
<h1>' . __('Welcome Gallery Box', 'gallery-box') . '</h1> |
| 91 |
<a target="_blank" class="gbox-pro-link" href="https://wpthemespace.com/product/gallery-box-pro/?add-to-cart=688">' . __('Upgrade To Pro', 'gallery-box') . '</a> |
| 92 |
<h3>' . __('Select your gallery tab', 'gallery-box') . '</h3> |
| 93 |
<p>' . __('Only add gallery items in your selected gallery and ignor all other tab.', 'gallery-box') . '</p> |
| 94 |
</div> |
| 95 |
</div>', |
| 96 |
'gallery-box' |
| 97 |
), |
| 98 |
'id' => 'gbox_wel', |
| 99 |
'type' => 'text', |
| 100 |
'tab' => 'gbox_welcome', |
| 101 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 102 |
|
| 103 |
)); |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
/* |
| 108 |
* Simple image gallery |
| 109 |
* |
| 110 |
*/ |
| 111 |
$gallery_box_meta->add_field(array( |
| 112 |
'name' => esc_html__('', 'gallery-box'), |
| 113 |
'id' => 'simg_type', |
| 114 |
'type' => 'radio_image', |
| 115 |
'tab' => 'simg', |
| 116 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 117 |
'options' => array( |
| 118 |
'img_add' => __('Add gallery images', 'gallery-box'), |
| 119 |
'img_set' => __('Quick gallery settings', 'gallery-box'), |
| 120 |
), |
| 121 |
'default' => 'img_add', |
| 122 |
|
| 123 |
)); |
| 124 |
|
| 125 |
$gallery_box_meta->add_field(array( |
| 126 |
'name' => __('Add Gallery Images', 'gallery-box'), |
| 127 |
'desc' => __('You can add all gallery images by this options. It\'s quick and easy.', 'gallery-box'), |
| 128 |
'id' => 'simple_imgs', |
| 129 |
'type' => 'file_list', |
| 130 |
'tab' => 'simg', |
| 131 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 132 |
'attributes' => array( |
| 133 |
'data-conditional-id' => 'simg_type', |
| 134 |
'data-conditional-value' => 'img_add', |
| 135 |
|
| 136 |
), |
| 137 |
|
| 138 |
)); |
| 139 |
|
| 140 |
$simage_group_id = $gallery_box_meta->add_field(array( |
| 141 |
'id' => 'simg_main', |
| 142 |
'type' => 'group', |
| 143 |
'tab' => 'simg', |
| 144 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 145 |
'repeatable' => false, |
| 146 |
'options' => array( |
| 147 |
'group_title' => __('Quick Image gallery settings', 'gallery-box'), |
| 148 |
'closed' => false, |
| 149 |
), |
| 150 |
|
| 151 |
)); |
| 152 |
|
| 153 |
|
| 154 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 155 |
'name' => __('Image gallery layout', 'gallery-box'), |
| 156 |
'desc' => __('Select image gallery layout masonry or fixed height.', 'gallery-box'), |
| 157 |
'id' => 'simg_layout_type', |
| 158 |
'type' => 'pw_select', |
| 159 |
'default' => 'masonry_layout', |
| 160 |
'options' => array( |
| 161 |
'normal_layout' => __('Fixed height', 'gallery-box'), |
| 162 |
'masonry_layout' => __('Masonry gallery layout style one ', 'gallery-box'), |
| 163 |
'pro1' => __('Masonry gallery layout style two (Available in pro) )', 'gallery-box'), |
| 164 |
'pro2' => __('Masonry gallery layout style three (Available in pro)', 'gallery-box'), |
| 165 |
'carousel_slider' => __('Carousel slider', 'gallery-box'), |
| 166 |
'carousel_fixed' => __('Carousel slider fixed height', 'gallery-box'), |
| 167 |
|
| 168 |
), |
| 169 |
|
| 170 |
)); |
| 171 |
|
| 172 |
|
| 173 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 174 |
'name' => __('Show carousel nav', 'gallery-box'), |
| 175 |
'desc' => __('You can show or hide carousel nav.', 'gallery-box'), |
| 176 |
'id' => 'simg_car_nav', |
| 177 |
'type' => 'switch', |
| 178 |
'default' => '', |
| 179 |
'attributes' => array( |
| 180 |
'data-conditional-id' => 'simg_layout_type', |
| 181 |
'data-conditional-value' => wp_json_encode(array('carousel_slider', 'carousel_fixed')), |
| 182 |
|
| 183 |
), |
| 184 |
|
| 185 |
)); |
| 186 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 187 |
'name' => __('Show carousel dot', 'gallery-box'), |
| 188 |
'desc' => __('You can show or hide carousel dot.', 'gallery-box'), |
| 189 |
'id' => 'simg_car_dot', |
| 190 |
'type' => 'switch', |
| 191 |
'default' => '', |
| 192 |
'attributes' => array( |
| 193 |
'data-conditional-id' => 'simg_layout_type', |
| 194 |
'data-conditional-value' => wp_json_encode(array('carousel_slider', 'carousel_fixed')), |
| 195 |
|
| 196 |
), |
| 197 |
|
| 198 |
)); |
| 199 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 200 |
'name' => __('Carousel auto play', 'gallery-box'), |
| 201 |
'desc' => __('You can active or hide carousel autoplay.', 'gallery-box'), |
| 202 |
'id' => 'simg_car_auto', |
| 203 |
'type' => 'switch', |
| 204 |
'default' => '', |
| 205 |
'attributes' => array( |
| 206 |
'data-conditional-id' => 'simg_layout_type', |
| 207 |
'data-conditional-value' => wp_json_encode(array('carousel_slider', 'carousel_fixed')), |
| 208 |
|
| 209 |
), |
| 210 |
|
| 211 |
)); |
| 212 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 213 |
'name' => __('Number of images', 'gallery-box'), |
| 214 |
'desc' => __('Set imaegs for carosuel. You can set one image for create slider.', 'gallery-box'), |
| 215 |
'id' => 'simg_car_imgnum', |
| 216 |
'type' => 'own_slider', |
| 217 |
'min' => '1', |
| 218 |
'max' => '10', |
| 219 |
'default' => '3', // start value |
| 220 |
'value_label' => __('images:', 'gallery-box'), |
| 221 |
'attributes' => array( |
| 222 |
'data-conditional-id' => 'simg_layout_type', |
| 223 |
'data-conditional-value' => wp_json_encode(array('carousel_slider', 'carousel_fixed')), |
| 224 |
|
| 225 |
), |
| 226 |
|
| 227 |
)); |
| 228 |
|
| 229 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 230 |
'name' => __('Images height', 'gallery-box'), |
| 231 |
'desc' => __('Set image height. Image height only work fixed height layout and fixed height carosuel.', 'gallery-box'), |
| 232 |
'id' => 'simg_custom_height', |
| 233 |
'type' => 'own_slider', |
| 234 |
'min' => '0', |
| 235 |
'max' => '1000', |
| 236 |
'default' => '220', // start value |
| 237 |
'value_label' => __('px:', 'gallery-box'), |
| 238 |
'attributes' => array( |
| 239 |
'data-conditional-id' => 'simg_layout_type', |
| 240 |
'data-conditional-value' => wp_json_encode(array('normal_layout', 'carousel_fixed')), |
| 241 |
|
| 242 |
), |
| 243 |
|
| 244 |
)); |
| 245 |
|
| 246 |
|
| 247 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 248 |
'name' => __('Image size', 'gallery-box'), |
| 249 |
'desc' => __('Set image size. image size randomly set in the masonary image layout . ', 'gallery-box'), |
| 250 |
'id' => 'simg_img_size', |
| 251 |
'type' => 'pw_select', |
| 252 |
'default' => 'gbox-medium', |
| 253 |
'options' => array( |
| 254 |
'thumbnail' => __('Thumbnail ( 150px x 150px hard cropped ) ', 'gallery-box'), |
| 255 |
'medium' => __(' Medium ( 300px x 300px hard cropped ) ', 'gallery-box'), |
| 256 |
'gbox-medium' => __(' Extra medium ( 450px x 450px ) ', 'gallery-box'), |
| 257 |
'gbox-large' => __(' Large medium ( 600px x 600px ) ', 'gallery-box'), |
| 258 |
'gbox-horizontal' => __(' horizontal( 1000px x 500px ) ', 'gallery-box'), |
| 259 |
'gbox-hlarge' => __(' Large horizontal ( 1400px x 600px ) ', 'gallery-box'), |
| 260 |
'gbox-vertical' => __(' Vertical ( 600px x 900px ) ', 'gallery-box'), |
| 261 |
'large' => __('Large ( 1024px x 1024px max height 1024px )', 'gallery-box'), |
| 262 |
'full' => __('Full (original size uploaded)', 'gallery-box'), |
| 263 |
|
| 264 |
), |
| 265 |
'attributes' => array( |
| 266 |
'data-conditional-id' => 'simg_layout_type', |
| 267 |
'data-conditional-value' => wp_json_encode(array('carousel_slider', 'carousel_fixed', 'normal_layout')), |
| 268 |
|
| 269 |
), |
| 270 |
|
| 271 |
)); |
| 272 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 273 |
'name' => __('Image gallery column', 'gallery-box'), |
| 274 |
'desc' => __('Set image gallery column for this image gallery. Image column not work in justify gallery.', 'gallery-box'), |
| 275 |
'id' => 'simg_column', |
| 276 |
'type' => 'pw_select', |
| 277 |
'default' => 'default', |
| 278 |
'options' => array( |
| 279 |
'default' => __('Default', 'gallery-box'), |
| 280 |
1 => __('one column', 'gallery-box'), |
| 281 |
2 => __('Two column', 'gallery-box'), |
| 282 |
3 => __('Three column', 'gallery-box'), |
| 283 |
4 => __('Four column', 'gallery-box'), |
| 284 |
|
| 285 |
), |
| 286 |
'attributes' => array( |
| 287 |
'data-conditional-id' => 'simg_layout_type', |
| 288 |
'data-conditional-value' => wp_json_encode(array('masonry_layout', 'masonry_layout_two', 'masonry_layout_three', 'normal_layout')), |
| 289 |
|
| 290 |
), |
| 291 |
|
| 292 |
)); |
| 293 |
|
| 294 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 295 |
'name' => __('Image gallery lightbox', 'gallery-box'), |
| 296 |
'desc' => __('You may set lightbox only overlay or lihghtbox and link overlay or set image only gallery.', 'gallery-box'), |
| 297 |
'id' => 'simg_lightbox', |
| 298 |
'type' => 'pw_select', |
| 299 |
'default' => 'light_show', |
| 300 |
'options' => array( |
| 301 |
'light_show' => __('Lightbox active', 'gallery-box'), |
| 302 |
'light_hide' => __('Lightbox hide', 'gallery-box'), |
| 303 |
|
| 304 |
), |
| 305 |
|
| 306 |
)); |
| 307 |
|
| 308 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 309 |
'name' => __('Load more button', 'gallery-box'), |
| 310 |
'desc' => __('Load more button only available in pro verison.', 'gallery-box'), |
| 311 |
'id' => 'simg_loadmore', |
| 312 |
'type' => 'pw_select', |
| 313 |
'default' => 'pro1', |
| 314 |
'options' => array( |
| 315 |
'pro1' => __('Only available in pro', 'gallery-box'), |
| 316 |
'disable' => __('Disable', 'gallery-box'), |
| 317 |
|
| 318 |
), |
| 319 |
'attributes' => array( |
| 320 |
'data-conditional-id' => 'simg_layout_type', |
| 321 |
'data-conditional-value' => wp_json_encode(array('masonry_layout', 'masonry_layout_two', 'masonry_layout_three', 'normal_layout')), |
| 322 |
|
| 323 |
), |
| 324 |
|
| 325 |
)); |
| 326 |
|
| 327 |
$gallery_box_meta->add_group_field($simage_group_id, array( |
| 328 |
'name' => __('Images margin', 'gallery-box'), |
| 329 |
'desc' => __('Set image margin. The margin work in right and bottom position.', 'gallery-box'), |
| 330 |
'id' => 'simg_img_margin', |
| 331 |
'type' => 'own_slider', |
| 332 |
'min' => '0', |
| 333 |
'max' => '100', |
| 334 |
'default' => '0', // start value |
| 335 |
'value_label' => __('px:', 'gallery-box'), |
| 336 |
|
| 337 |
|
| 338 |
)); |
| 339 |
|
| 340 |
/* |
| 341 |
* Advance Image all meta options set here. |
| 342 |
*/ |
| 343 |
$gallery_box_meta->add_field(array( |
| 344 |
'name' => esc_html__('', 'gallery-box'), |
| 345 |
'id' => 'adimg_type', |
| 346 |
'type' => 'radio_image', |
| 347 |
'tab' => 'image', |
| 348 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 349 |
'options' => array( |
| 350 |
'img_add' => __('Add advance images', 'gallery-box'), |
| 351 |
'img_set' => __('Advance image gallery Settings', 'gallery-box'), |
| 352 |
), |
| 353 |
'default' => 'img_add', |
| 354 |
|
| 355 |
)); |
| 356 |
$image_group_id = $gallery_box_meta->add_field(array( |
| 357 |
'id' => 'img_main', |
| 358 |
'type' => 'group', |
| 359 |
'tab' => 'image', |
| 360 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 361 |
'before_group' => '<div id="gbox_adimg">', |
| 362 |
'after_group' => '</div>', |
| 363 |
'options' => array( |
| 364 |
'group_title' => __('Advance Image gallery item {#}', 'gallery-box'), |
| 365 |
'sortable' => true, |
| 366 |
'add_button' => __('Add more', 'gallery-box'), |
| 367 |
'remove_button' => __('Remove Entry', 'gallery-box'), |
| 368 |
), |
| 369 |
)); |
| 370 |
|
| 371 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 372 |
'name' => __('Enter gallery item title', 'gallery-box'), |
| 373 |
'desc' => __('Set Your gallery item title here.', 'gallery-box'), |
| 374 |
'id' => 'image_title', |
| 375 |
'type' => 'text', |
| 376 |
)); |
| 377 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 378 |
'name' => __('Set gallery Image', 'gallery-box'), |
| 379 |
'desc' => __('This image show in front.Big size image good for masonry image layout.', 'gallery-box'), |
| 380 |
'id' => 'image_small', |
| 381 |
'type' => 'file', |
| 382 |
)); |
| 383 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 384 |
'name' => esc_html__('', 'gallery-box'), |
| 385 |
'id' => 'advance_options', |
| 386 |
'type' => 'radio_image', |
| 387 |
'options' => array( |
| 388 |
'show_adv' => __('Show advance options', 'gallery-box'), |
| 389 |
'hide_adv' => __('Hide advance options', 'gallery-box'), |
| 390 |
), |
| 391 |
'default' => 'hide_adv', |
| 392 |
|
| 393 |
)); |
| 394 |
|
| 395 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 396 |
'name' => __('Enter link url', 'gallery-box'), |
| 397 |
'desc' => __('Please type or past your link url here. The link only show link only gallery.', 'gallery-box'), |
| 398 |
'id' => 'link_url', |
| 399 |
'type' => 'text_url', |
| 400 |
'attributes' => array( |
| 401 |
'data-conditional-id' => 'advance_options', |
| 402 |
'data-conditional-value' => 'show_adv', |
| 403 |
|
| 404 |
), |
| 405 |
|
| 406 |
)); |
| 407 |
|
| 408 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 409 |
'name' => __('Set lightbox Image', 'gallery-box'), |
| 410 |
'desc' => __('This image show when lightbox open.If you don\'t set this image, primery gallery image will be open lightbox.', 'gallery-box'), |
| 411 |
'id' => 'image_light', |
| 412 |
'type' => 'file', |
| 413 |
'attributes' => array( |
| 414 |
'data-conditional-id' => 'advance_options', |
| 415 |
'data-conditional-value' => 'show_adv', |
| 416 |
|
| 417 |
), |
| 418 |
|
| 419 |
)); |
| 420 |
|
| 421 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 422 |
'name' => __('Enter image lightbox caption', 'gallery-box'), |
| 423 |
'desc' => __('Set your lightbox caption.You can hide or show caption by lightbox settings.Default caption is item title', 'gallery-box'), |
| 424 |
'id' => 'img_caption', |
| 425 |
'type' => 'text', |
| 426 |
'attributes' => array( |
| 427 |
'data-conditional-id' => 'advance_options', |
| 428 |
'data-conditional-value' => 'show_adv', |
| 429 |
|
| 430 |
), |
| 431 |
|
| 432 |
)); |
| 433 |
|
| 434 |
$gallery_box_meta->add_group_field($image_group_id, array( |
| 435 |
'name' => __('Enter button text', 'gallery-box'), |
| 436 |
'desc' => __('Button text must be small. <strong>Note:</strong> Button text only show lightbox only mode. Default button text is( view large ).', 'gallery-box'), |
| 437 |
'id' => 'img_btn_text', |
| 438 |
'type' => 'text', |
| 439 |
'attributes' => array( |
| 440 |
'data-conditional-id' => 'advance_options', |
| 441 |
'data-conditional-value' => 'show_adv', |
| 442 |
|
| 443 |
), |
| 444 |
)); |
| 445 |
|
| 446 |
// advance gallery settings |
| 447 |
$settings_group = $gallery_box_meta->add_field(array( |
| 448 |
'id' => 'settings_main', |
| 449 |
'type' => 'group', |
| 450 |
'repeatable' => false, |
| 451 |
'options' => array( |
| 452 |
'group_title' => __('Gallery settings', 'gallery-box'), // since |
| 453 |
'closed' => false, |
| 454 |
), |
| 455 |
'before_group' => '<div id="settings_maintab">', |
| 456 |
'after_group' => '</div>', |
| 457 |
'tab' => 'image', |
| 458 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 459 |
)); |
| 460 |
|
| 461 |
|
| 462 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 463 |
'name' => __('Image gallery type', 'gallery-box'), |
| 464 |
'desc' => __('Select image gallery layout masonry or fixed height.', 'gallery-box'), |
| 465 |
'id' => 'layout_type', |
| 466 |
'type' => 'pw_select', |
| 467 |
'default' => 'masonry', |
| 468 |
'options' => array( |
| 469 |
'n_gallery' => __('Fixed height gallery layout ', 'gallery-box'), |
| 470 |
'masonry' => __('masonry layout style one', 'gallery-box'), |
| 471 |
'pro1' => __('masonry layout style two (pro feature)', 'gallery-box'), |
| 472 |
'pro2' => __('masonry layout style three (pro feature)', 'gallery-box'), |
| 473 |
|
| 474 |
), |
| 475 |
)); |
| 476 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 477 |
'name' => __('Set images height', 'gallery-box'), |
| 478 |
'desc' => __('Set image height by this settings. Image height only work fixed height gallery.', 'gallery-box'), |
| 479 |
'id' => 'img_custom_height', |
| 480 |
'type' => 'own_slider', |
| 481 |
'min' => '0', |
| 482 |
'max' => '1000', |
| 483 |
'default' => '220', // start value |
| 484 |
'value_label' => __('px:', 'gallery-box'), |
| 485 |
'attributes' => array( |
| 486 |
'data-conditional-id' => 'layout_type', |
| 487 |
'data-conditional-value' => 'n_gallery', |
| 488 |
|
| 489 |
) |
| 490 |
|
| 491 |
)); |
| 492 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 493 |
'name' => __('Image size', 'gallery-box'), |
| 494 |
'desc' => __('Set image size. image size randomly set in the masonary image layout . ', 'gallery-box'), |
| 495 |
'id' => 'adimg_img_size', |
| 496 |
'type' => 'pw_select', |
| 497 |
'default' => 'gbox-medium', |
| 498 |
'options' => array( |
| 499 |
'default' => __('Thumbnail ( 150px x 150px hard cropped ) ', 'gallery-box'), |
| 500 |
'thumbnail' => __('Thumbnail ( 150px x 150px hard cropped ) ', 'gallery-box'), |
| 501 |
'medium' => __(' Medium ( 300px x 300px hard cropped ) ', 'gallery-box'), |
| 502 |
'gbox-medium' => __(' Extra medium ( 450px x 450px ) ', 'gallery-box'), |
| 503 |
'gbox-large' => __(' Large medium ( 600px x 600px ) ', 'gallery-box'), |
| 504 |
'gbox-horizontal' => __(' horizontal( 1000px x 500px ) ', 'gallery-box'), |
| 505 |
'gbox-hlarge' => __(' Large horizontal ( 1400px x 600px ) ', 'gallery-box'), |
| 506 |
'gbox-vertical' => __(' Vertical ( 600px x 900px ) ', 'gallery-box'), |
| 507 |
'large' => __('Large ( 1024px x 1024px max height 1024px )', 'gallery-box'), |
| 508 |
'full' => __('Full (original size uploaded)', 'gallery-box'), |
| 509 |
|
| 510 |
), |
| 511 |
'attributes' => array( |
| 512 |
'data-conditional-id' => 'layout_type', |
| 513 |
'data-conditional-value' => wp_json_encode(array('masonry_layout', 'n_gallery')), |
| 514 |
|
| 515 |
) |
| 516 |
|
| 517 |
)); |
| 518 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 519 |
'name' => __('Image gallery column', 'gallery-box'), |
| 520 |
'desc' => __('Set image gallery column for this image gallery.', 'gallery-box'), |
| 521 |
'id' => 'uni_img_column', |
| 522 |
'type' => 'pw_select', |
| 523 |
'default' => 'default', |
| 524 |
'options' => array( |
| 525 |
'default' => __('Default', 'gallery-box'), |
| 526 |
1 => __('one column', 'gallery-box'), |
| 527 |
2 => __('Two column', 'gallery-box'), |
| 528 |
3 => __('Three column', 'gallery-box'), |
| 529 |
4 => __('Four column', 'gallery-box'), |
| 530 |
|
| 531 |
), |
| 532 |
|
| 533 |
)); |
| 534 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 535 |
'name' => __('Image gallery overlay', 'gallery-box'), |
| 536 |
'desc' => __('You may set lightbox only overlay or title only or link overlay or set image only gallery.', 'gallery-box'), |
| 537 |
'id' => 'gbox_img_link_type', |
| 538 |
'type' => 'pw_select', |
| 539 |
'default' => 'light', |
| 540 |
'options' => array( |
| 541 |
'light' => __('Lightbox only', 'gallery-box'), |
| 542 |
'link_only' => __('Link only', 'gallery-box'), |
| 543 |
'tit_only' => __('Title only gallery', 'gallery-box'), |
| 544 |
'img_only' => __('Image only gallery', 'gallery-box'), |
| 545 |
|
| 546 |
), |
| 547 |
)); |
| 548 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 549 |
'name' => __('Gallery items order', 'gallery-box'), |
| 550 |
'desc' => __('You can set order ascending or descending.', 'gallery-box'), |
| 551 |
'id' => 'gbox_img_order', |
| 552 |
'type' => 'pw_select', |
| 553 |
'default' => 'asc', |
| 554 |
'options' => array( |
| 555 |
'asc' => __('Ascending order', 'gallery-box'), |
| 556 |
'desc' => __('Descending order', 'gallery-box'), |
| 557 |
|
| 558 |
), |
| 559 |
)); |
| 560 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 561 |
'name' => __('Select hover animation', 'gallery-box'), |
| 562 |
'desc' => __('This hover animation only for this image gallery. This animation not work in image only gallery. <span style="color:red">Support 16 animation in pro version.</span>', 'gallery-box'), |
| 563 |
'id' => 'uni_img_hover', |
| 564 |
'type' => 'pw_select', |
| 565 |
'default' => 'default', |
| 566 |
'options' => array( |
| 567 |
'default' => __('Default', 'gallery-box'), |
| 568 |
'ehover1' => __('Animation One', 'gallery-box'), |
| 569 |
'ehover2' => __('Animation Two', 'gallery-box'), |
| 570 |
'ehover3' => __('Animation Three', 'gallery-box'), |
| 571 |
'ehover4' => __('Animation Four', 'gallery-box'), |
| 572 |
'ehover5' => __('Animation Five', 'gallery-box'), |
| 573 |
|
| 574 |
), |
| 575 |
|
| 576 |
)); |
| 577 |
|
| 578 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 579 |
'name' => __('Item margin', 'gallery-box'), |
| 580 |
'desc' => __('The margin work right and bottom. The margin set by px.', 'gallery-box'), |
| 581 |
'id' => 'img_right_margin', |
| 582 |
'type' => 'own_slider', |
| 583 |
'min' => '0', |
| 584 |
'max' => '50', |
| 585 |
'default' => '0', // start value |
| 586 |
'value_label' => __('px:', 'gallery-box'), |
| 587 |
|
| 588 |
)); |
| 589 |
|
| 590 |
$gallery_box_meta->add_group_field($settings_group, array( |
| 591 |
'name' => __('Load more button', 'gallery-box'), |
| 592 |
'desc' => __('Load more button only available in pro verison.', 'gallery-box'), |
| 593 |
'id' => 'uniqe_loadmore', |
| 594 |
'type' => 'pw_select', |
| 595 |
'default' => 'pro1', |
| 596 |
'options' => array( |
| 597 |
'pro1' => __('Only available in pro', 'gallery-box'), |
| 598 |
'disable' => __('Disable', 'gallery-box'), |
| 599 |
|
| 600 |
), |
| 601 |
)); |
| 602 |
|
| 603 |
|
| 604 |
/* |
| 605 |
* portfolio gallery meta. |
| 606 |
*/ |
| 607 |
$gallery_box_meta->add_field(array( |
| 608 |
'name' => esc_html__('', 'gallery-box'), |
| 609 |
'id' => 'portfolio_type', |
| 610 |
'type' => 'radio_image', |
| 611 |
'tab' => 'portfolio', |
| 612 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 613 |
'options' => array( |
| 614 |
'img_add' => __('Add portfolios', 'gallery-box'), |
| 615 |
'img_set' => __('Portfolio gallery Settings', 'gallery-box'), |
| 616 |
), |
| 617 |
'default' => 'img_add', |
| 618 |
|
| 619 |
)); |
| 620 |
$portfolio_group_id = $gallery_box_meta->add_field(array( |
| 621 |
'id' => 'portfo_main', |
| 622 |
'type' => 'group', |
| 623 |
'tab' => 'portfolio', |
| 624 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 625 |
'before_group' => '<div id="gbox_portfolio">', |
| 626 |
'after_group' => '</div>', |
| 627 |
'options' => array( |
| 628 |
'group_title' => __('Portfolio gallery item {#}', 'gallery-box'), |
| 629 |
'add_button' => __('Add more', 'gallery-box'), |
| 630 |
'remove_button' => __('Remove Entry', 'gallery-box'), |
| 631 |
'sortable' => true, |
| 632 |
), |
| 633 |
)); |
| 634 |
|
| 635 |
$gallery_box_meta->add_group_field($portfolio_group_id, array( |
| 636 |
'name' => __('Enter portfolio title', 'gallery-box'), |
| 637 |
'desc' => __('Portfolio item title write here.', 'gallery-box'), |
| 638 |
'id' => 'portfolio_title', |
| 639 |
'type' => 'text', |
| 640 |
)); |
| 641 |
$gallery_box_meta->add_group_field($portfolio_group_id, array( |
| 642 |
'name' => __('Set Portfolio Image', 'gallery-box'), |
| 643 |
'desc' => __('Set your portfolio image here.', 'gallery-box'), |
| 644 |
'id' => 'port_img', |
| 645 |
'type' => 'file', |
| 646 |
)); |
| 647 |
$gallery_box_meta->add_group_field($portfolio_group_id, array( |
| 648 |
'name' => __('Enter portfolio link', 'gallery-box'), |
| 649 |
'desc' => __('Enter your portfolio link here.', 'gallery-box'), |
| 650 |
'id' => 'port_link', |
| 651 |
'type' => 'text_url', |
| 652 |
|
| 653 |
)); |
| 654 |
$gallery_box_meta->add_group_field($portfolio_group_id, array( |
| 655 |
'name' => esc_html__('', 'gallery-box'), |
| 656 |
'id' => 'advance_options', |
| 657 |
'type' => 'radio_image', |
| 658 |
'options' => array( |
| 659 |
'show_adv' => __('Show advance options', 'gallery-box'), |
| 660 |
'hide_adv' => __('Hide advance options', 'gallery-box'), |
| 661 |
), |
| 662 |
'default' => 'hide_adv', |
| 663 |
|
| 664 |
)); |
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
$gallery_box_meta->add_group_field($portfolio_group_id, array( |
| 669 |
'name' => __('Set lightbox Image', 'gallery-box'), |
| 670 |
'desc' => __('This image show when lightbox open.If you don\'t set this image, gallery image will be open lightbox.', 'gallery-box'), |
| 671 |
'id' => 'image_light', |
| 672 |
'type' => 'file', |
| 673 |
'attributes' => array( |
| 674 |
'data-conditional-id' => 'advance_options', |
| 675 |
'data-conditional-value' => 'show_adv', |
| 676 |
|
| 677 |
), |
| 678 |
|
| 679 |
)); |
| 680 |
|
| 681 |
$gallery_box_meta->add_group_field($portfolio_group_id, array( |
| 682 |
'name' => __('Enter image lightbox caption', 'gallery-box'), |
| 683 |
'desc' => __('Set your lightbox caption.You can hide or show caption by lightbox settings.Default caption is item title', 'gallery-box'), |
| 684 |
'id' => 'port_caption', |
| 685 |
'type' => 'text', |
| 686 |
'attributes' => array( |
| 687 |
'data-conditional-id' => 'advance_options', |
| 688 |
'data-conditional-value' => 'show_adv', |
| 689 |
|
| 690 |
), |
| 691 |
|
| 692 |
)); |
| 693 |
|
| 694 |
|
| 695 |
// advance gallery settings |
| 696 |
$port_settings_group = $gallery_box_meta->add_field(array( |
| 697 |
'id' => 'port_settings', |
| 698 |
'type' => 'group', |
| 699 |
'repeatable' => false, |
| 700 |
'options' => array( |
| 701 |
'group_title' => __('Portfolio gallery settings', 'gallery-box'), // since |
| 702 |
'closed' => false, |
| 703 |
), |
| 704 |
'before_group' => '<div id="port_settings">', |
| 705 |
'after_group' => '</div>', |
| 706 |
'tab' => 'portfolio', |
| 707 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 708 |
)); |
| 709 |
|
| 710 |
|
| 711 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 712 |
'name' => __('Portfolio gallery type', 'gallery-box'), |
| 713 |
'desc' => __('Select image gallery layout masonry or fixed height.', 'gallery-box'), |
| 714 |
'id' => 'layout_type', |
| 715 |
'type' => 'pw_select', |
| 716 |
'default' => 'masonry', |
| 717 |
'options' => array( |
| 718 |
'fixed' => __('Fixed height gallery layout ', 'gallery-box'), |
| 719 |
'masonry' => __('masonry layout style one', 'gallery-box'), |
| 720 |
'pro1' => __('masonry layout style two (pro feature)', 'gallery-box'), |
| 721 |
'pro2' => __('masonry layout style three (pro feature)', 'gallery-box'), |
| 722 |
|
| 723 |
), |
| 724 |
)); |
| 725 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 726 |
'name' => __('Set images height', 'gallery-box'), |
| 727 |
'desc' => __('Set your image height. The height only work when you set fixed image.', 'gallery-box'), |
| 728 |
'id' => 'img_custom_height', |
| 729 |
'type' => 'own_slider', |
| 730 |
'min' => '0', |
| 731 |
'max' => '1000', |
| 732 |
'default' => '220', // start value |
| 733 |
'value_label' => __('px:', 'gallery-box'), |
| 734 |
'attributes' => array( |
| 735 |
'data-conditional-id' => 'layout_type', |
| 736 |
'data-conditional-value' => 'fixed', |
| 737 |
|
| 738 |
) |
| 739 |
|
| 740 |
)); |
| 741 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 742 |
'name' => __('Portfolio Image size', 'gallery-box'), |
| 743 |
'desc' => __('Set Portfolio image size. image size randomly set in the masonary image layout. ', 'gallery-box'), |
| 744 |
'id' => 'port_img_size', |
| 745 |
'type' => 'pw_select', |
| 746 |
'default' => 'gbox-medium', |
| 747 |
'options' => array( |
| 748 |
'default' => __('Thumbnail ( 150px x 150px hard cropped ) ', 'gallery-box'), |
| 749 |
'thumbnail' => __('Thumbnail ( 150px x 150px hard cropped ) ', 'gallery-box'), |
| 750 |
'medium' => __(' Medium ( 300px x 300px hard cropped ) ', 'gallery-box'), |
| 751 |
'gbox-medium' => __(' Extra medium ( 450px x 450px ) ', 'gallery-box'), |
| 752 |
'gbox-large' => __(' Large medium ( 600px x 600px ) ', 'gallery-box'), |
| 753 |
'gbox-horizontal' => __(' horizontal( 1000px x 500px ) ', 'gallery-box'), |
| 754 |
'gbox-hlarge' => __(' Large horizontal ( 1400px x 600px ) ', 'gallery-box'), |
| 755 |
'gbox-vertical' => __(' Vertical ( 600px x 900px ) ', 'gallery-box'), |
| 756 |
'large' => __('Large ( 1024px x 1024px max height 1024px )', 'gallery-box'), |
| 757 |
'full' => __('Full (original size uploaded)', 'gallery-box'), |
| 758 |
|
| 759 |
), |
| 760 |
'attributes' => array( |
| 761 |
'data-conditional-id' => 'layout_type', |
| 762 |
'data-conditional-value' => wp_json_encode(array('masonry_layout', 'fixed')), |
| 763 |
|
| 764 |
) |
| 765 |
|
| 766 |
)); |
| 767 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 768 |
'name' => __('Portfolio image gallery column', 'gallery-box'), |
| 769 |
'desc' => __('Set image gallery column for this image gallery.', 'gallery-box'), |
| 770 |
'id' => 'uni_img_column', |
| 771 |
'type' => 'pw_select', |
| 772 |
'default' => 'default', |
| 773 |
'options' => array( |
| 774 |
'default' => __('Default', 'gallery-box'), |
| 775 |
1 => __('one column', 'gallery-box'), |
| 776 |
2 => __('Two column', 'gallery-box'), |
| 777 |
3 => __('Three column', 'gallery-box'), |
| 778 |
4 => __('Four column', 'gallery-box'), |
| 779 |
|
| 780 |
), |
| 781 |
|
| 782 |
)); |
| 783 |
|
| 784 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 785 |
'name' => __('Select hover animation', 'gallery-box'), |
| 786 |
'desc' => __('This hover animation only for this image gallery. <span style="color:red">Support 16 animation in pro version.</span> ', 'gallery-box'), |
| 787 |
'id' => 'uni_img_hover', |
| 788 |
'type' => 'pw_select', |
| 789 |
'default' => 'default', |
| 790 |
'options' => array( |
| 791 |
'default' => __('Default', 'gallery-box'), |
| 792 |
'ehover1' => __('Animation One', 'gallery-box'), |
| 793 |
'ehover2' => __('Animation Two', 'gallery-box'), |
| 794 |
'ehover3' => __('Animation Three', 'gallery-box'), |
| 795 |
'ehover4' => __('Animation Four', 'gallery-box'), |
| 796 |
'ehover5' => __('Animation Five', 'gallery-box'), |
| 797 |
|
| 798 |
), |
| 799 |
|
| 800 |
)); |
| 801 |
|
| 802 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 803 |
'name' => __('Gallery items order', 'gallery-box'), |
| 804 |
'desc' => __('You can set order ascending or descending.', 'gallery-box'), |
| 805 |
'id' => 'gbox_portfolio_order', |
| 806 |
'type' => 'pw_select', |
| 807 |
'default' => 'asc', |
| 808 |
'options' => array( |
| 809 |
'asc' => __('Ascending order', 'gallery-box'), |
| 810 |
'desc' => __('Descending order', 'gallery-box'), |
| 811 |
|
| 812 |
), |
| 813 |
)); |
| 814 |
|
| 815 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 816 |
'name' => __('Portfolio link open', 'gallery-box'), |
| 817 |
'desc' => __('You can portfolio link self tab or new tab.', 'gallery-box'), |
| 818 |
'id' => 'gbox_portfolio_link_tergat', |
| 819 |
'type' => 'pw_select', |
| 820 |
'default' => '_blank', |
| 821 |
'options' => array( |
| 822 |
'_self' => __('Self Tab', 'gallery-box'), |
| 823 |
'_blank' => __('New Tab', 'gallery-box'), |
| 824 |
|
| 825 |
), |
| 826 |
)); |
| 827 |
|
| 828 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 829 |
'name' => __('Item margin', 'gallery-box'), |
| 830 |
'desc' => __('The margin work right and bottom. The margin set by px.', 'gallery-box'), |
| 831 |
'id' => 'img_right_margin', |
| 832 |
'type' => 'own_slider', |
| 833 |
'min' => '0', |
| 834 |
'max' => '50', |
| 835 |
'default' => '0', // start value |
| 836 |
'value_label' => __('px:', 'gallery-box'), |
| 837 |
|
| 838 |
)); |
| 839 |
|
| 840 |
$gallery_box_meta->add_group_field($port_settings_group, array( |
| 841 |
'name' => __('Load more button', 'gallery-box'), |
| 842 |
'desc' => __('Load more button only available in pro verison.', 'gallery-box'), |
| 843 |
'id' => 'uniqe_loadmore', |
| 844 |
'type' => 'pw_select', |
| 845 |
'default' => 'pro1', |
| 846 |
'options' => array( |
| 847 |
'pro1' => __('Only available in pro', 'gallery-box'), |
| 848 |
'disable' => __('Disable', 'gallery-box'), |
| 849 |
|
| 850 |
), |
| 851 |
)); |
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
/* |
| 856 |
*Youtube all options meta set here. |
| 857 |
*/ |
| 858 |
$gallery_box_meta->add_field(array( |
| 859 |
'name' => esc_html__('', 'gallery-box'), |
| 860 |
'id' => 'youtube_type', |
| 861 |
'type' => 'radio_image', |
| 862 |
'tab' => 'youtube', |
| 863 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 864 |
'options' => array( |
| 865 |
'you_add' => __('Add Youtube gallery video', 'gallery-box'), |
| 866 |
'you_set' => __('Youtube gallery settings', 'gallery-box'), |
| 867 |
), |
| 868 |
'default' => 'you_add', |
| 869 |
|
| 870 |
)); |
| 871 |
$Youtube_group_id = $gallery_box_meta->add_field(array( |
| 872 |
'id' => 'youtube_main', |
| 873 |
'type' => 'group', |
| 874 |
'options' => array( |
| 875 |
'group_title' => __('Video gallery item {#}', 'gallery-box'), |
| 876 |
'add_button' => __('Add more', 'gallery-box'), |
| 877 |
'remove_button' => __('Remove', 'gallery-box'), |
| 878 |
'closed' => false, |
| 879 |
'sortable' => true, |
| 880 |
), |
| 881 |
'before_group' => '<div id="youtube_maintab">', |
| 882 |
'after_group' => '</div>', |
| 883 |
'tab' => 'youtube', |
| 884 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 885 |
)); |
| 886 |
|
| 887 |
$gallery_box_meta->add_group_field($Youtube_group_id, array( |
| 888 |
'name' => __('Enter Gallery item title', 'gallery-box'), |
| 889 |
'desc' => __('Youtube Gallery item title enter here. ', 'gallery-box'), |
| 890 |
'id' => 'you_title', |
| 891 |
'type' => 'text', |
| 892 |
'allow' => array('url', 'attachment') |
| 893 |
|
| 894 |
)); |
| 895 |
|
| 896 |
$gallery_box_meta->add_group_field($Youtube_group_id, array( |
| 897 |
'name' => __('Youtube video link', 'gallery-box'), |
| 898 |
'desc' => __('Past or type Youtube video link. Go your Youtube url and copy link and past in this box.', 'gallery-box'), |
| 899 |
'id' => 'you_url', |
| 900 |
'type' => 'oembed', |
| 901 |
)); |
| 902 |
|
| 903 |
$gallery_box_meta->add_group_field($Youtube_group_id, array( |
| 904 |
'name' => esc_html__('', 'gallery-box'), |
| 905 |
'id' => 'you_advance', |
| 906 |
'type' => 'radio_image', |
| 907 |
'options' => array( |
| 908 |
'show_adv' => __('Show advance options', 'gallery-box'), |
| 909 |
'hide_adv' => __('Hide advance options', 'gallery-box'), |
| 910 |
), |
| 911 |
'default' => 'hide_adv', |
| 912 |
|
| 913 |
)); |
| 914 |
|
| 915 |
$gallery_box_meta->add_group_field($Youtube_group_id, array( |
| 916 |
'name' => __('Set Youtube gallery image', 'gallery-box'), |
| 917 |
'desc' => __('(optional) This image show in front. Default image is ( Youtube default image)', 'gallery-box'), |
| 918 |
'id' => 'you_image', |
| 919 |
'type' => 'file', |
| 920 |
'allow' => array('url', 'attachment'), |
| 921 |
'attributes' => array( |
| 922 |
'data-conditional-id' => 'you_advance', |
| 923 |
'data-conditional-value' => 'show_adv', |
| 924 |
|
| 925 |
), |
| 926 |
|
| 927 |
)); |
| 928 |
|
| 929 |
$gallery_box_meta->add_group_field($Youtube_group_id, array( |
| 930 |
'name' => __('Enter video lightbox caption', 'gallery-box'), |
| 931 |
'desc' => __('Set your lightbox caption.You can hide or show caption by lightbox settings.Default caption is item title', 'gallery-box'), |
| 932 |
'id' => 'You_caption', |
| 933 |
'type' => 'text', |
| 934 |
'attributes' => array( |
| 935 |
'data-conditional-id' => 'you_advance', |
| 936 |
'data-conditional-value' => 'show_adv', |
| 937 |
|
| 938 |
), |
| 939 |
)); |
| 940 |
|
| 941 |
$gallery_box_meta->add_group_field($Youtube_group_id, array( |
| 942 |
'name' => __('Enter button text', 'gallery-box'), |
| 943 |
'desc' => __('Button text must be small.Default button text is( Show video )', 'gallery-box'), |
| 944 |
'id' => 'youtube_button', |
| 945 |
'type' => 'text', |
| 946 |
'attributes' => array( |
| 947 |
'data-conditional-id' => 'you_advance', |
| 948 |
'data-conditional-value' => 'show_adv', |
| 949 |
|
| 950 |
), |
| 951 |
)); |
| 952 |
|
| 953 |
//Youtube gallery settings |
| 954 |
$you_settings = $gallery_box_meta->add_field(array( |
| 955 |
'id' => 'you_settings', |
| 956 |
'type' => 'group', |
| 957 |
'repeatable' => false, |
| 958 |
'options' => array( |
| 959 |
'group_title' => __('Youtube gallery settings', 'gallery-box'), // since |
| 960 |
'closed' => false, |
| 961 |
), |
| 962 |
'before_group' => '<div id="you_settings">', |
| 963 |
'after_group' => '</div>', |
| 964 |
'tab' => 'youtube', |
| 965 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 966 |
)); |
| 967 |
|
| 968 |
|
| 969 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 970 |
'name' => __('Youtube gallery layout', 'gallery-box'), |
| 971 |
'desc' => __('Select image gallery layout masonry or fixed height.', 'gallery-box'), |
| 972 |
'id' => 'you_layout', |
| 973 |
'type' => 'pw_select', |
| 974 |
'default' => 'masonry', |
| 975 |
'options' => array( |
| 976 |
'fixed' => __('Fixed height gallery layout ', 'gallery-box'), |
| 977 |
'masonry' => __('Masonry layout style', 'gallery-box'), |
| 978 |
|
| 979 |
), |
| 980 |
)); |
| 981 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 982 |
'name' => __('Set Youtube thumbnail height', 'gallery-box'), |
| 983 |
'desc' => __('Set Youtube video thumbnail height.', 'gallery-box'), |
| 984 |
'id' => 'thumb_height', |
| 985 |
'type' => 'own_slider', |
| 986 |
'min' => '0', |
| 987 |
'max' => '1000', |
| 988 |
'default' => '220', // start value |
| 989 |
'value_label' => __('px:', 'gallery-box'), |
| 990 |
'attributes' => array( |
| 991 |
'data-conditional-id' => 'you_layout', |
| 992 |
'data-conditional-value' => 'fixed', |
| 993 |
|
| 994 |
) |
| 995 |
|
| 996 |
)); |
| 997 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 998 |
'name' => __('Video thumbnail size', 'gallery-box'), |
| 999 |
'desc' => __('Set image size. The image size only work in custom video thumbnail. ', 'gallery-box'), |
| 1000 |
'id' => 'you_thumb_size', |
| 1001 |
'type' => 'pw_select', |
| 1002 |
'default' => 'gbox-medium', |
| 1003 |
'options' => array( |
| 1004 |
'medium' => __(' Medium ( 300px x 300px hard cropped ) ', 'gallery-box'), |
| 1005 |
'gbox-medium' => __(' Extra medium ( 450px x 450px ) ', 'gallery-box'), |
| 1006 |
'gbox-large' => __(' Large medium ( 600px x 600px ) ', 'gallery-box'), |
| 1007 |
'gbox-horizontal' => __(' horizontal( 1000px x 500px ) ', 'gallery-box'), |
| 1008 |
'gbox-hlarge' => __(' Large horizontal ( 1400px x 600px ) ', 'gallery-box'), |
| 1009 |
'gbox-vertical' => __(' Vertical ( 600px x 900px ) ', 'gallery-box'), |
| 1010 |
|
| 1011 |
), |
| 1012 |
|
| 1013 |
|
| 1014 |
)); |
| 1015 |
|
| 1016 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1017 |
'name' => __('Video autoplay', 'gallery-box'), |
| 1018 |
'desc' => __('You can show or hide active or hide autoplay.', 'gallery-box'), |
| 1019 |
'id' => 'youtube_auto', |
| 1020 |
'type' => 'pw_select', |
| 1021 |
'default' => 'default', |
| 1022 |
'options' => array( |
| 1023 |
'default' => __('Default', 'gallery-box'), |
| 1024 |
'yes' => __('Active', 'gallery-box'), |
| 1025 |
'no' => __('Hide', 'gallery-box'), |
| 1026 |
|
| 1027 |
), |
| 1028 |
|
| 1029 |
)); |
| 1030 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1031 |
'name' => __('Show video icon', 'gallery-box'), |
| 1032 |
'desc' => __('You can show or hide video play icon.', 'gallery-box'), |
| 1033 |
'id' => 'video_icon', |
| 1034 |
'type' => 'pw_select', |
| 1035 |
'default' => 'show', |
| 1036 |
'options' => array( |
| 1037 |
'show' => __('Show', 'gallery-box'), |
| 1038 |
'hide' => __('Hide', 'gallery-box'), |
| 1039 |
|
| 1040 |
), |
| 1041 |
|
| 1042 |
)); |
| 1043 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1044 |
'name' => __('Youtube gallery column', 'gallery-box'), |
| 1045 |
'desc' => __('Set Youtbe gallery column for this Youtbe gallery.', 'gallery-box'), |
| 1046 |
'id' => 'you_column', |
| 1047 |
'type' => 'pw_select', |
| 1048 |
'default' => 'default', |
| 1049 |
'options' => array( |
| 1050 |
'default' => __('Default', 'gallery-box'), |
| 1051 |
1 => __('one column', 'gallery-box'), |
| 1052 |
2 => __('Two column', 'gallery-box'), |
| 1053 |
3 => __('Three column', 'gallery-box'), |
| 1054 |
4 => __('Four column', 'gallery-box'), |
| 1055 |
|
| 1056 |
), |
| 1057 |
|
| 1058 |
)); |
| 1059 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1060 |
'name' => __('Select hover animation', 'gallery-box'), |
| 1061 |
'desc' => __('This hover animation only for this Youtube gallery. <span style="color:red">Support 16 animation in pro version.</span>', 'gallery-box'), |
| 1062 |
'id' => 'you_hover', |
| 1063 |
'type' => 'pw_select', |
| 1064 |
'default' => 'default', |
| 1065 |
'options' => array( |
| 1066 |
'default' => __('Default', 'gallery-box'), |
| 1067 |
'ehover1' => __('Animation One', 'gallery-box'), |
| 1068 |
'ehover2' => __('Animation Two', 'gallery-box'), |
| 1069 |
'ehover3' => __('Animation Three', 'gallery-box'), |
| 1070 |
'ehover4' => __('Animation Four', 'gallery-box'), |
| 1071 |
'ehover5' => __('Animation Five', 'gallery-box'), |
| 1072 |
|
| 1073 |
), |
| 1074 |
|
| 1075 |
)); |
| 1076 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1077 |
'name' => __('Gallery items order', 'gallery-box'), |
| 1078 |
'desc' => __('You can set order ascending or descending.', 'gallery-box'), |
| 1079 |
'id' => 'gbox_you_order', |
| 1080 |
'type' => 'pw_select', |
| 1081 |
'default' => 'asc', |
| 1082 |
'options' => array( |
| 1083 |
'asc' => __('Ascending order', 'gallery-box'), |
| 1084 |
'desc' => __('Descending order', 'gallery-box'), |
| 1085 |
|
| 1086 |
), |
| 1087 |
)); |
| 1088 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1089 |
'name' => __('Item margin', 'gallery-box'), |
| 1090 |
'desc' => __('The margin work right and bottom. The margin set by px.', 'gallery-box'), |
| 1091 |
'id' => 'you_margin', |
| 1092 |
'type' => 'own_slider', |
| 1093 |
'min' => '0', |
| 1094 |
'max' => '50', |
| 1095 |
'default' => '0', // start value |
| 1096 |
'value_label' => __('px:', 'gallery-box'), |
| 1097 |
|
| 1098 |
)); |
| 1099 |
|
| 1100 |
$gallery_box_meta->add_group_field($you_settings, array( |
| 1101 |
'name' => __('Load more button for this gallery', 'gallery-box'), |
| 1102 |
'desc' => __('Load more button only available in pro verison.', 'gallery-box'), |
| 1103 |
'id' => 'you_loadmore', |
| 1104 |
'type' => 'pw_select', |
| 1105 |
'default' => 'pro1', |
| 1106 |
'options' => array( |
| 1107 |
'pro1' => __('Only available in pro', 'gallery-box'), |
| 1108 |
'disable' => __('Disable', 'gallery-box'), |
| 1109 |
|
| 1110 |
), |
| 1111 |
)); |
| 1112 |
|
| 1113 |
|
| 1114 |
|
| 1115 |
/* |
| 1116 |
* Iframe gallery meta options. |
| 1117 |
*/ |
| 1118 |
$gallery_box_meta->add_field(array( |
| 1119 |
'name' => esc_html__('', 'gallery-box'), |
| 1120 |
'id' => 'iframe_type', |
| 1121 |
'type' => 'radio_image', |
| 1122 |
'tab' => 'iframe', |
| 1123 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 1124 |
'options' => array( |
| 1125 |
'iframe_add' => __('Add iframe gallery url', 'gallery-box'), |
| 1126 |
'iframe_set' => __('iframe gallery settings', 'gallery-box'), |
| 1127 |
), |
| 1128 |
'default' => 'iframe_add', |
| 1129 |
|
| 1130 |
)); |
| 1131 |
$iframe_group_id = $gallery_box_meta->add_field(array( |
| 1132 |
'id' => 'iframe_main', |
| 1133 |
'type' => 'group', |
| 1134 |
'options' => array( |
| 1135 |
'group_title' => __('iframe gallery item {#}', 'gallery-box'), // since |
| 1136 |
'add_button' => __('Add more', 'gallery-box'), |
| 1137 |
'remove_button' => __('Remove', 'gallery-box'), |
| 1138 |
'closed' => false, |
| 1139 |
'sortable' => true, |
| 1140 |
), |
| 1141 |
'before_group' => '<div id="iframe_maintab">', |
| 1142 |
'after_group' => '</div>', |
| 1143 |
'tab' => 'iframe', |
| 1144 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 1145 |
)); |
| 1146 |
$gallery_box_meta->add_group_field($iframe_group_id, array( |
| 1147 |
'name' => __('Enter gallery item title', 'gallery-box'), |
| 1148 |
'desc' => __('Iframe gallery item title enter here.', 'gallery-box'), |
| 1149 |
'id' => 'iframe_title', |
| 1150 |
'type' => 'text', |
| 1151 |
)); |
| 1152 |
$gallery_box_meta->add_group_field($iframe_group_id, array( |
| 1153 |
'name' => __('Set Iframe gallery image', 'gallery-box'), |
| 1154 |
'desc' => __('This image show in front.Image size (300*300) for 4 column,(450*450) for 3 column, (600*600) for 2 column.All images use same size for better view.', 'gallery-box'), |
| 1155 |
'id' => 'Iframe_image', |
| 1156 |
'type' => 'file', |
| 1157 |
)); |
| 1158 |
$gallery_box_meta->add_group_field($iframe_group_id, array( |
| 1159 |
'name' => __('Enter page url', 'gallery-box'), |
| 1160 |
'desc' => __('Copy your webpage url and past this box.', 'gallery-box'), |
| 1161 |
'id' => 'iframe_url', |
| 1162 |
'type' => 'text_url', |
| 1163 |
)); |
| 1164 |
$gallery_box_meta->add_group_field($iframe_group_id, array( |
| 1165 |
'name' => esc_html__('', 'gallery-box'), |
| 1166 |
'id' => 'iframe_advance', |
| 1167 |
'type' => 'radio_image', |
| 1168 |
'options' => array( |
| 1169 |
'show_adv' => __('Show advance options', 'gallery-box'), |
| 1170 |
'hide_adv' => __('Hide advance options', 'gallery-box'), |
| 1171 |
), |
| 1172 |
'default' => 'hide_adv', |
| 1173 |
|
| 1174 |
)); |
| 1175 |
$gallery_box_meta->add_group_field($iframe_group_id, array( |
| 1176 |
'name' => __('Enter lightbox iframe caption', 'gallery-box'), |
| 1177 |
'desc' => __('Set your lightbox caption.You can hide or show caption by lightbox settings.Default caption is item title', 'gallery-box'), |
| 1178 |
'id' => 'iframe_caption', |
| 1179 |
'type' => 'text', |
| 1180 |
'attributes' => array( |
| 1181 |
'data-conditional-id' => 'iframe_advance', |
| 1182 |
'data-conditional-value' => 'show_adv', |
| 1183 |
|
| 1184 |
), |
| 1185 |
)); |
| 1186 |
|
| 1187 |
$gallery_box_meta->add_group_field($iframe_group_id, array( |
| 1188 |
'name' => __('Enter button text', 'gallery-box'), |
| 1189 |
'desc' => __('Button text must be small.Default button text is( SHOW IFRAME )', 'gallery-box'), |
| 1190 |
'id' => 'iframe_button', |
| 1191 |
'type' => 'text', |
| 1192 |
'attributes' => array( |
| 1193 |
'data-conditional-id' => 'iframe_advance', |
| 1194 |
'data-conditional-value' => 'show_adv', |
| 1195 |
|
| 1196 |
), |
| 1197 |
)); |
| 1198 |
|
| 1199 |
//iframe gallery settings |
| 1200 |
$iframe_settings = $gallery_box_meta->add_field(array( |
| 1201 |
'id' => 'iframe_settings', |
| 1202 |
'type' => 'group', |
| 1203 |
'repeatable' => false, |
| 1204 |
'options' => array( |
| 1205 |
'group_title' => __('iframe gallery settings', 'gallery-box'), |
| 1206 |
'closed' => false, |
| 1207 |
), |
| 1208 |
'before_group' => '<div id="iframe_settings">', |
| 1209 |
'after_group' => '</div>', |
| 1210 |
'tab' => 'iframe', |
| 1211 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 1212 |
)); |
| 1213 |
|
| 1214 |
|
| 1215 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1216 |
'name' => __('iframe gallery layout', 'gallery-box'), |
| 1217 |
'desc' => __('Select iframe gallery layout masonry or fixed height.', 'gallery-box'), |
| 1218 |
'id' => 'iframe_layout', |
| 1219 |
'type' => 'pw_select', |
| 1220 |
'default' => 'masonry', |
| 1221 |
'options' => array( |
| 1222 |
'fixed' => __('Fixed height gallery layout ', 'gallery-box'), |
| 1223 |
'masonry' => __('Masonry layout', 'gallery-box'), |
| 1224 |
|
| 1225 |
), |
| 1226 |
)); |
| 1227 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1228 |
'name' => __('Set iframe thumbnail height', 'gallery-box'), |
| 1229 |
'desc' => __('Set iframe video thumbnail height.', 'gallery-box'), |
| 1230 |
'id' => 'iframe_height', |
| 1231 |
'type' => 'own_slider', |
| 1232 |
'min' => '0', |
| 1233 |
'max' => '1000', |
| 1234 |
'default' => '220', // start value |
| 1235 |
'value_label' => __('px:', 'gallery-box'), |
| 1236 |
'attributes' => array( |
| 1237 |
'data-conditional-id' => 'iframe_layout', |
| 1238 |
'data-conditional-value' => 'fixed', |
| 1239 |
|
| 1240 |
) |
| 1241 |
|
| 1242 |
)); |
| 1243 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1244 |
'name' => __('iframe thumbnail size', 'gallery-box'), |
| 1245 |
'desc' => __('Set image size. image size set for iframe gallery. ', 'gallery-box'), |
| 1246 |
'id' => 'iframe_thumb_size', |
| 1247 |
'type' => 'pw_select', |
| 1248 |
'default' => 'gbox-medium', |
| 1249 |
'options' => array( |
| 1250 |
'medium' => __(' Medium ( 300px x 300px hard cropped ) ', 'gallery-box'), |
| 1251 |
'gbox-medium' => __(' Extra medium ( 450px x 450px ) ', 'gallery-box'), |
| 1252 |
'gbox-large' => __(' Large medium ( 600px x 600px ) ', 'gallery-box'), |
| 1253 |
'gbox-horizontal' => __(' horizontal( 1000px x 500px ) ', 'gallery-box'), |
| 1254 |
'gbox-hlarge' => __(' Large horizontal ( 1400px x 600px ) ', 'gallery-box'), |
| 1255 |
'gbox-vertical' => __(' Vertical ( 600px x 900px ) ', 'gallery-box'), |
| 1256 |
|
| 1257 |
), |
| 1258 |
|
| 1259 |
|
| 1260 |
)); |
| 1261 |
|
| 1262 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1263 |
'name' => __('Vimeo gallery column', 'gallery-box'), |
| 1264 |
'desc' => __('Set iframe gallery column for this iframe gallery.', 'gallery-box'), |
| 1265 |
'id' => 'iframe_column', |
| 1266 |
'type' => 'pw_select', |
| 1267 |
'default' => 'default', |
| 1268 |
'options' => array( |
| 1269 |
'default' => __('Default', 'gallery-box'), |
| 1270 |
1 => __('one column', 'gallery-box'), |
| 1271 |
2 => __('Two column', 'gallery-box'), |
| 1272 |
3 => __('Three column', 'gallery-box'), |
| 1273 |
4 => __('Four column', 'gallery-box'), |
| 1274 |
|
| 1275 |
), |
| 1276 |
|
| 1277 |
)); |
| 1278 |
|
| 1279 |
|
| 1280 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1281 |
'name' => __('Select hover animation', 'gallery-box'), |
| 1282 |
'desc' => __('This hover animation only for this iframe gallery. <span style="color:red">Support 16 animation in pro version.</span>', 'gallery-box'), |
| 1283 |
'id' => 'iframe_hover', |
| 1284 |
'type' => 'pw_select', |
| 1285 |
'default' => 'default', |
| 1286 |
'options' => array( |
| 1287 |
'default' => __('Default', 'gallery-box'), |
| 1288 |
'ehover1' => __('Animation One', 'gallery-box'), |
| 1289 |
'ehover2' => __('Animation Two', 'gallery-box'), |
| 1290 |
'ehover3' => __('Animation Three', 'gallery-box'), |
| 1291 |
'ehover4' => __('Animation Four', 'gallery-box'), |
| 1292 |
'ehover5' => __('Animation Five', 'gallery-box'), |
| 1293 |
|
| 1294 |
), |
| 1295 |
|
| 1296 |
)); |
| 1297 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1298 |
'name' => __('Gallery items order', 'gallery-box'), |
| 1299 |
'desc' => __('You can set order ascending or descending.', 'gallery-box'), |
| 1300 |
'id' => 'gbox_iframe_order', |
| 1301 |
'type' => 'pw_select', |
| 1302 |
'default' => 'asc', |
| 1303 |
'options' => array( |
| 1304 |
'asc' => __('Ascending order', 'gallery-box'), |
| 1305 |
'desc' => __('Descending order', 'gallery-box'), |
| 1306 |
|
| 1307 |
), |
| 1308 |
)); |
| 1309 |
|
| 1310 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1311 |
'name' => __('Item margin', 'gallery-box'), |
| 1312 |
'desc' => __('The margin work right and bottom. The margin set by px.', 'gallery-box'), |
| 1313 |
'id' => 'iframe_margin', |
| 1314 |
'type' => 'own_slider', |
| 1315 |
'min' => '0', |
| 1316 |
'max' => '50', |
| 1317 |
'default' => '0', // start value |
| 1318 |
'value_label' => __('px:', 'gallery-box'), |
| 1319 |
|
| 1320 |
)); |
| 1321 |
|
| 1322 |
$gallery_box_meta->add_group_field($iframe_settings, array( |
| 1323 |
'name' => __('Load more button for this gallery', 'gallery-box'), |
| 1324 |
'desc' => __('Load more button only available in pro verison.', 'gallery-box'), |
| 1325 |
'id' => 'iframe_loadmore', |
| 1326 |
'type' => 'pw_select', |
| 1327 |
'default' => 'pro1', |
| 1328 |
'options' => array( |
| 1329 |
'pro1' => __('Only available in pro', 'gallery-box'), |
| 1330 |
'disable' => __('Disable', 'gallery-box'), |
| 1331 |
|
| 1332 |
), |
| 1333 |
)); |
| 1334 |
|
| 1335 |
/* |
| 1336 |
* Custom css field. |
| 1337 |
*/ |
| 1338 |
|
| 1339 |
$gallery_box_meta->add_field(array( |
| 1340 |
'name' => __('Custom css', 'gallery-box'), |
| 1341 |
'desc' => __('Enter your custom css code here.This css code only for this gallery.', 'gallery-box'), |
| 1342 |
'id' => 'custom_css', |
| 1343 |
'type' => 'textarea_code', |
| 1344 |
'default' => '', |
| 1345 |
'tab' => 'css', |
| 1346 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_row_cb'), |
| 1347 |
|
| 1348 |
|
| 1349 |
)); |
| 1350 |
|
| 1351 |
$yout_gallery = $gallery_box_meta->add_field(array( |
| 1352 |
'id' => 'youtu_gallery', |
| 1353 |
'type' => 'group', |
| 1354 |
'repeatable' => false, |
| 1355 |
'options' => array( |
| 1356 |
'group_title' => __('Youtube Gallery', 'gallery-box'), // since |
| 1357 |
'closed' => false, |
| 1358 |
), |
| 1359 |
'before_group' => '<div id="tab_gallery">', |
| 1360 |
'after_group' => '</div>', |
| 1361 |
'tab' => 'youtubee', |
| 1362 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 1363 |
)); |
| 1364 |
$gallery_box_meta->add_group_field($yout_gallery, array( |
| 1365 |
'name' => '', |
| 1366 |
'desc' => __( |
| 1367 |
' |
| 1368 |
<div class="gboxhelp-text"> |
| 1369 |
<a href="https://wpthemespace.com/product/gallery-box-pro/?add-to-cart=688" target="_blank"> |
| 1370 |
<img src="' . plugin_dir_url(dirname(__FILE__)) . 'images/gallery-youtube.png' . '" alt="pro image" /> |
| 1371 |
</a> |
| 1372 |
<a href="' . esc_url('https://gbox.wpteamx.com/youtube-video-gallery/') . '" target="_blank" class="gbox-demo-link">Show youtube gallery demo</a> |
| 1373 |
</div>', |
| 1374 |
'gallery-box' |
| 1375 |
), |
| 1376 |
'id' => 'tab_gal', |
| 1377 |
'type' => 'text', |
| 1378 |
|
| 1379 |
)); |
| 1380 |
|
| 1381 |
$vim_gallery = $gallery_box_meta->add_field(array( |
| 1382 |
'id' => 'vim_gallery', |
| 1383 |
'type' => 'group', |
| 1384 |
'repeatable' => false, |
| 1385 |
'options' => array( |
| 1386 |
'group_title' => __('Vimeo Gallery', 'gallery-box'), // since |
| 1387 |
'closed' => false, |
| 1388 |
), |
| 1389 |
'before_group' => '<div id="tab_gallery">', |
| 1390 |
'after_group' => '</div>', |
| 1391 |
'tab' => 'vime', |
| 1392 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 1393 |
)); |
| 1394 |
$gallery_box_meta->add_group_field($vim_gallery, array( |
| 1395 |
'name' => '', |
| 1396 |
'desc' => __( |
| 1397 |
' |
| 1398 |
<div class="gboxhelp-text"> |
| 1399 |
<a href="https://wpthemespace.com/product/gallery-box-pro/?add-to-cart=688" target="_blank"> |
| 1400 |
<img src="' . plugin_dir_url(dirname(__FILE__)) . 'images/gallery-vimeo.png' . '" alt="pro image" /> |
| 1401 |
</a><br > |
| 1402 |
<a href="' . esc_url('https://gbox.wpteamx.com/vimeo-video-gallery/') . '" target="_blank" class="gbox-demo-link">Show vimeo gallery demo</a> |
| 1403 |
</div>', |
| 1404 |
'gallery-box' |
| 1405 |
), |
| 1406 |
'id' => 'tab_gal', |
| 1407 |
'type' => 'text', |
| 1408 |
|
| 1409 |
)); |
| 1410 |
|
| 1411 |
$tab_gallery = $gallery_box_meta->add_field(array( |
| 1412 |
'id' => 'tab_gallery', |
| 1413 |
'type' => 'group', |
| 1414 |
'repeatable' => false, |
| 1415 |
'options' => array( |
| 1416 |
'group_title' => __('Tab Gallery', 'gallery-box'), // since |
| 1417 |
'closed' => false, |
| 1418 |
), |
| 1419 |
'before_group' => '<div id="tab_gallery">', |
| 1420 |
'after_group' => '</div>', |
| 1421 |
'tab' => 'tabgallery', |
| 1422 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 1423 |
)); |
| 1424 |
$gallery_box_meta->add_group_field($tab_gallery, array( |
| 1425 |
'name' => '', |
| 1426 |
'desc' => __( |
| 1427 |
' |
| 1428 |
<div class="gboxhelp-text"> |
| 1429 |
<a href="https://wpthemespace.com/product/gallery-box-pro/?add-to-cart=688" target="_blank"> |
| 1430 |
<img src="' . plugin_dir_url(dirname(__FILE__)) . 'images/gallery-tab.png' . '" alt="pro image" /> |
| 1431 |
</a> |
| 1432 |
</div>', |
| 1433 |
'gallery-box' |
| 1434 |
), |
| 1435 |
'id' => 'tab_gal', |
| 1436 |
'type' => 'text', |
| 1437 |
|
| 1438 |
)); |
| 1439 |
$help_groupe = $gallery_box_meta->add_field(array( |
| 1440 |
'id' => 'gbox_help', |
| 1441 |
'type' => 'group', |
| 1442 |
'repeatable' => false, |
| 1443 |
'options' => array( |
| 1444 |
'group_title' => __('Upgrade', 'gallery-box'), // since |
| 1445 |
'closed' => false, |
| 1446 |
), |
| 1447 |
'before_group' => '<div id="gbox_helptab">', |
| 1448 |
'after_group' => '</div>', |
| 1449 |
'tab' => 'donation', |
| 1450 |
'render_row_cb' => array('CMB2_Tabs', 'tabs_render_group_row_cb'), |
| 1451 |
)); |
| 1452 |
$gallery_box_meta->add_group_field($help_groupe, array( |
| 1453 |
'name' => '', |
| 1454 |
'desc' => __( |
| 1455 |
' |
| 1456 |
<div class="gboxhelp-text"> |
| 1457 |
<a href="https://wpthemespace.com/product/gallery-box-pro/?add-to-cart=688" target="_blank"> |
| 1458 |
<img src="' . plugin_dir_url(dirname(__FILE__)) . 'images/gbox-pro.png' . '" alt="pro image" /> |
| 1459 |
</a> |
| 1460 |
</div>', |
| 1461 |
'gallery-box' |
| 1462 |
), |
| 1463 |
'id' => 'donar_helper', |
| 1464 |
'type' => 'text', |
| 1465 |
|
| 1466 |
)); |
| 1467 |
|
| 1468 |
|
| 1469 |
$gallery_box_info = new_cmb2_box(array( |
| 1470 |
'id' => 'gbox_doc_inf', |
| 1471 |
'title' => __('Video tutorial and demo', 'gallery-box'), |
| 1472 |
'object_types' => array('gallery_box',), // Post type |
| 1473 |
'context' => 'side', |
| 1474 |
'priority' => 'high', |
| 1475 |
'show_names' => true, |
| 1476 |
)); |
| 1477 |
|
| 1478 |
// Regular text field |
| 1479 |
$gallery_box_info->add_field(array( |
| 1480 |
'name' => '<a class="button button-primary button-large" target="_blank" href="https://gbox.wpteamx.com/">' . __('View demo and video tutorial', 'gallery-box') . '</a>', |
| 1481 |
/*'desc' => '<a class="five-star" target="_blank" href="https://wordpress.org/support/plugin/gallery-box/reviews/?filter=5">'.__('If you love the gallery then Please give five stars rating . Your five stars will encourage me a lot.','gallery-box').'</a>',*/ |
| 1482 |
'id' => 'gbox_info', |
| 1483 |
'type' => 'text', |
| 1484 |
)); |
| 1485 |
} |
| 1486 |
add_action('cmb2_admin_init', 'gbox_meta_group'); |
| 1487 |
endif; |
| 1488 |
|