当前位置: 首页>>代码示例>>PHP>>正文


PHP Essential_Grid_Base类代码示例

本文整理汇总了PHP中Essential_Grid_Base的典型用法代码示例。如果您正苦于以下问题:PHP Essential_Grid_Base类的具体用法?PHP Essential_Grid_Base怎么用?PHP Essential_Grid_Base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Essential_Grid_Base类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_meta_query

 /**
  * get meta query for filtering woocommerce posts. 
  */
 public static function get_meta_query($args)
 {
     $base = new Essential_Grid_Base();
     $regPriceFrom = $base->getVal($args, self::ARG_REGULAR_PRICE_FROM);
     $regPriceTo = $base->getVal($args, self::ARG_REGULAR_PRICE_TO);
     $salePriceFrom = $base->getVal($args, self::ARG_SALE_PRICE_FROM);
     $salePriceTo = $base->getVal($args, self::ARG_SALE_PRICE_TO);
     $inStockOnly = $base->getVal($args, self::ARG_IN_STOCK_ONLY);
     $featuredOnly = $base->getVal($args, self::ARG_FEATURED_ONLY);
     $arrQueries = array();
     //get regular price array
     if (!empty($regPriceFrom) || !empty($regPriceTo)) {
         $arrQueries[] = self::get_price_query($regPriceFrom, $regPriceTo, self::META_REGULAR_PRICE);
     }
     //get sale price array
     if (!empty($salePriceFrom) || !empty($salePriceTo)) {
         $arrQueries[] = self::get_price_query($salePriceFrom, $salePriceTo, self::META_SALE_PRICE);
     }
     if ($inStockOnly == 'true') {
         $query = array('key' => self::META_STOCK_STATUS, 'value' => 'instock');
         $arrQueries[] = $query;
     }
     if ($featuredOnly == 'true') {
         $query = array('key' => self::META_FEATURED, 'value' => 'yes');
         $arrQueries[] = $query;
     }
     $query = array();
     if (!empty($arrQueries)) {
         $query = array('meta_query' => $arrQueries);
     }
     return $query;
 }
开发者ID:pcuervo,项目名称:odc,代码行数:35,代码来源:woocommerce.class.php

示例2: output_global_css_styles_wrapped

 /**
  * echo global CSS with wrapper
  */
 public static function output_global_css_styles_wrapped()
 {
     $base = new Essential_Grid_Base();
     echo '<style type="text/css">';
     echo $base->compress_css(self::get_global_css_styles());
     echo '</style>' . "\n";
 }
开发者ID:Lumbe,项目名称:dev_servus,代码行数:10,代码来源:global-css.class.php

示例3: split_terms_fix

 /**
  * Search all Grids and change the term IDs set in the selected terms if needed
  * @since: 2.1.0
  **/
 static function split_terms_fix($old_term_id, $new_term_id, $term_taxonomy_id, $taxonomy)
 {
     $base = new Essential_Grid_Base();
     $lang = array();
     if (Essential_Grid_Wpml::is_wpml_exists()) {
         $lang = icl_get_languages();
     }
     $grids = Essential_Grid::get_essential_grids();
     if (!empty($grids)) {
         foreach ($grids as $grid) {
             $selected = json_decode($grid->postparams, true);
             $post_category = $base->getVar($selected, 'post_category');
             $cat_tax = $base->getCatAndTaxData($post_category);
             $cats = array();
             if (!empty($cat_tax['cats'])) {
                 $cats = explode(',', $cat_tax['cats']);
             }
             $taxes = array('post_tag');
             if (!empty($cat_tax['tax'])) {
                 $taxes = explode(',', $cat_tax['tax']);
             }
             $cont = false;
             if (!empty($cats)) {
                 foreach ($cats as $cat) {
                     if ($old_term_id == $cat && in_array($taxonomy, $taxes)) {
                         //ID needs to be changed
                         foreach ($taxes as $t) {
                             //replace all occuring old term id with the new term id and then Save the Grid
                             $post_category = str_replace($t . '_' . $old_term_id, $t . '_' . $new_term_id, $post_category);
                         }
                         $selected['post_category'] = $post_category;
                         $grid->postparams = $selected;
                         $grid->params = json_decode($grid->params, true);
                         $grid->layers = json_decode($grid->layers, true);
                         $new_grid = (array) $grid;
                         //cast to array as update_create_grid expects an array
                         Essential_Grid_Admin::update_create_grid($new_grid);
                         //now delete cache of the Grid so that changes take effect immediately
                         if (!empty($lang)) {
                             foreach ($lang as $code => $val) {
                                 delete_transient('ess_grid_trans_query_' . $grid->id . $val['language_code']);
                                 delete_transient('ess_grid_trans_full_grid_' . $grid->id . $val['language_code']);
                             }
                         } else {
                             delete_transient('ess_grid_trans_query_' . $grid->id);
                             delete_transient('ess_grid_trans_full_grid_' . $grid->id);
                         }
                         $cont = true;
                     }
                     if ($cont == true) {
                         break;
                     }
                 }
             }
         }
     }
 }
