function js_options() { return array('ajaxurl' => uber_grid_ajax_url(), 'autosize' => $this->cell_autosize, 'max_width' => $this->max_width, 'lightbox' => uber_grid_get_active_lightbox(), 'lightbox_options' => $this->get_lightbox_options(), 'size' => array('width' => $this->cell_width, 'height' => $this->cell_height), 'size440' => array('width' => $this->responsive_440_cell_width, 'height' => $this->responsive_440_cell_height), 'size768' => array('width' => $this->responsive_768_cell_width, 'height' => $this->responsive_768_cell_height), 'gutter' => $this->cell_gap, 'gutter_768' => $this->responsive_768_cell_gap, 'gutter_440' => $this->responsive_440_cell_gap, 'cell_border' => $this->cell_border_width, 'cell_border_440' => $this->responsive_440_cell_border_width, 'cell_border_768' => $this->responsive_768_cell_border_width); }
<?php } else { ?> <strong><?php _e('FooBox is not installed, or was not activated.', 'uber-grid'); ?> </strong> <?php echo sprintf(__('You can buy FooBox at: <a href="%s" target="_blank">its official site</a>', 'uber-grid'), 'http://http://getfoobox.com'); ?> <?php } ?> <br> <input type="radio" name="uber_grid_lightbox" value="custom" <?php checked('custom', uber_grid_get_active_lightbox()); ?> ><?php _e('Custom', 'uber-grid'); ?> </input> </p> </li> <li class="clear"><h4><?php _e('PrettyPhoto options', 'uber-grid'); ?> </h4></li> <li class="clear"> <label class="asg-options-label"><?php _e('PrettyPhoto skin', 'uber-grid');
<input type="text" class="full-width" name="<?php echo $name_prefix; ?> [lightbox_<?php echo $service; ?> ]" value="<?php echo esc_attr($cell->{$service_name}); ?> "> </div> <?php } ?> <?php if (uber_grid_get_active_lightbox() != 'magnific-popup') { ?> </div> <?php } ?> </div> </div> <br class="clear"> </div> <div class="section hover"> <label class="huge"><input type="checkbox" name="<?php echo $name_prefix; ?> [hover_enable]" value="1" <?php echo checked($cell->hover_enable);
function get_default_link_attr($grid) { $attr = array('class' => ''); $attr['href'] = $this->get_link_url(); if ($this->link_mode == 'url' && $this->link_rel) { $attr['rel'] = $this->link_rel; } if ($this->link_mode == 'url' && $this->link_target) { $attr['target'] = $this->link_target; } if ($this->lightbox_image) { $attr['data-lightbox-image-id'] = $this->lightbox_image; } if (uber_grid_get_active_lightbox() == 'custom') { if ($rel = get_option('uber_grid_link_rel')) { $attr['rel'] = $rel; } if ($custom_attr = get_option('uber_grid_link_custom_attr_name')) { $attr[$custom_attr] = get_option('uber_grid_link_custom_attr_value'); } if ($class = get_option('uber_grid_link_class')) { $attr['class'] .= $class . " "; } } if (uber_grid_get_active_lightbox() == 'prettyphoto') { $attr['data-lightbox'] = "prettyPhoto[{$grid->id}]"; } return $attr; }
function enqueue_lightbox_scripts() { switch (uber_grid_get_active_lightbox()) { case 'swipebox': wp_enqueue_script('jquery.swipebox', UBERGRID_URL . "vendor/swipebox/jquery.swipebox.js", array('jquery'), UBERGRID_VERSION); break; case 'prettyphoto': wp_enqueue_script('jquery.prettyphoto', UBERGRID_URL . "vendor/prettyphoto/jquery.prettyPhoto.js", array('jquery'), UBERGRID_VERSION); break; case 'jetpack': //wp_enqueue_script(''); if (class_exists('Jetpack_Carousel')) { $carousel = new Jetpack_Carousel(); $carousel->enqueue_assets(false); } case 'magnific-popup': default: wp_enqueue_script('jquery.magnific-popup', UBERGRID_URL . "assets/js/jquery.magnific-popup.js", array('jquery'), UBERGRID_VERSION); } }