function _get_page() { $grid = new UberGrid_Grid($_REQUEST['id']); ob_start(); $grid->render_cells($_REQUEST['page']); echo trim(ob_get_clean()); exit; }
function _wp_enqueue_scripts() { if (is_admin()) { return; } $this->enqueue_lightbox_styles(); wp_enqueue_style('uber-grid', UBERGRID_URL . "assets/css/uber-grid.css", array('jquery.magnific-popup-ubergrid'), UBERGRID_VERSION); if (get_option('uber_grid_use_external_stylesheet')) { wp_enqueue_style('uber-grid-dynamic', UBERGRID_URL . "frontend-style.css.php", array('uber-grid'), UberGrid_Grid::css_timestamp()); } if (!get_option('uber_grid_force_new_jquery')) { wp_enqueue_script('packery', UBERGRID_URL . "assets/js/packery.pkgd.min.js", array('jquery'), UBERGRID_VERSION); $this->enqueue_lightbox_scripts(); wp_enqueue_script('uber-grid', UBERGRID_URL . "assets/js/uber-grid.js", array('jquery', 'packery'), UBERGRID_VERSION); } }
function _wp_ajax_build_cells() { $data = wp_parse_args(stripslashes_deep($_POST['data'])); $grid = new UberGrid_Grid(array(), $data); $grid->id = $data['post_ID']; foreach ($grid->build_auto_cells(array('generate_thumbnails' => true)) as $cell) { require 'templates/part-cell.php'; } exit(0); }
<?php require '../../../wp-load.php'; if (!class_exists('UberGrid_Grid')) { require_once 'uber-grid.php'; } header('Content-type: text/css'); foreach (get_posts('post_type=uber-grid&posts_per_page=-1') as $grid_post) { $grid = new UberGrid_Grid($grid_post->ID); $grid->render(array('css' => true, 'style_tag' => false, 'generate_thumbnails' => false, 'html' => false)); } exit;