开发者ID:Lumbe,项目名称:dev_servus,代码行数:61,代码来源:wordpress-update-fix.class.php

示例4: export_grids

 public function export_grids($export_grids)
 {
     $return_grids = array();
     if ($export_grids !== false && !empty($export_grids)) {
         $c_grid = new Essential_Grid();
         $base = new Essential_Grid_Base();
         $item_skin = new Essential_Grid_Item_Skin();
         $grids = $c_grid->get_essential_grids();
         if (!empty($grids)) {
             foreach ($export_grids as $e_grid_id) {
                 foreach ($grids as $grid) {
                     $grid = (array) $grid;
                     if ($e_grid_id == $grid['id']) {
                         //change categories/tags id to slug
                         $check = json_decode($grid['postparams'], true);
                         if (isset($check['post_category']) && !empty($check['post_category'])) {
                             $slug_cats = array();
                             $the_cats = explode(',', $check['post_category']);
                             foreach ($the_cats as $cat) {
                                 $raw = explode('_', $cat);
                                 $catSlug = $raw[count($raw) - 1];
                                 unset($raw[count($raw) - 1]);
                                 $cat = implode('_', $raw);
                                 $category = $base->get_categories_by_ids((array) $catSlug, $cat);
                                 foreach ($category as $cat_obj) {
                                     $slug_cats[] = $cat . '_' . $cat_obj->slug;
                                 }
                             }
                             $check['post_category'] = implode(',', $slug_cats);
                             $grid['postparams'] = json_encode($check);
                         }
                         //change choosen skinid to skinhandle
                         $check = json_decode($grid['params'], true);
                         if (isset($check['entry-skin']) && !empty($check['entry-skin']) && intval($check['entry-skin']) != 0) {
                             $skin = $item_skin->get_handle_by_id($check['entry-skin']);
                             if (!empty($skin)) {
                                 $check['entry-skin'] = $skin['handle'];
                             }
                             $grid['params'] = json_encode($check);
                         }
                         $return_grids[] = $grid;
                         break;
                     }
                 }
             }
         }
     }
     return $return_grids;
 }
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:49,代码来源:export.class.php

示例5: get_allowed_meta

 /**
  * get list of allowed things on meta
  */
 public function get_allowed_meta()
 {
     $base = new Essential_Grid_Base();
     $transitions_media = $base->get_hover_animations(true);
     //true will get with in/out
     return array(array('name' => array('handle' => 'color', 'text' => __('Font Color', EG_TEXTDOMAIN)), 'type' => 'color', 'default' => '#FFFFFF', 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'font-style', 'text' => __('Font Style', EG_TEXTDOMAIN)), 'type' => 'select', 'default' => 'normal', 'values' => array('normal' => __('Normal', EG_TEXTDOMAIN), 'italic' => __('Italic', EG_TEXTDOMAIN)), 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'text-decoration', 'text' => __('Text Decoration', EG_TEXTDOMAIN)), 'type' => 'select', 'default' => 'none', 'values' => array('none' => __('None', EG_TEXTDOMAIN), 'underline' => __('Underline', EG_TEXTDOMAIN), 'overline' => __('Overline', EG_TEXTDOMAIN), 'line-through' => __('Line Through', EG_TEXTDOMAIN)), 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'text-transform', 'text' => __('Text Transform', EG_TEXTDOMAIN)), 'type' => 'select', 'default' => 'none', 'values' => array('none' => __('None', EG_TEXTDOMAIN), 'capitalize' => __('Capitalize', EG_TEXTDOMAIN), 'uppercase' => __('Uppercase', EG_TEXTDOMAIN), 'lowercase' => __('Lowercase', EG_TEXTDOMAIN)), 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'border-color', 'text' => __('Border Color', EG_TEXTDOMAIN)), 'type' => 'color', 'default' => '#FFFFFF', 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'border-style', 'text' => __('Border Style', EG_TEXTDOMAIN)), 'type' => 'select', 'default' => 'none', 'values' => array('none' => __('None', EG_TEXTDOMAIN), 'solid' => __('solid', EG_TEXTDOMAIN), 'dotted' => __('dotted', EG_TEXTDOMAIN), 'dashed' => __('dashed', EG_TEXTDOMAIN), 'double' => __('double', EG_TEXTDOMAIN)), 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'background', 'text' => __('Background Color', EG_TEXTDOMAIN)), 'type' => 'text', 'default' => 'repeat center center #FFFFFF', 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'box-shadow', 'text' => __('Box Shadow', EG_TEXTDOMAIN)), 'type' => 'text', 'default' => '0px 0px 0px 0px #000000', 'container' => 'style', 'hover' => 'true'), array('name' => array('handle' => 'transition', 'text' => __('Transition', EG_TEXTDOMAIN)), 'type' => 'select', 'default' => 'fade', 'values' => $transitions_media, 'container' => 'anim'), array('name' => array('handle' => 'transition-delay', 'text' => __('Transition Delay', EG_TEXTDOMAIN)), 'type' => 'number', 'default' => '0', 'values' => array('0', '60', '1'), 'container' => 'anim'), array('name' => array('handle' => 'cover-bg-color', 'text' => __('Cover BG Color', EG_TEXTDOMAIN)), 'type' => 'color', 'default' => '#FFFFFF', 'container' => 'layout'), array('name' => array('handle' => 'cover-bg-opacity', 'text' => __('Cover BG Opacity', EG_TEXTDOMAIN)), 'type' => 'number', 'default' => '100', 'container' => 'layout'), array('name' => array('handle' => 'item-bg-color', 'text' => __('Item BG Color', EG_TEXTDOMAIN)), 'type' => 'color', 'default' => '#FFFFFF', 'container' => 'layout'), array('name' => array('handle' => 'content-bg-color', 'text' => __('Content BG Color', EG_TEXTDOMAIN)), 'type' => 'color', 'default' => '#FFFFFF', 'container' => 'layout'));
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:10,代码来源:item-element.class.php

示例6: replace_all_meta_in_text

 /**
  * replace all metas with corresponding text
  */
 public function replace_all_meta_in_text($post_id, $text)
 {
     if (trim($text) === '' || intval($post_id) === 0) {
         return '';
     }
     $base = new Essential_Grid_Base();
     $meta_link = new Essential_Grid_Meta_Linking();
     $cmeta = $this->get_all_meta();
     //process meta tags:
     $arr_matches = array();
     preg_match_all("/%[^%]*%/", $text, $arr_matches);
     if (!empty($arr_matches)) {
         $my_post = get_post($post_id, ARRAY_A);
         foreach ($arr_matches as $matches) {
             if (is_array($matches)) {
                 foreach ($matches as $match) {
                     $meta = trim(str_replace('%', '', $match));
                     $meta_value = get_post_meta($post_id, $meta, true);
                     if (!empty($cmeta)) {
                         foreach ($cmeta as $me) {
                             if ('eg-' . $me['handle'] == $meta) {
                                 if ($me['type'] == 'image') {
                                     if (intval($meta_value) > 0) {
                                         //get URL to Image
                                         $img = wp_get_attachment_image_src($meta_value, 'full');
                                         if ($img !== false) {
                                             $meta_value = $img[0];
                                         } else {
                                             $meta_value = '';
                                         }
                                     } else {
                                         $meta_value = '';
                                     }
                                 }
                                 if ($meta_value == '' && isset($me['default'])) {
                                     $meta_value = $me['default'];
                                 }
                                 break;
                             }
                         }
                     }
                     //check woocommerce
                     if (Essential_Grid_Woocommerce::is_woo_exists()) {
                         $wc_text = Essential_Grid_Woocommerce::get_value_by_meta($post_id, $meta);
                         if ($wc_text !== '') {
                             $meta_value = $wc_text;
                         }
                     }
                     if (empty($meta_value) && !empty($my_post)) {
                         //try to get from post
                         switch ($meta) {
                             //Post elements
                             case 'post_url':
                                 $post_id = $base->getVar($my_post, 'ID', '');
                                 $meta_value = get_permalink($post_id);
                                 break;
                             case 'post_id':
                                 $meta_value = $base->getVar($my_post, 'ID', '');
                                 break;
                             case 'title':
                                 $meta_value = $base->getVar($my_post, 'post_title', '');
                                 break;
                             case 'excerpt':
                                 $meta_value = trim($base->getVar($my_post, 'post_excerpt'));
                                 if (empty($meta_value)) {
                                     $meta_value = trim($base->getVar($my_post, 'post_content'));
                                 }
                                 $meta_value = strip_tags($meta_value);
                                 //,"<b><br><br/><i><strong><small>"
                                 break;
                             case 'meta':
                                 $m = new Essential_Grid_Meta();
                                 $meta_value = $m->get_meta_value_by_handle($my_post['ID'], $meta);
                                 break;
                             case 'alias':
                                 $meta_value = $base->getVar($my_post, 'post_name');
                                 break;
                             case 'content':
                                 $meta_value = $base->getVar($my_post, 'post_content');
                                 break;
                             case 'link':
                                 $meta_value = get_permalink($my_post['ID']);
                                 break;
                             case 'date':
                                 $postDate = $base->getVar($my_post, "post_date_gmt");
                                 $meta_value = $base->convert_post_date($postDate);
                                 break;
                             case 'date_modified':
                                 $dateModified = $base->getVar($my_post, "post_modified");
                                 $meta_value = $base->convert_post_date($dateModified);
                                 break;
                             case 'author_name':
                                 $authorID = $base->getVar($my_post, 'post_author');
                                 $meta_value = get_the_author_meta('display_name', $authorID);
                                 break;
                             case 'num_comments':
                                 $meta_value = $base->getVar($my_post, 'comment_count');
//.........这里部分代码省略.........
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:101,代码来源:meta.class.php

示例7: output_navigation_skins

 public static function output_navigation_skins()
 {
     $base = new Essential_Grid_Base();
     $skins = self::get_essential_navigation_skins();
     $css = '';
     if (!empty($skins)) {
         foreach ($skins as $skin) {
             $css .= '<style class="navigation-skin-css-' . $skin['id'] . '" type="text/css">';
             $css .= $base->compress_css($skin['css']);
             $css .= '</style>' . "\n";
         }
     }
     return $css;
 }
开发者ID:mertyildiran,项目名称:grandinsaat,代码行数:14,代码来源:navigation.class.php

示例8: widget

 /**
  * widget output
  */
 public function widget($args, $instance)
 {
     $grid_id = $instance["ess_grid"];
     $title = @$instance["ess_grid_title"];
     if (empty($grid_id)) {
         return false;
     }
     $base = new Essential_Grid_Base();
     $grid = new Essential_Grid();
     $grids = $grid->get_grids_short_widgets();
     if (!isset($grids[$grid_id])) {
         return false;
     }
     $grid_handle = $grids[$grid_id];
     //widget output
     $beforeWidget = $args["before_widget"];
     $afterWidget = $args["after_widget"];
     $beforeTitle = $args["before_title"];
     $afterTitle = $args["after_title"];
     echo $beforeWidget;
     if (!empty($title)) {
         echo $beforeTitle . $title . $afterTitle;
     }
     if ($base->is_shortcode_with_handle_exist($grid_handle)) {
         $eg_nav = new Essential_Grid_Navigation();
         $eg_nav->output_cart();
     }
     echo $afterWidget;
 }
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:32,代码来源:grids-widget.class.php

示例9: eg_filter_tab_function

function eg_filter_tab_function($id, $params)
{
    global $grid;
    global $categories;
    global $postTypesWithCats;
    $base = new Essential_Grid_Base();
    ?>
								<div class="eg-filter-options-wrap" style="display:inline-block">
									<div class="eg-filter-header-block"><i class="eg-icon-megaphone"></i><?php 
    _e('Filter -', EG_TEXTDOMAIN);
    ?>
 <span class="filter-header-id"><?php 
    echo $id;
    ?>
</span></div>
									<p class="eg-filter-label"><?php 
    _e('Filter "All" Text', EG_TEXTDOMAIN);
    ?>
</p>
									<p class="eg-filter-option-field">
										<input type="text" name="filter-all-text-<?php 
    echo $id;
    ?>
" data-origname="filter-all-text-#NR" class="eg-tooltip-wrap" title="<?php 
    _e('Visible Title on All Filter Button.', EG_TEXTDOMAIN);
    ?>
" value="<?php 
    echo $base->getVar($params, 'filter-all-text-' . $id, __('Filter - All', EG_TEXTDOMAIN));
    ?>
" class="firstinput">
										<span class="eg-remove-filter-tab" style="display: none;"><i class="eg-icon-cancel"></i></span>
									</p>
									<p class="eg-filter-label"><?php 
    _e('Layout Option', EG_TEXTDOMAIN);
    ?>
</p>
									<p class="eg-filter-option-field">
										<?php 
    $filter_listing = $base->getVar($params, 'filter-listing-' . $id, 'list');
    ?>
										<select class="firstinput" name="filter-listing-<?php 
    echo $id;
    ?>
" data-origname="filter-listing-#NR">
											<option value="list" <?php 
    checked($filter_listing, 'list');
    ?>
><?php 
    _e('In Line', EG_TEXTDOMAIN);
    ?>
</option>
											<option value="dropdown" <?php 
    selected($filter_listing, 'dropdown');
    ?>
><?php 
    _e('Dropdown', EG_TEXTDOMAIN);
    ?>
</option>
										</select>
									</p>
									<p class="eg-filter-label"><?php 
    _e('Dropdown Start Text', EG_TEXTDOMAIN);
    ?>
</p>
									<p class="filter-only-if-dropdown eg-filter-option-field">
										<?php 
    $filter_dropdown_text = $base->getVar($params, 'filter-dropdown-text-' . $id, __('Filter Categories', EG_TEXTDOMAIN));
    ?>
										<input class="firstinput" type="text" data-origname="filter-dropdown-text-#NR" name="filter-dropdown-text-<?php 
    echo $id;
    ?>
" title="<?php 
    _e('Default Text on the Filter Dropdown List.', EG_TEXTDOMAIN);
    ?>
" value="<?php 
    echo $filter_dropdown_text;
    ?>
" />
									</p>
									<p class="eg-filter-label"><?php 
    _e('Available Filters in Group', EG_TEXTDOMAIN);
    ?>
</p>
									<div class="filter-only-for-post">
										<?php 
    $filter_selected = $base->getVar($params, 'filter-selected-' . $id, '');
    ?>
										<div class="eg-media-source-order-wrap eg-filter-selected-order-wrap-<?php 
    echo $id;
    ?>
">
											<?php 
    if (!empty($filter_selected)) {
        if (!isset($params['filter-selected-' . $id])) {
            //we are either a new Grid or old Grid that had not this option (since 1.1.0)
            if ($grid !== false) {
                //set the values
                $use_cat = @$categories;
            } else {
                $use_cat = @$postTypesWithCats['post'];
//.........这里部分代码省略.........
开发者ID:Brandonsmith23,项目名称:prodgyr,代码行数:101,代码来源:grid-settings.php

示例10: Essential_Grid_Base

/**
 * Represents the view for the metabox in post / pages
 *
 * @package   Essential_Grid
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.themepunch.com/essential/
 * @copyright 2014 ThemePunch
 */
if (!defined('ABSPATH')) {
    exit;
}
if (!isset($post)) {
    return false;
}
//not called as it should be
$base = new Essential_Grid_Base();
$item_skin = new Essential_Grid_Item_Skin();
$item_elements = new Essential_Grid_Item_Element();
$meta = new Essential_Grid_Meta();
$values = get_post_custom($post->ID);
$eg_sources_html5_mp4 = isset($values['eg_sources_html5_mp4']) ? esc_attr($values['eg_sources_html5_mp4'][0]) : "";
$eg_sources_html5_ogv = isset($values['eg_sources_html5_ogv']) ? esc_attr($values['eg_sources_html5_ogv'][0]) : "";
$eg_sources_html5_webm = isset($values['eg_sources_html5_webm']) ? esc_attr($values['eg_sources_html5_webm'][0]) : "";
$eg_vimeo_ratio = isset($values['eg_vimeo_ratio']) ? esc_attr($values['eg_vimeo_ratio'][0]) : "0";
$eg_youtube_ratio = isset($values['eg_youtube_ratio']) ? esc_attr($values['eg_youtube_ratio'][0]) : "0";
$eg_wistia_ratio = isset($values['eg_wistia_ratio']) ? esc_attr($values['eg_wistia_ratio'][0]) : "0";
$eg_html5_ratio = isset($values['eg_html5_ratio']) ? esc_attr($values['eg_html5_ratio'][0]) : "0";
$eg_soundcloud_ratio = isset($values['eg_soundcloud_ratio']) ? esc_attr($values['eg_soundcloud_ratio'][0]) : "0";
$eg_sources_youtube = isset($values['eg_sources_youtube']) ? esc_attr($values['eg_sources_youtube'][0]) : "";
$eg_sources_wistia = isset($values['eg_sources_wistia']) ? esc_attr($values['eg_sources_wistia'][0]) : "";
$eg_sources_vimeo = isset($values['eg_sources_vimeo']) ? esc_attr($values['eg_sources_vimeo'][0]) : "";
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:31,代码来源:grid-meta-box.php

示例11: validate_wpml_exists

 /**
  * valdiate that wpml exists
  */
 private static function validate_wpml_exists()
 {
     if (!self::is_wpml_exists()) {
         Essential_Grid_Base::throw_error(__("The wpml plugin don't exists", EG_TEXTDOMAIN));
     }
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:9,代码来源:wpml.class.php

示例12: Essential_Grid_Meta

$meta = new Essential_Grid_Meta();
$isCreate = $base->getGetVar('create', 'true');
$title = __('Create New Ess. Grid', EG_TEXTDOMAIN);
$save = __('Save Grid', EG_TEXTDOMAIN);
$layers = false;
if (intval($isCreate) > 0) {
    //currently editing
    $grid = Essential_Grid::get_essential_grid_by_id(intval($isCreate));
    if (!empty($grid)) {
        $title = __('Settings', EG_TEXTDOMAIN);
        $layers = $grid['layers'];
    }
}
$postTypesWithCats = $base->getPostTypesWithCatsForClient();
$jsonTaxWithCats = $base->jsonEncodeForClientSide($postTypesWithCats);
$base = new Essential_Grid_Base();
$pages = get_pages(array('sort_column' => 'post_name'));
$post_elements = $base->getPostTypesAssoc();
$postTypes = $base->getVar($grid['postparams'], 'post_category', 'post');
$categories = $base->setCategoryByPostTypes($postTypes, $postTypesWithCats);
$selected_pages = explode(',', $base->getVar($grid['postparams'], 'selected_pages', '-1', 's'));
$columns = $base->getVar($grid['params'], 'columns', '');
$columns = $base->set_basic_colums($columns);
$columns_width = $base->getVar($grid['params'], 'columns-width', '');
$columns_width = $base->set_basic_colums_width($columns_width);
$columns_height = $base->getVar($grid['params'], 'columns-height', '');
$columns_height = $base->set_basic_colums_height($columns_height);
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-0', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-1', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-2', '');
$columns_advanced[] = $base->getVar($grid['params'], 'columns-advanced-rows-3', '');
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:31,代码来源:grid-create.php

示例13: import_global_styles

 public function import_global_styles($import_global_styles, $check_append = true)
 {
     $base = new Essential_Grid_Base();
     $c_css = new Essential_Grid_Global_Css();
     $append = true;
     if ($check_append) {
         //check in $_POST if append or overwrite
         $do = $base->getVar($this->overwrite_data, 'global-styles-overwrite', 'append');
         $append = $do == 'append' ? true : false;
     }
     if ($append) {
         //append
         $global_styles = $c_css->get_global_css_styles();
         $import_global_styles = $global_styles . "\n" . $import_global_styles;
     }
     $c_css->set_global_css_styles($import_global_styles);
 }
开发者ID:daanbakker1995,项目名称:vanteun,代码行数:17,代码来源:import.class.php

示例14: get_option

<?php

/**
 * Panel to the search options.
 * 
 * @package   Essential_Grid
 * @author    ThemePunch <info@themepunch.com>
 * @link      http://www.themepunch.com/essential/
 * @copyright 2014 ThemePunch
 * @since: 2.0
 */
$settings = get_option('esg-search-settings', array('settings' => array(), 'global' => array(), 'shortcode' => array()));
$settings = Essential_Grid_Base::stripslashes_deep($settings);
$base = new Essential_Grid_Base();
$grids = Essential_Grid::get_grids_short();
$my_skins = array('light' => __('Light', EG_TEXTDOMAIN), 'dark' => __('Dark', EG_TEXTDOMAIN));
$my_skins = apply_filters('essgrid_modify_search_skins', $my_skins);
?>
<h2 class="topheader"><?php 
_e('Search Settings', EG_TEXTDOMAIN);
?>
</h2>

<div id="eg-grid-search-wrapper">
	<ul class="es-grid-search-tabs">
		<li><a href="#eg-search-settings-wrap"><?php 
_e('Global Settings', EG_TEXTDOMAIN);
?>
</a></li>
		<li><a href="#eg-shortcode-search-wrap"><?php 
_e('ShortCode Search', EG_TEXTDOMAIN);
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:31,代码来源:grid-search.php

示例15: on_ajax_action


//.........这里部分代码省略.........
                     if (!isset($data['name'])) {
                         Essential_Grid::ajaxResponseError(__('No name given', EG_TEXTDOMAIN), false);
                     }
                     $wa = new Essential_Grid_Widget_Areas();
                     $result = $wa->edit_widget_area_by_handle($data);
                     if ($result === true) {
                         Essential_Grid::ajaxResponseSuccess(__("Widget Area successfully changed!", EG_TEXTDOMAIN), array('data' => $result));
                     } else {
                         Essential_Grid::ajaxResponseError($result, false);
                     }
                     break;
                 case 'remove_widget_area':
                     if (!isset($data['handle'])) {
                         Essential_Grid::ajaxResponseError(__('Widget Area not found', EG_TEXTDOMAIN), false);
                     }
                     $wa = new Essential_Grid_Widget_Areas();
                     $result = $wa->remove_widget_area_by_handle($data['handle']);
                     if ($result === true) {
                         Essential_Grid::ajaxResponseSuccess(__("Widget Area successfully removed!", EG_TEXTDOMAIN), array('data' => $result));
                     } else {
                         Essential_Grid::ajaxResponseError($result, false);
                     }
                     break;
                 case 'get_preview_html_markup':
                     //add wpml transient
                     $lang_code = '';
                     if (Essential_Grid_Wpml::is_wpml_exists()) {
                         $lang_code = Essential_Grid_Wpml::get_current_lang_code();
                     }
                     if (isset($data['id'])) {
                         delete_transient('ess_grid_trans_query_' . $data['id'] . $lang_code);
                         //delete cache
                     }
                     $result = Essential_Grid_Base::output_demo_skin_html($data);
                     if (isset($result['error'])) {
                         Essential_Grid::ajaxResponseData($result);
                     } else {
                         Essential_Grid::ajaxResponseData(array("data" => array('html' => $result['html'], 'preview' => @$result['preview'])));
                     }
                     break;
                     /* //TP: CHUNK
                     			case 'get_preview_html_markup_chunk': //only for custom grid
                     				$grid = new Essential_Grid();
                     				$grid->init_by_data($data);
                     				
                     				$html = '';
                     				
                     				if($grid->is_custom_grid()){
                     					ob_start();
                     					$grid->output_by_custom('custom', true);
                     					$html = ob_get_contents();
                     					ob_clean();
                     					ob_end_clean();
                     				}
                     				$order_id = self::getPostVar("order_id", false);
                     				
                     				Essential_Grid::ajaxResponseData(array("data"=>array('preview' => $html, 'order_id' => $order_id)));
                     				
                     			break; */
                 /* //TP: CHUNK
                 			case 'get_preview_html_markup_chunk': //only for custom grid
                 				$grid = new Essential_Grid();
                 				$grid->init_by_data($data);
                 				
                 				$html = '';
                 				
开发者ID:hhgr,项目名称:EveryonePlay,代码行数:66,代码来源:essential-grid-admin.class.php


注:本文中的Essential_Grid_Base类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。