-couples/holiday_type.sailing-sports/holiday_type.metropolises 0 1 0 7246 0 0 /fr/search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.detached-house/holiday_type.luxury 0 1 0 7555 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.countryside/holiday_type.luxury/holiday_type.low-cost/facility_o.outdoor-grill 0 1 0 7451 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.apartment/holiday_type.detached-house/holiday_type.countryside/holiday_type.mountain 0 4 0 29240 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.eco-tourism/holiday_type.bedroom/holiday_type.sailing-sports/view.map 0 1 0 6877 0 0 /search/europe/facility_i.fireplace/facility_o.outdoor-grill/suitability.pets/facility_i.heating/facility_i.washing-machine 0 1 164477200 7148 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.religious-tourism/holiday_type.luxury/utility.property-manager/holiday_type.for-couples 0 1 162617536 7310 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.eco-tourism/holiday_type.lakeside-and-rivers/holiday_type.religious-tourism/holiday_type.countryside/holiday_type.sailing-sports 0 1 0 7531 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.air-conditioning/holiday_type.golf-courses/holiday_type.apartment/holiday_type.mountain 0 1 0 7443 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.sailing-sports/holiday_type.low-cost/holiday_type.religious-tourism/facility_i.single-level-no-stairs 0 1 8589940736 7498 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/facility_o.outdoor-grill/holiday_type.mountain/holiday_type.metropolises/holiday_type.apartment 0 1 0 7455 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/suitability.pets/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.apartment 0 1 0 7418 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.mountain/holiday_type.castle/holiday_type.low-cost/holiday_type.penthouse 0 1 2422285057281425408 7264 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.eco-tourism/holiday_type.bedroom/holiday_type.luxury/order_by.price,asc 0 1 2422285057281425408 7257 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.sea-and-surf/holiday_type.luxury/holiday_type.cities-of-art/order_by.total_square,asc 0 1 0 7277 0 0 /search/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/holiday_type.leisure/holiday_type.lakeside-and-rivers/facility_o.outdoor-grill 0 1 0 7474 0 0 /search/holiday_type.leisure/utility.private-owner/facility_g.dishwasher/facility_i.washing-machine/holiday_type.lakeside-and-rivers/holiday_type.detached-house 0 1 150575264 7463 0 0 /search/holiday_type.leisure/holiday_type.sea-and-surf/holiday_type.for-couples/order_by.no_bedrooms,asc 0 1 0 7184 0 0 /search/holiday_type.houses-with-pools/facility_i.internet/facility_o.outdoor-grill/holiday_type.countryside/holiday_type.bedroom/facility_i.washing-machine 0 1 0 7437 0 0 /it/search/holiday_type.leisure/facility_o.private-garden/holiday_type.sailing-sports/facility_o.hot-tub/facility_i.internet 0 1 146078192 7662 0 0 /search/facility_g.dishwasher/facility_i.internet/facility_o.outdoor-grill/suitability.pets/facility_o.hot-tub/order_by.total_square,asc 0 1 2422285057281425408 7067 0 0 /search/europe/holiday_type.leisure/holiday_type.sea-and-surf/holiday_type.detached-house/holiday_type.penthouse/facility_i.air-conditioning 0 1 2422285057281425408 7495 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.luxury/holiday_type.penthouse/holiday_type.apartment/holiday_type.detached-house 0 1 0 7285 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.low-cost/holiday_type.bedroom/holiday_type.lakeside-and-rivers 0 1 0 7238 0 0 /es/search/holiday_type.leisure/facility_g.dishwasher/suitability.pets/order_by.views,desc 0 1 0 7607 0 0 /search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.apartment/holiday_type.mountain/order_by.total_square,desc 0 1 0 7229 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.leisure/holiday_type.eco-tourism/order_by.no_bathrooms,asc 0 1 0 7359 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.cities-of-art/facility_i.single-level-no-stairs/facility_i.internet/order_by.total_square,desc 0 1 0 7414 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.sea-and-surf/holiday_type.cities-of-art/facility_i.internet/utility.private-owner 0 1 0 7479 0 0 /search/europe/spain/utility.private-owner/facility_i.air-conditioning/facility_i.internet/facility_i.heating 0 1 0 7143 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.air-conditioning/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.lakeside-and-rivers/view.map 0 1 0 7195 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.cities-of-art/holiday_type.sea-and-surf/holiday_type.bedroom/facility_o.hot-tub 0 1 0 7444 0 0 /de/search/europe/holiday_type.leisure/facility_i.air-conditioning/holiday_type.metropolises/holiday_type.countryside/order_by.no_bedrooms,desc 0 1 0 7683 0 0 /search/utility.private-owner/facility_i.internet/facility_o.outdoor-grill/facility_i.heating/facility_o.hot-tub/order_by.no_bathrooms,desc 0 1 0 7099 0 0 /search/holiday_type.leisure/utility.private-owner/facility_i.washing-machine/holiday_type.low-cost/facility_i.air-conditioning/facility_i.internet 0 1 0 7446 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.metropolises/holiday_type.bedroom/holiday_type.sailing-sports/order_by.total_square,asc 0 1 0 7578 0 0 /search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.apartment/holiday_type.castle/holiday_type.leisure 0 1 0 7244 0 0 /it/search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.for-couples/order_by.featured,desc 0 1 0 7554 0 0 /rss/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.apartment/holiday_type.bedroom/ 0 1 0 1075 0 0 /de/search/facility_i.internet/facility_o.private-garden/facility_i.fireplace/order_by.price,asc 0 1 0 7310 0 0 /search/holiday_type.leisure/facility_i.internet/facility_o.private-garden/holiday_type.sailing-sports/holiday_type.luxury/suitability.pets 0 1 0 7409 0 0 /search/holiday_type.leisure/facility_i.elevator/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.sailing-sports/holiday_type.golf-courses 0 1 0 7440 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_i.washing-machine/facility_g.independent-kitchen/facility_i.elevator/holiday_type.golf-courses 0 1 0 7423 0 0 /fr/search/europe/facility_o.private-garden/facility_o.hot-tub/holiday_type.leisure 0 1 0 7734 0 0 /search/facility_i.air-conditioning/facility_o.hot-tub/facility_i.single-level-no-stairs/facility_o.outdoor-grill/facility_i.heating 0 1 0 7083 0 0 /rss/holiday_type.leisure/facility_g.dishwasher/facility_i.elevator/facility_i.washing-machine/ 0 1 0 1075 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.castle/holiday_type.leisure/holiday_type.penthouse 0 1 0 7242 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.apartment/holiday_type.lakeside-and-rivers/facility_i.air-conditioning 0 1 0 7409 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.detached-house/holiday_type.apartment/facility_i.washing-machine 0 1 0 7408 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.eco-tourism/holiday_type.lakeside-and-rivers/suitability.pets 0 1 0 7241 0 0 /it/search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.apartment/order_by.featured,desc 0 1 0 7548 0 0 /rss/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.sea-and-surf/holiday_type.religious-tourism/ 0 1 0 1075 0 1 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.detached-house/holiday_type.countryside/order_by.featured,desc 0 1 0 7352 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.mountain/holiday_type.eco-tourism/holiday_type.castle 0 1 0 7248 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.leisure/view.map 0 1 0 7157 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/suitability.pets/holiday_type.golf-courses/holiday_type.bedroom 0 1 0 7366 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.sailing-sports/order_by.no_bedrooms,desc 0 1 0 7413 0 0 /search/facility_g.independent-kitchen/facility_o.outdoor-grill/facility_o.hot-tub/order_by.featured,desc 0 5 0 35145 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.metropolises/holiday_type.eco-tourism/holiday_type.mountain 0 1 0 7230 0 0 /rss/holiday_type.houses-with-pools/utility.private-owner/holiday_type.low-cost/holiday_type.metropolises/ 0 1 0 1075 0 1 /search/utility.private-owner/facility_i.elevator/facility_o.outdoor-grill/suitability.pets/facility_i.internet 0 3 0 21195 0 0 /search/holiday_type.leisure/facility_g.independent-kitchen/facility_o.outdoor-grill/holiday_type.apartment/holiday_type.religious-tourism 0 1 0 7398 0 0 /search/holiday_type.houses-with-pools/facility_i.internet/facility_o.outdoor-grill/holiday_type.penthouse/facility_i.elevator 0 2 0 14764 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.religious-tourism/holiday_type.penthouse/holiday_type.metropolises 0 2 0 14508 0 0 /search/holiday_type.houses-with-pools/facility_i.internet/facility_o.outdoor-grill/holiday_type.mountain/holiday_type.countryside 0 2 0 14780 0 0 /search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.low-cost 0 1 0 7248 0 0 /search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.eco-tourism/holiday_type.countryside 0 2 0 14452 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_i.washing-machine/holiday_type.eco-tourism/order_by.no_bedrooms,asc 0 1 0 7373 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.washing-machine/facility_o.private-garden/holiday_type.apartment/holiday_type.cities-of-art/holiday_type.sailing-sports/holiday_type.eco-tourism 0 1 0 7645 0 0 /search/holiday_type.leisure/facility_g.dishwasher/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.cities-of-art/facility_i.heating 0 1 0 7450 0 0 /search/holiday_type.leisure/utility.private-owner/facility_i.washing-machine/holiday_type.sailing-sports/holiday_type.countryside/facility_i.elevator/holiday_type.lakeside-and-rivers 0 1 0 7534 0 0 /search/holiday_type.leisure/facility_i.washing-machine/facility_o.outdoor-grill/holiday_type.cities-of-art/holiday_type.houses-with-pools/suitability.pets 0 2 0 14852 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_g.dishwasher/facility_i.fireplace/holiday_type.countryside/holiday_type.apartment/holiday_type.cities-of-art/view.map 0 1 0 7204 0 0 /search/holiday_type.leisure/utility.private-owner/facility_g.dishwasher/facility_i.washing-machine/holiday_type.houses-with-pools/facility_i.elevator/facility_i.single-level-no-stairs/facility_o.hot-tub 0 1 0 7569 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.washing-machine/suitability.pets/holiday_type.golf-courses/facility_i.single-level-no-stairs/order_by.total_square,desc 0 1 0 7548 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.castle 0 1 0 7269 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.metropolises 0 3 0 21960 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/suitability.pets/holiday_type.eco-tourism/facility_i.washing-machine 0 2 0 14762 0 0 /search/holiday_type.le>set_special_class($special_class); $navigation_c->set_special_class($special_skin); $navigation_c->set_special_class('esg-fgc-'.$grid_id); $filter = false; switch($id){ case 'sorting': $order_by_start = $grid->get_param_by_handle('sorting-order-by-start', 'none'); $sort_by_text = $grid->get_param_by_handle('sort-by-text', __('Sort By ', EG_TEXTDOMAIN)); $order_by = explode(',', $grid->get_param_by_handle('sorting-order-by', 'date')); if(!is_array($order_by)) $order_by = array($order_by); //set order of filter $navigation_c->set_orders_text($sort_by_text); $navigation_c->set_orders_start($order_by_start); $navigation_c->set_orders($order_by); $navigation_c->output_sorting(); break; case 'cart': $navigation_c->output_cart(); break; case 'left': $navigation_c->output_navigation_left(); break; case 'right': $navigation_c->output_navigation_right(); break; case 'pagination': $navigation_c->output_pagination(); break; case 'search-input': $search_text = $grid->get_param_by_handle('search-text', __('Search...', EG_TEXTDOMAIN)); $navigation_c->set_search_text($search_text); $navigation_c->output_search_input(); break; case 'filter': $id = 1; $filter = true; break; default: //check for filter if(strpos($id, 'filter-') !== false){ $id = intval(str_replace('filter-', '', $id)); $filter = true; }else{ return false; } break; } /***** * Complex Filter Part *****/ $found_filter = array(); if($filter === true){ switch($grid->get_postparam_by_handle('source-type')){ case 'custom': if(!empty($grid->grid_layers) && count($grid->grid_layers) > 0){ foreach($grid->grid_layers as $key => $entry){ $filters = array(); if(!empty($entry['custom-filter'])){ $cats = explode(',', $entry['custom-filter']); if(!is_array($cats)) $cats = (array)$cats; foreach($cats as $category){ $filters[sanitize_key($category)] = array('name' => $category, 'slug' => sanitize_key($category)); } } $found_filter = $found_filter + $filters; //these are the found filters, only show filter that the posts have } } break; case 'post': $start_sortby = $grid->get_param_by_handle('sorting-order-by-start', 'none'); $start_sortby_type = $grid->get_param_by_handle('sorting-order-type', 'ASC'); $post_category = $grid->get_postparam_by_handle('post_category'); $post_types = $grid->get_postparam_by_handle('post_types'); $page_ids = explode(',', $grid->get_postparam_by_handle('selected_pages', '-1')); $cat_relation = $grid->get_postparam_by_handle('category-relation', 'OR'); $max_entries = $grid->get_maximum_entries($grid); $additional_query = $grid->get_postparam_by_handle('additional-query', ''); if($additional_query !== '') $additional_query = wp_parse_args($additional_query); $cat_tax = Essential_Grid_Base::getCatAndTaxData($post_category); $posts = Essential_Grid_Base::getPostsByCategory($grid_id, $cat_tax['cats'], $post_types, $cat_tax['tax'], $page_ids, $start_sortby, $start_sortby_type, $max_entries, $additional_query, true, $cat_relation); $nav_filters = array(); $taxes = array('post_tag'); if(!empty($cat_tax['tax'])) $taxes = explode(',', $cat_tax['tax']); if(!empty($cat_tax['cats'])){ $cats = explode(',', $cat_tax['cats']); foreach($cats as $key => $cid){ if(Essential_Grid_Wpml::is_wpml_exists() && isset($sitepress)){ $new_id = icl_object_id($cid, 'category', true, $sitepress->get_default_language()); $cat = get_category($new_id); }else{ $cat = get_category($cid); } if(is_object($cat)){ $nav_filters[$cid] = array('name' => $cat->cat_name, 'slug' => sanitize_key($cat->slug), 'parent' => $cat->category_parent); } foreach($taxes as $custom_tax){ $term = get_term_by('id', $cid, $custom_tax); if(is_object($term)) $nav_filters[$cid] = array('name' => $term->name, 'slug' => sanitize_key($term->slug), 'parent' => $term->parent); } } if(!empty($filters_meta)){ $nav_filters = $filters_meta + $nav_filters; } asort($nav_filters); } if($id == 1){ $all_text = $grid->get_param_by_handle('filter-all-text'); $listing_type = $grid->get_param_by_handle('filter-listing', 'list'); $listing_text = $grid->get_param_by_handle('filter-dropdown-text'); $show_count = $grid->get_param_by_handle('filter-counter', 'off'); $selected = $grid->get_param_by_handle('filter-selected', array()); }else{ $all_text = $grid->get_param_by_handle('filter-all-text-'.$id); $listing_type = $grid->get_param_by_handle('filter-listing-'.$id, 'list'); $listing_text = $grid->get_param_by_handle('filter-dropdown-text-'.$id); $show_count = $grid->get_param_by_handle('filter-counter-'.$id, 'off'); $selected = $grid->get_param_by_handle('filter-selected-'.$id, array()); } $filter_allow = $grid->get_param_by_handle('filter-arrows', 'single'); $filter_start = $grid->get_param_by_handle('filter-start', ''); $filter_grouping = $grid->get_param_by_handle('filter-grouping', 'false'); //check the selected and change metas to correct fields $filters_arr['filter-grouping'] = $filter_grouping; $filters_arr['filter-listing'] = $listing_type; $filters_arr['filter-selected'] = $selected; if(!empty($filters_arr['filter-selected'])){ if(!empty($posts) && count($posts) > 0){ foreach($filters_arr['filter-selected'] as $fk => $filter){ if(strpos($filter, 'meta-') === 0){ unset($filters_arr['filter-selected'][$fk]); //delete entry foreach($posts as $key => $post){ $fil = str_replace('meta-', '', $filter); $post_filter_meta = $meta_c->get_meta_value_by_handle($post['ID'], 'eg-'.$fil); $arr = json_decode($post_filter_meta, true); $cur_filter = (is_array($arr)) ? $arr : array($post_filter_meta); //$cur_filter = explode(',', $post_filter_meta); $add_filter = array(); if(!empty($cur_filter)){ foreach($cur_filter as $k => $v){ if(trim($v) !== ''){ $add_filter[sanitize_key($v)] = array('name' => $v, 'slug' => sanitize_key($v), 'parent' => '0'); if(!empty($filters_arr['filter-selected'])){ $filter_found = false; foreach($filters_arr['filter-selected'] as $fcheck){ if($fcheck == sanitize_key($v)){ $filter_found = true; break; } } if(!$filter_found){ $filters_arr['filter-selected'][] = sanitize_key($v); //add found meta } }else{ $filters_arr['filter-selected'][] = sanitize_key($v); //add found meta } } } if(!empty($add_filter)) $navigation_c->set_filter($add_filter); } } } } } } if($all_text == '' || $listing_type == '' || $listing_text == '' || empty($filters_arr['filter-selected'])) return false; $navigation_c->set_filter_settings('filter', $filters_arr); $navigation_c->set_filter_text($all_text); $navigation_c->set_dropdown_text($listing_text); $navigation_c->set_show_count($show_count); $navigation_c->set_filter_type($filter_allow); $navigation_c->set_filter_start_select($filter_pe.eco-tourism/holiday_type.cities-of-art/holiday_type.for-couples/holiday_type.metropolises 0 1 2422285057281425408 7328 0 0 /search/europe/spain/facility_g.independent-kitchen/facility_i.internet/facility_o.outdoor-grill/facility_o.hot-tub 0 1 0 7129 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_o.private-garden/holiday_type.eco-tourism/holiday_type.sailing-sports/order_by.ctime,desc 0 1 8589940736 7416 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_i.air-conditioning/holiday_type.penthouse/facility_i.elevator/holiday_type.luxury 0 1 0 7460 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.detached-house/facility_i.washing-machine/order_by.no_bedrooms,desc 0 1 2422285057281425408 7354 0 0 /search/utility.private-owner/facility_i.washing-machine/facility_o.outdoor-grill/suitability.pets/facility_i.elevator/holiday_type.leisure 0 1 159564352 7416 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.apartment/holiday_type.castle 0 1 0 7439 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.sea-and-surf/holiday_type.leisure/holiday_type.countryside/holiday_type.mountain 0 1 0 7446 0 0 /search/holiday_type.houses-with-pools/holiday_type.cities-of-art/holiday_type.lakeside-and-rivers/holiday_type.apartment/holiday_type.low-cost/order_by.total_square,asc 0 1 8589940736 7258 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.bedroom/holiday_type.cities-of-art/facility_i.washing-machine/facility_i.fireplace 0 1 0 7431 0 0 /search/holiday_type.leisure/holiday_type.lakeside-and-rivers/holiday_type.apartment/holiday_type.eco-tourism/holiday_type.bedroom 0 1 8589940736 7241 0 0 /search/holiday_type.leisure/facility_i.internet/facility_o.outdoor-grill/holiday_type.cities-of-art/holiday_type.eco-tourism/holiday_type.apartment 0 1 2422285057281425408 7441 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.metropolises/holiday_type.leisure 0 1 149767136 7441 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.sea-and-surf/facility_i.air-conditioning 0 1 149716000 7726 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.for-couples/holiday_type.penthouse/facility_i.air-conditioning 0 1 149604160 7394 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.castle/holiday_type.sea-and-surf/order_by.total_square,asc 0 1 149566352 7358 0 0 /search/facility_i.air-conditioning/facility_i.heating/facility_i.fireplace/facility_i.internet/order_by.ctime,desc 0 1 0 7051 0 0 /search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.for-couples/holiday_type.mountain/view.list 0 1 149174064 7222 0 0 /es/search/facility_i.air-conditioning/facility_o.outdoor-grill/facility_i.elevator/facility_o.hot-tub/holiday_type.leisure 0 1 148310608 7769 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.sailing-sports/holiday_type.detached-house/order_by.views,asc 0 1 2422285057281425408 7570 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.golf-courses/holiday_type.bedroom/order_by.ctime,desc 0 1 147463504 7536 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.for-couples/holiday_type.cities-of-art/order_by.featured,desc 0 1 146987312 7461 0 0 /fr/search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.for-couples/facility_i.washing-machine 0 1 146762992 7783 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.metropolises/holiday_type.penthouse 0 1 146545600 7342 0 0 /search/europe/spain/balearic-islands/ibiza/holiday_type.leisure/holiday_type.bedroom/holiday_type.detached-house/holiday_type.low-cost/order_by.total_square,asc 0 1 0 7300 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.bed apply_filters('essgrid_fix_shortcodes_post', $rep); } /** * Register Custom Post Type & Taxonomy */ public function register_custom_post_type() { $postType = apply_filters('essgrid_PunchPost_custom_post_type', 'essential_grid'); $taxonomy = apply_filters('essgrid_PunchPost_category', 'essential_grid_category'); $taxArgs = array(); $taxArgs["hierarchical"] = true; $taxArgs["label"] = __("Custom Categories", EG_TEXTDOMAIN); $taxArgs["singular_label"] = __("Custom Categorie", EG_TEXTDOMAIN); $taxArgs["rewrite"] = true; $taxArgs["public"] = true; $taxArgs["show_admin_column"] = true; $postArgs = array(); $postArgs["label"] = __("Ess. Grid Example Posts", EG_TEXTDOMAIN); $postArgs["singular_label"] = __("Ess. Grid Post", EG_TEXTDOMAIN); $postArgs["public"] = true; $postArgs["capability_type"] = "post"; $postArgs["hierarchical"] = false; $postArgs["show_ui"] = true; $postArgs["show_in_menu"] = true; $postArgs["supports"] = array('title', 'editor', 'thumbnail', 'author', 'comments', 'excerpt'); $postArgs["show_in_admin_bar"] = false; $postArgs["taxonomies"] = array($taxonomy, 'post_tag'); $postArgs["rewrite"] = array("slug"=>$postType,"with_front"=>true); $d = apply_filters('essgrid_register_custom_post_type', array('postArgs' => $postArgs, 'taxArgs' => $taxArgs)); $postArgs = $d['postArgs']; $taxArgs = $d['taxArgs']; register_taxonomy($taxonomy,array($postType),$taxArgs); register_post_type($postType,$postArgs); } /** * Create/Update Database Tables */ public static function create_tables($networkwide = false){ global $wpdb; if(function_exists('is_multisite') && is_multisite() && $networkwide){ //do for each existing site $old_blog = $wpdb->blogid; // Get all blog ids and create tables $blogids = $wpdb->get_col("SELECT blog_id FROM ".$wpdb->blogs); foreach($blogids as $blog_id){ switch_to_blog($blog_id); self::_create_tables(); } switch_to_blog($old_blog); //go back to correct blog }else{ //no multisite, do normal installation self::_create_tables(); } } /** * Create Tables, edited for multisite * @since 1.5.0 */ public static function _create_tables(){ global $wpdb; $charset_collate = $wpdb->get_charset_collate(); //Create/Update Grids Database $grid_ver = get_option("tp_eg_grids_version", '0.99'); if(version_compare($grid_ver, '1', '<')){ require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); $table_name = $wpdb->prefix . self::TABLE_GRID; $sql = "CREATE TABLE $table_name ( id mediumint(6) NOT NULL AUTO_INCREMENT, name VARCHAR(191) NOT NULL, handle VARCHAR(191) NOT NULL, postparams TEXT NOT NULL, params TEXT NOT NULL, layers TEXT NOT NULL, UNIQUE KEY id (id), UNIQUE (handle) ) $charset_collate;"; dbDelta($sql); $table_name = $wpdb->prefix . self::TABLE_ITEM_SKIN; $sql = "CREATE TABLE $table_name ( id mediumint(6) NOT NULL AUTO_INCREMENT, name VARCHAR(191) NOT NULL, handle VARCHAR(191) NOT NULL, params TEXT NOT NULL, layers TEXT NOT NULL, settings TEXT, UNIQUE KEY id (id), UNIQUE (name), UNIQUE (handle) ) $charset_collate;"; dbDelta($sql); $table_name = $wpdb->prefix . self::TABLE_ITEM_ELEMENTS; $sql = "CREATE TABLE $table_name ( id mediumint(6) NOT NULL AUTO_INCREMENT, name VARCHAR(191) NOT NULL, handle VARCHAR(191) NOT NULL, settings TEXT NOT NULL, UNIQUE KEY id (id), UNIQUE (handle) ) $charset_collate;"; dbDelta($sql); $table_name = $wpdb->prefix . self::TABLE_NAVIGATION_SKINS; $sql = "CREATE TABLE $table_name ( id mediumint(6) NOT NULL AUTO_INCREMENT, name VARCHAR(191) NOT NULL, handle VARCHAR(191) NOT NULL, css TEXT NOT NULL, UNIQUE KEY id (id), UNIQUE (handle) ) $charset_collate;"; dbDelta($sql); update_option('tp_eg_grids_version', '1'); $grid_ver = '1'; } //Change database on certain release? No Problem, use the following: //change layers to MEDIUMTEXT from TEXT so that more layers can be added (fix for limited entries on custom grids) if(version_compare($grid_ver, '1.02', '<')){ $table_name = $wpdb->prefix . self::TABLE_GRID; $sql = "CREATE TABLE $table_name ( layers MEDIUMTEXT NOT NULL ) $charset_collate;"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); update_option('tp_eg_grids_version', '1.02'); $grid_ver = '1.02'; } //change more entries to MEDIUMTEXT so that can be stored to prevent loss of data/errors if(version_compare($grid_ver, '1.03', '<')){ require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); $table_name = $wpdb->prefix . self::TABLE_ITEM_SKIN; $sql = "CREATE TABLE $table_name ( layers MEDIUMTEXT NOT NULL ) $charset_collate;"; dbDelta($sql); $table_name = $wpdb->prefix . self::TABLE_NAVIGATION_SKINS; $sql = "CREATE TABLE $table_name ( css MEDIUMTEXT NOT NULL ) $charset_collate;"; dbDelta($sql); $table_name = $wpdb->prefix . self::TABLE_ITEM_ELEMENTS; $sql = "CREATE TABLE $table_name ( settings MEDIUMTEXT NOT NULL ) $charset_collate;"; dbDelta($sql); update_option('tp_eg_grids_version', '1.03'); $grid_ver = '1.03'; } //Add new column settings, as for 2.0 you can add favorite grids if(version_compare($grid_ver, '2.1', '<')){ $table_name = $wpdb->prefix . self::TABLE_GRID; $sql = "CREATE TABLE $table_name ( settings TEXT NULL last_modified DATETIME ) $charset_collate;"; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); update_option('tp_eg_grids_version', '2.1'); $grid_ver = '2.1'; } do_action('essgrid__create_tables', $grid_ver); } /** * Register Custom Sidebars, created in Grids * @since 1.0.6 */ public static function register_custom_sidebars(){ // Register custom Sidebars $sidebars = apply_filters('essgrid_register_custom_sidebars', get_option('esg-widget-areas', false)); if(is_array($sidebars) && !empty($sidebars)){ foreach($sidebars as $handle => $name){ register_sidebar( array ( 'name' => $name, 'id' => 'eg-'.$handle, 'before_widget' => '', 'after_widget' => '' ) ); } } } /** * Get all Grids in Database */ public static function get_essential_grids($order = false){ global $wpdb; $order_fav = false; $additional = ''; if($order !== false && !empty($order)){ $ordertype = key($order); $orderby = reset($order); if($ordertype != 'favorite'){ $additional .= ' ORDER BY '.$ordertype.' '.$orderby; }else{ $order_fav = true; } } $table_name = $wpdb->prefix . self::TABLE_GRID; $grids = $wpdb->get_results("SELECT * FROM $table_name".$additional); //check if we order by favorites here if($order_fav === true){ $temp = array(); $temp_not = array(); foreach($grids as $grid){ $settings = json_decode($grid->settings, true); if(!isset($settings['favorite']) || $settings['favorite'] == 'false'){ $temp_not[] = $grid; }else{ $temp[] = $grid; } } $grids = array(); $grids = ($orderby == 'ASC') ? array_merge($temp, $temp_not) : array_merge($temp_not, $temp); } return apply_filters('essgrid_get_essential_grids', $grids); } /** * Get Grid by ID from Database */ public static function get_essential_grid_by_id($id = 0){ global $wpdb; $id = intval($id); if($id == 0) return false; $table_name = $wpdb->prefix . sellity_o.private-garden/holiday_type.golf-courses/holiday_type.religious-tourism 0 1 0 7692 0 0 /it/search/holiday_type.leisure/facility_i.washing-machine/facility_o.private-garden/order_by.total_square,desc 0 1 0 7557 0 0 /fr/search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.countryside/view.list 0 1 0 7650 0 0 /de/search/europe/facility_o.outdoor-grill/order_by.no_bedrooms,asc 0 1 0 7180 0 0 /fr/search/holiday_type.houses-with-pools/suitability.pets/holiday_type.low-cost/order_by.price,asc 0 1 0 7486 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_o.outdoor-grill/holiday_type.luxury/holiday_type.sailing-sports 0 1 0 7398 0 0 /search/holiday_type.leisure/facility_o.private-garden/holiday_type.countryside/facility_o.outdoor-grill/facility_i.heating 0 1 0 7391 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.for-couples/holiday_type.apartment/holiday_type.eco-tourism 0 2 0 14532 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.penthouse/holiday_type.lakeside-and-rivers/view.map 0 1 0 6843 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.luxury/holiday_type.metropolises/holiday_type.sailing-sports 0 1 0 7387 0 0 /search/holiday_type.leisure/facility_g.dishwasher/holiday_type.castle/holiday_type.low-cost/facility_i.elevator 0 1 0 7364 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_i.washing-machine/holiday_type.sailing-sports/holiday_type.metropolises 0 1 0 7387 0 0 /search/utility.private-owner/facility_i.internet/facility_o.outdoor-grill/facility_o.private-garden/facility_i.air-conditioning 0 1 0 7097 0 0 /it/search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.mountain/order_by.views,desc 0 1 0 7560 0 0 /search/europe/facility_g.dishwasher/facility_i.fireplace/facility_i.single-level-no-stairs/order_by.price,asc 0 1 0 7124 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.luxury/holiday_type.mountain/order_by.featured,desc 0 1 0 7346 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.lakeside-and-rivers/holiday_type.sailing-sports/view.map 0 1 0 6983 0 0 /search/facility_i.heating/facility_o.private-garden/facility_i.single-level-no-stairs/facility_o.outdoor-grill/order_by.no_bedrooms,asc 0 1 0 7069 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/suitability.pets/facility_o.hot-tub/facility_o.private-garden/facility_i.internet 0 1 0 7387 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/utility.private-owner/facility_i.washing-machine/holiday_type.metropolises/holiday_type.for-couples/facility_i.internet/order_by.featured,desc 0 1 0 7624 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.washing-machine/facility_o.private-garden/suitability.pets/holiday_type.apartment/holiday_type.golf-courses/holiday_type.metropolises 0 1 0 7622 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.washing-machine/facility_o.private-garden/holiday_type.for-couples/holiday_type.detached-house/holiday_type.mountain 0 1 0 7600 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.fireplace/facility_o.outdoor-grill/facility_i.elevator/order_by.price,asc 0 1 0 7394 0 0 /de/search/holiday_type.leisure/facility_i.elevator/facility_o.private-garden/holiday_type.sailing-sports/holiday_type.bedroom 0 1 0 7753 0 0 /fr/search/facility_i.heating/facility_o.outdoor-grill/facility_i.single-level-no-stairs/facility_o.hot-tub/order_by.no_bathrooms,asc 0 1 0 7420 0 0 /es/search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.metropolises/holiday_type.castle/holiday_type.for-couples 0 1 0 7793 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.bedroom/holiday_type.mountain 0 1 0 7435 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.countryside/holiday_type.for-couples/holiday_type.detached-house/holiday_type.luxury 0 1 0 7440 0 0 /fr/search/facility_g.independent-kitchen/facility_i.washing-machine/facility_o.private-garden/view.list 0 1 0 7361 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.golf-courses/holiday_type.sea-and-surf/holiday_type.mountain/order_by.views,desc 0 3 0 21774 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.religious-tourism/holiday_type.golf-courses/facility_i.fireplace/facility_o.hot-tub 0 2 0 14900 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.leisure/holiday_type.castle/holiday_type.lakeside-and-rivers/order_by.no_bedrooms,desc 0 2 0 14496 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.low-cost/holiday_type.religious-tourism/holiday_type.apartment/facility_g.independent-kitchen 0 1 0 7497 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.countryside/holiday_type.sailing-sports/order_by.price,desc 0 4 0 29420 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.low-cost/holiday_type.metropolises/holiday_type.golf-courses/holiday_type.sailing-sports 0 1 0 7481 0 0 /search/europe/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.sailing-sports/holiday_type.detached-house/holiday_type.countryside 0 1 0 7508 0 0 /search/europe/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.penthouse/holiday_type.luxury 0 1 0 7428 0 0 /rss/holiday_type.leisure/facility_g.dishwasher/facility_i.air-conditioning/holiday_type.detached-house/holiday_type.mountain/ 0 1 8589940736 1075 1 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.fireplace/facility_o.private-garden/holiday_type.lakeside-and-rivers/holiday_type.sailing-sports 0 1 8589940736 7481 0 0 /search/facility_i.washing-machine/facility_o.private-garden/suitability.pets/facility_i.elevator/facility_i.heating/order_by.total_square,asc 0 1 2422285057281425408 7069 0 0 /search/holiday_type.leisure/facility_i.internet/facility_o.outdoor-grill/suitability.pets/holiday_type.eco-tourism/holiday_type.for-couples 0 1 2422285057281425408 7405 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.leisure/holiday_type.for-couples/holiday_type.countryside/holiday_type.bedroom 0 1 0 7441 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.sailing-sports/holiday_type.sea-and-surf/facility_i.fireplace/facility_i.internet 0 1 0 7458 0 0 /search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.metropolises/holiday_type.castle/holiday_type.apartment/view.map 0 1 2422285057281425408 6877 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.mountain/holiday_type.detached-house/holiday_type.for-couples/suitability.pets 0 1 0 7257 0 0 /it/search/holiday_type.houses-with-pools/facility_g.dishwasher/suitability.pets/holiday_type.religious-tourism/order_by.views,desc 0 1 8589940736 7570 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_i.washing-machine/holiday_type.luxury/facility_i.air-conditioning/order_by.price,desc 0 1 0 7419 0 0 /search/europe/spain/balearic-islands/ibiza/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.elevator/facility_o.outdoor-grill/facility_i.air-conditioning/order_by.no_bedrooms,desc 0 1 15083745678343471104 7541 0 0 /search/holiday_type.leisure/facility_i.elevator/facility_o.outdoor-grill/holiday_type.countryside/facility_i.heating/order_by.total_square,asc 0 1 2422285057281425408 7377 0 0 /search/holiday_type.leisure/facility_i.single-level-no-stairs/facility_o.private-garden/holiday_type.castle/facility_g.independent-kitchen 0 1 2422285057281425408 7411 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_i.washing-machine/facility_o.private-garden/holiday_type.eco-tourism/facility_o.outdoor-grill/holiday_type.sailing-sports 0 1 15083745678343471104 7546 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.leisure/holiday_type.countryside/order_by.no_bedrooms,desc 0 1 149924656 7219 0 0 /es/search/europe/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.sailing-sports/order_by.no_bedrooms,desc 0 1 147839152 7636 0 0 /it/search/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.hot-tub/holiday_type.metropolises/holiday_type.lakeside-and-rivers 0 1 2422285057281425408 7673 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.lakeside-and-rivers/holiday_type.low-cost/holiday_type.leisure 0 1 147101088 7617 0 0 /search/europe/holiday_type.leisure/facility_o.private-garden/holiday_type.for-couples/holiday_type.religious-tourism/suitability.pets 0 1 8589940736 7485 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.metropolises/holiday_type.for-couples/holiday_type.eco-tourism 0 1 0 7351 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.religious-tourism/holiday_type.sea-and-surf/order_by.price,asc 0 1 0 7324 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.eco-tourism/holiday_type.luxury 0 1 0 7440 0 0 /search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.golf-courses/holiday_type.penthouse/holiday_type.lakeside-and-rivers/order_by.price,asc 0 1 0 7404 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_i.air-conditioning/holiday_type.eco-tourism/holiday_type.metropolises/order_by.featured,desc 0 1 0 7428 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.apartment/holiday_type.mountain 0 1 0 7236 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.bedroom/facility_i.washing-machine 0 2 0 14700 0 0 /fr/search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.penthouse/holiday_type.apartment 0 2 0 15068 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.low-cost/holiday_type.cities-of-art/facility_i.elevator 0 1 0 7393 0 0 /search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.countryside/holiday_type.apartment/holiday_type.for-couples/holiday_type.luxury 0 1 0 7286 0 0 /search/holiday_type.houses-with-pools/facility_i.fireplace/facility_o.outdoor-grill/suitability.pets/holiday_type.sailing-sports/facility_g.independent-kitchen 0 1 0 7433 0 0 /de/search/holiday_type.houses-with-pools/utility.private-owner/facility_g.independent-kitchen/facility_o.private-garden/holiday_type.penthouse 0 1 0 7797 0 0 /search/holiday_type.leisure/utility.private-owner/holiday_type.apartment/holiday_type.luxury/holiday_type.sea-and-surf/holiday_type.golf-courses 0 1 0 7288 0 0 /search/holiday_type.leisure/facility_o.outdoor-grill/suitability.pets/holiday_type.lakeside-and-rivers/facility_o.hot-tub/holiday_type.for-couples 0 1 0 7406 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.low-cost/holiday_type.for-couples/holiday_type.penthouse 0 1 0 7248 0 0 /search/europe/holiday_type.leisure/facility_o.private-garden/facility_o.outdoor-grill/facility_i.air-conditioning 0 1 0 7434 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.sailing-sports/holiday_type.bedroom/view.list 0 1 0 7209 0 0 /de/search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.castle/holiday_type.for-couples 0 1 0 7685 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.golf-courses/facility_i.fireplace 0 1 0 7396 0 0 /es/search/europe/facility_g.dishwasher/suitability.pets/view.list 0 1 0 7255 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.bedroom/holiday_type.for-couples/suitability.pets 0 1 0 7347 0 0 /fr/search/facility_g.dishwasher/facility_i.elevator/facility_i.washing-machine/order_by.no_bedrooms,asc 0 1 0 7347 0 0 /it/search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.golf-courses/suitability.pets 0 1 0 7551 0 0 /search/holiday_typear': case 'latest': $ess_api .= '_'.$this->custom_special; $ess_div .= '-'.$this->custom_special; break; } } if($this->custom_posts !== null){ $ess_api .= '_custom_post'; $ess_div .= '-custom_post'; } if($this->custom_settings !== null){ $ess_api .= '_custom'; $ess_div .= '-custom'; } if($this->custom_layers !== null){ $ess_api .= '_layers'; $ess_div .= '-layers'; } if($this->custom_images !== null){ $ess_api .= '_img'; $ess_div .= '-img'; } $this->grid_api_name = $ess_api; $this->grid_div_name = $ess_div; do_action('essgrid_set_api_names', $this); } /** * Output Essential Grid in Page with Custom Layer and Settings * @since: 1.2.0 */ public function output_essential_grid_custom($grid_preview = false){ try{ do_action('essgrid_output_essential_grid_custom', $this, $grid_preview); Essential_Grid_Global_Css::output_global_css_styles_wrapped(); if($this->custom_settings !== null) //custom settings got added. Overwrite Grid Settings and element settings $this->apply_custom_settings(true); if($this->custom_layers !== null) //custom settings got added. Overwrite Grid Settings and element settings $this->apply_custom_layers(true); $this->apply_all_media_types(); return $this->output_by_custom($grid_preview); }catch(Exception $e){ $message = $e->getMessage(); echo $message; } } /** * Apply all media types for custom grids that have not much settings * @since: 1.2.0 */ public function apply_all_media_types(){ /** * Add settings that need to be set * - use all media sources, sorting does not matter since we only set one thing in each entry * - use all poster sources for videos, sorting does not matter since we only set one thing in each entry * - use all lightbox sources, sorting does not matter since we only set one thing in each entry */ $media_orders = Essential_Grid_Base::get_media_source_order(); foreach($media_orders as $handle => $vals){ if($handle == 'featured-image' || $handle == 'alternate-image') continue; $this->grid_postparams['media-source-order'][] = $handle; } $this->grid_postparams['media-source-order'][] = 'featured-image'; //set this as the last entry $this->grid_postparams['media-source-order'][] = 'alternate-image'; //set this as the last entry $poster_orders = Essential_Grid_Base::get_poster_source_order(); if(!empty($poster_orders)){ foreach($poster_orders as $handle => $vals){ $this->grid_params['poster-source-order'][] = $handle; } } $lb_orders = Essential_Grid_Base::get_lb_source_order(); foreach($lb_orders as $handle => $vals){ $this->grid_params['lb-source-order'][] = $handle; } do_action('essgrid_apply_all_media_types', $this); } /** * Apply Custom Settings to the Grid, so users can change everything in the settings they want to * This allows to modify grid_params and grid_post_params * @since: 1.2.0 */ private function apply_custom_settings($has_handle = false){ if(empty($this->custom_settings) || !is_array($this->custom_settings)) return false; $base = new Essential_Grid_Base(); $translate_variables = array('grid-layout' => 'layout'); foreach($this->custom_settings as $handle => $new_setting){ if(isset($translate_variables[$handle])){ $handle = $translate_variables[$handle]; } if($has_handle){ //p- is in front of postparameters if(strpos($handle, 'p-') === 0) $this->grid_postparams[substr($handle, 2)] = $new_setting; else $this->grid_params[$handle] = $new_setting; }else{ if(isset($this->grid_params[$handle])){ $this->grid_params[$handle] = $new_setting; }elseif(isset($this->grid_postparams[$handle])){ $this->grid_postparams[$handle] = $new_setting; }else{ $this->grid_params[$handle] = $new_setting; } } } if(isset($this->grid_params['columns'])){ //change columns $columns = $base->set_basic_colums_custom($this->grid_params['columns']); $this->grid_params['columns'] = $columns; } if(isset($this->grid_params['rows-unlimited']) && $this->grid_params['rows-unlimited'] == 'off'){ //add pagination $this->grid_params['navigation-layout']['pagination']['bottom-1'] = '0'; $this->grid_params['bottom-1-margin-top'] = '10'; } do_action('essgrid_apply_custom_settings', $this); return true; } /** * Apply Custom Layers to the Grid * @since: 1.2.0 */ private function apply_custom_layers(){ $this->grid_layers = array(); if(!empty($this->custom_layers) && is_array($this->custom_layers)){ $add_poster_img = array(); foreach($this->custom_layers as $handle => $val_arr){ if(!empty($val_arr) && is_array($val_arr)){ //$custom_poster = false; foreach($val_arr as $id => $value){ //if($handle == 'custom-poster') $custom_poster = array($id, $value); if($handle == 'custom-poster'){ $add_poster_img[$id] = $value; continue; } $this->grid_layers[$id][$handle] = $value; } } } if(!empty($add_poster_img)){ foreach($add_poster_img as $id => $value){ $this->grid_layers[$id]['custom-image'] = $value; } } } do_action('essgrid_apply_custom_layers', $this); } /** * Output by Specific Stream * @since: 2.1.0 */ public function output_by_specific_stream(){ ob_start(); $this->output_by_stream(false, true, $this->filter_by_ids); $stream_html = ob_get_contents(); ob_clean(); ob_end_clean(); return apply_filters('essgrid_output_by_specific_stream', $stream_html, $this); } /** * Output by Stream * @since: 2.1.0 */ public function output_by_stream($grid_preview = false, $only_elements = false, $specific_ids = array()){ do_action('essgrid_output_by_stream_pre', $grid_preview, $only_elements, $specific_ids); $this->grid_layers = array(); $base = new Essential_Grid_Base(); switch ($base->getVar($this->grid_postparams, 'stream-source-type')) { case 'twitter': $twitter = new Essential_Grid_Twitter($base->getVar($this->grid_postparams, 'twitter-consumer-key'),$base->getVar($this->grid_postparams, 'twitter-consumer-secret'),$base->getVar($this->grid_postparams, 'twitter-access-token'),$base->getVar($this->grid_postparams, 'twitter-access-secret'),$base->getVar($this->grid_postparams, 'twitter-transient-sec',86400)); $tweets = $twitter->get_public_photos($base->getVar($this->grid_postparams, 'twitter-user-id'),$base->getVar($this->grid_postparams, 'twitter-include-retweets'),$base->getVar($this->grid_postparams, 'twitter-exclude-replies'),$base->getVar($this->grid_postparams, 'twitter-count'),$base->getVar($this->grid_postparams, 'twitter-image-only')); if(is_array($tweets)){ foreach ($tweets as $tweet) { if( empty($tweet['custom-image-url-full'][0]) ) { $default_image_id = $base->getVar($this->grid_postparams, 'default-image'); $default_image_size = 'full'; if(!empty($default_image_id)){ $image = wp_get_attachment_image_src($default_image_id,$default_image_size); $tweet['custom-image-url-full']= $image; } } if( empty($tweet['custom-image-url'][0]) ) { $default_image_id = $base->getVar($this->grid_postparams, 'default-image'); $default_image_size = 'full'; if(!empty($default_image_id)){ $image = wp_get_attachment_image_src($default_image_id,$default_image_size); $tweet['custom-image-url']= $image; } } //var_dump($tweet); $this->grid_layers[] = $tweet; //preg_replace("/[^0-9]/","",$tweet['id']) } } break; case 'instagram': $instagram = new Essential_Grid_Instagram($base->getVar($this->grid_postparams, 'instagram-transient-sec',86400)); $public_photos = $instagram->get_publroom/holiday_type.detached-house/holiday_type.luxury/order_by.views,desc 0 1 8589940736 7303 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.internet/facility_o.hot-tub/holiday_type.castle/holiday_type.mountain 0 1 0 7419 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.golf-courses/holiday_type.low-cost/holiday_type.detached-house/order_by.total_square,asc 0 1 0 7236 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.luxury/holiday_type.for-couples/holiday_type.lakeside-and-rivers 0 1 0 7243 0 0 /es/search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_i.internet/facility_o.private-garden/facility_i.elevator/facility_i.heating/order_by.price,asc 0 1 0 7814 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.for-couples/holiday_type.cities-of-art/holiday_type.luxury 0 1 0 7263 0 0 /search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.apartment/holiday_type.lakeside-and-rivers/holiday_type.bedroom 0 1 0 7240 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.metropolises/holiday_type.sea-and-surf/facility_i.air-conditioning 0 1 0 7412 0 0 /search/holiday_type.houses-with-pools/facility_i.internet/facility_o.private-garden/holiday_type.golf-courses/facility_i.elevator/order_by.total_square,desc 0 1 0 7403 0 0 /search/europe/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.bedroom/holiday_type.lakeside-and-rivers/facility_o.private-garden 0 1 0 7500 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.low-cost/holiday_type.lakeside-and-rivers/holiday_type.sea-and-surf/holiday_type.detached-house 0 1 0 7480 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.cities-of-art/holiday_type.penthouse/view.map 0 1 0 6982 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.leisure/utility.property-manager 0 3 0 21636 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.countryside/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.sailing-sports 0 1 0 7461 0 0 /search/holiday_type.leisure/holiday_type.sailing-sports/holiday_type.apartment/holiday_type.luxury/facility_o.outdoor-grill 0 1 0 7385 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.countryside/order_by.price,desc 0 1 0 7278 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.apartment/holiday_type.luxury/holiday_type.sailing-sports 0 1 0 7390 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.countryside/facility_i.internet/facility_o.hot-tub 0 1 0 7393 0 0 /search/facility_i.internet/facility_o.outdoor-grill/facility_i.single-level-no-stairs/facility_o.hot-tub/view.map 0 1 0 6654 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.low-cost/ 0 1 0 7181 0 1 /search/holiday_type.leisure/facility_i.elevator/facility_o.private-garden/holiday_type.metropolises/holiday_type.sailing-sports/facility_i.heating 0 1 0 7441 0 0 /de/search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.religious-tourism/order_by.total_square,desc 0 1 0 7637 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.elevator/facility_o.private-garden/holiday_type.sailing-sports 0 1 0 7392 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.penthouse/utility.private-owner 0 1 0 7468 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.low-cost/facility_i.single-level-no-stairs/holiday_type.castle 0 1 0 7408 0 0 /it/search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_o.private-garden/holiday_type.eco-tourism 0 1 0 7610 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_i.air-conditioning/holiday_type.mountain/facility_i.heating 0 1 0 7397 0 0 /rss/holiday_type.leisure/facility_g.dishwasher/facility_i.air-cond if(strpos($video['custom-image-url-full'][0], 'no_thumbnail') > 0) { $default_image_id = $base->getVar($this->grid_postparams, 'default-image'); //$default_image_size = $base->getVar($this->grid_postparams, 'image-source-type'); $default_image_size = 'full'; if(!empty($default_image_id)){ $image = wp_get_attachment_image_src($default_image_id,$default_image_size); $video['custom-image-url-full']= $image; } } if(strpos($video['custom-image-url'][0], 'no_thumbnail') > 0) { $default_image_id = $base->getVar($this->grid_postparams, 'default-image'); $default_image_size = $base->getVar($this->grid_postparams, 'image-source-type'); if(!empty($default_image_id)){ $image = wp_get_attachment_image_src($default_image_id,$default_image_size); $video['custom-image-url']= $image; } } $this->grid_layers[] = $video; //preg_replace("/[^0-9]/","",$video['id']) } } break; case 'facebook': $facebook = new Essential_Grid_Facebook($base->getVar($this->grid_postparams, 'facebook-transient-sec',86400)); if($base->getVar($this->grid_postparams, 'facebook-type-source') == "album"){ $photo_set_photos = $facebook->get_photo_set_photos($base->getVar($this->grid_postparams, 'facebook-album'),$base->getVar($this->grid_postparams, 'facebook-count',10),$base->getVar($this->grid_postparams, 'facebook-app-id'),$base->getVar($this->grid_postparams, 'facebook-app-secret')); } else{ $user_id = $facebook->get_user_from_url($base->getVar($this->grid_postparams, 'facebook-page-url')); $photo_set_photos = $facebook->get_photo_feed($user_id,$base->getVar($this->grid_postparams, 'facebook-app-id'),$base->getVar($this->grid_postparams, 'facebook-app-secret'),$base->getVar($this->grid_postparams, 'facebook-count',10)); } $facebook_images_avail_sizes = array("thumbnail","normal"); if(is_array($photo_set_photos)){ foreach ($photo_set_photos as $photo) { $photo['custom-preload-image-url'] = $photo['custom-image-url']['thumbnail'][0]; $photo['custom-image-url-full'] = $photo['custom-image-url']['normal']; $photo['custom-image-url'] = $photo['custom-image-url']['normal']; $this->grid_layers[] = $photo; } } break; case 'flickr': $flickr = new Essential_Grid_Flickr($base->getVar($this->grid_postparams, 'flickr-api-key'),$base->getVar($this->grid_postparams, 'flickr-transient-sec',86400)); switch($base->getVar($this->grid_postparams, 'flickr-type')){ case 'publicphotos': $user_id = $flickr->get_user_from_url($base->getVar($this->grid_postparams, 'flickr-user-url')); $flickr_photos = $flickr->get_public_photos($user_id,$base->getVar($this->grid_postparams, 'flickr-count')); break; case 'gallery': $gallery_id = $flickr->get_gallery_from_url($base->getVar($this->grid_postparams, 'flickr-gallery-url')); $flickr_photos = $flickr->get_gallery_photos($gallery_id,$base->getVar($this->grid_postparams, 'flickr-count')); break; case 'group': $group_id = $flickr->get_group_from_url($base->getVar($this->grid_postparams, 'flickr-group-url')); $flickr_photos = $flickr->get_group_photos($group_id,$base->getVar($this->grid_postparams, 'flickr-count')); break; case 'photosets': $flickr_photos = $flickr->get_photo_set_photos($base->getVar($this->grid_postparams, 'flickr-photoset'),$base->getVar($this->grid_postparams, 'flickr-count')); break; } $flickr_images_avail_sizes = array('Square','Thumbnail','Large Square','Small','Small 320','Medium','Medium 640','Medium 800','Large','Original'); if(is_array($flickr_photos)){ foreach ($flickr_photos as $photo) { $photo['custom-preload-image-url'] = $photo['custom-image-url']['Square'][0]; $photo['custom-image-url-full'] = $this->find_biggest_photo($photo['custom-image-url'],$base->getVar($this->grid_postparams, 'flickr-full-size'),$flickr_images_avail_sizes); $photo['custom-image-url'] = $this->find_biggest_photo($photo['custom-image-url'],$base->getVar($this->grid_postparams, 'flickr-thumb-size'),$flickr_images_avail_sizes); $this->grid_layers[] = $photo; //preg_replace("/[^0-9]/","",$photo['id']) } } break; case 'behance': $behance = new Essential_Grid_Behance($base->getVar($this->grid_postparams, 'behance-api'),$base->getVar($this->grid_postparams, 'behance-user-id'),$base->getVar($this->grid_postparams, 'behance-transient-sec',0)); if( $base->getVar($this->grid_postparams, 'behance-type','projects')=='projects' ){ $images = $behance->get_behance_projects( $base->getVar($this->grid_postparams, 'behance-count',100) ); } else { $images = $behance->get_behance_project_images($base->getVar($this->grid_postparams, 'behance-project',''), $base->getVar($this->grid_postparams, 'behance-count',100) ); } $behance_images_avail_sizes = array('disp','max_86400','max_1240','original'); $behance_project_images_avail_sizes = array('115','202','230','404','original'); if(is_array($images)){ foreach ($images as $image) { if($base->getVar($this->grid_postparams, 'behance-type','projects')!='projects'){ $image['custom-image-url-full'] = $this->find_biggest_photo($image['custom-image-url'],$base->getVar($this->grid_postparams, 'behance-project-full-size'),$behance_project_images_avail_sizes); $image['custom-image-url'] = $this->find_biggest_photo($image['custom-image-url'],$base->getVar($this->grid_postparams, 'behance-project-thumb-size'),$behance_project_images_avail_sizes); } else{ $image['custom-image-url-full'] = $this->find_biggest_photo($image['custom-image-url'],$base->getVar($this->grid_postparams, 'behance-full-size'),$behance_images_avail_sizes); $image['custom-image-url'] = $this->find_biggest_photo($image['custom-image-url'],$base->getVar($this->grid_postparams, 'behance-thumb-size'),$behance_images_avail_sizes); } $this->grid_layers[] = $image; //preg_replace("/[^0-9]/","",$image['id']) } } break; case 'nextgen': $nextgen = new Essential_Grid_Nextgen(); switch ($base->getVar($this->grid_postparams, 'nextgen-type','album')) { case 'album': $images = $nextgen->get_album_images($base->getVar($this->grid_postparams, 'nextgen-album','')); break; case 'gallery': $images = $nextgen->get_gallery_images(array($base->getVar($this->grid_postparams, 'nextgen-gallery',''))); break; case 'tags': $images = $nextgen->get_tags_images($base->getVar($this->grid_postparams, 'nextgen-tags','')); break; } if(is_array($images)){ foreach ($images as $image) { $image['custom-image-url-full'] = $image['custom-image-url']['original']; $image['custom-image-url'] = $image['custom-image-url'][$base->getVar($this->grid_postparams, 'nextgen-thumb-size','thumb')]; $this->grid_layers[] = $image; //preg_replace("/[^0-9]/","",$image['id']) } } break; } if(!empty($specific_ids)){ //remove all that we do not have in this array foreach($this->grid_layers as $key => $layer){ if(!in_array($key, $specific_ids)) unset($this->grid_layers[$key]); } } /* $order_by = explode(',', $base->getVar($this->grid_params, 'sorting-order-by', 'date')); if(!is_array($order_by)) $order_by = array($order_by); $order_by_start = $base->getVar($this->grid_params, 'sorting-order-by-start', 'none'); $order_by_dir = $base->getVar($this->grid_params, 'sorting-order-type', 'ASC'); if(!empty($order_by_start) && !empty($this->grid_layers)){ if(is_array($order_by_start)){ $order_by_start = $order_by_start[0]; } switch($order_by_start){ case 'rand': $this->grid_layers = $base->shuffle_assoc($this->grid_layers); break; case 'title': case 'post_url': oliday_type.low-cost/holiday_type.sea-and-surf/holiday_type.leisure/holiday_type.luxury/facility_o.outdoor-grill 0 1 0 7446 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.apartment/holiday_type.sea-and-surf/order_by.featured,desc 0 1 0 7219 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.bedroom/holiday_type.penthouse/holiday_type.low-cost 0 1 2422285057281425408 7324 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_o.outdoor-grill/holiday_type.lakeside-and-rivers/holiday_type.leisure/holiday_type.cities-of-art 0 1 8589940736 7485 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.hot-tub/holiday_type.lakeside-and-rivers/holiday_type.low-cost/holiday_type.sailing-sports 0 1 8589940736 7477 0 0 /search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.mountain/holiday_type.sea-and-surf/holiday_type.low-cost/holiday_type.leisure 0 1 0 7281 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.sea-and-surf/holiday_type.sailing-sports/holiday_type.golf-courses/suitability.pets 0 1 0 7268 0 0 /search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.luxury/holiday_type.apartment/holiday_type.penthouse/order_by.price,asc 0 1 2422285057281425408 7259 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.eco-tourism/holiday_type.detached-house/holiday_type.sea-and-surf/holiday_type.lakeside-and-rivers 0 1 155498992 7333 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.low-cost/holiday_type.detached-house/holiday_type.religious-tourism/facility_i.washing-machine 0 1 0 7456 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_g.independent-kitchen/facility_i.air-conditioning/holiday_type.luxury/view.map 0 1 2422285057281425408 7028 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_o.private-garden/holiday_type.penthouse/holiday_type.cities-of-art/holiday_type.lakeside-and-rivers 0 1 0 7442 0 0 /search/holiday_type.leisure/suitability.pets/holiday_type.metropolises/holiday_type.sailing-sports/holiday_type.mountain/holiday_type.penthouse 0 1 2422285057281425408 7241 0 0 /search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.lakeside-and-rivers/holiday_type.sea-and-surf/order_by.no_bedrooms,asc 0 1 149731984 7227 0 0 /search/europe/holiday_type.houses-with-pools/utility.private-owner/holiday_type.sea-and-surf/holiday_type.eco-tourism 0 1 149590992 7327 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.sea-and-surf/holiday_type.for-couples/order_by.featured,desc 0 1 148308272 7538 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.religious-tourism/holiday_type.apartment 0 1 8589940736 7532 0 0 /rss/europe/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.golf-courses/holiday_type.apartment/ 0 1 147619360 1075 0 0 /it/search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.fireplace/holiday_type.penthouse/facility_i.heating 0 1 8589940736 7657 0 0 /fr/search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.detached-house/holiday_type.bedroom/holiday_type.sea-and-surf 0 1 0 7781 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.air-conditioning/holiday_type.sea-and-surf/holiday_type.luxury/utility.private-owner 0 1 0 7465 0 0 /search/facility_g.independent-kitchen/facility_i.air-conditioning/facility_i.single-level-no-stairs/facility_i.internet/facility_i.heating/facility_o.hot-tub 0 1 145051536 7114 0 0 /search/holiday_type.leisure/utility.private-owner/facility_o.outdoor-grill/holiday_type.countryside/holiday_type.apartment/order_by.total_square,asc 0 1 0 7409 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/suitability.pets/holiday_type.low-cost/facility_i.washing-machine/facility_o.hot-tub 0 1 0 7404 0 0 /search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.eco-tourrid_output_by_gallery', $this, $grid_preview, $only_elements); return $this->output_by_custom($grid_preview, $only_elements); } /** * Output by custom grid */ public function output_by_custom($grid_preview = false, $only_elements = false, $set_load_more = false){ $post_limit = 99999; do_action('essgrid_output_by_custom_pre', $this, $grid_preview, $only_elements); $base = new Essential_Grid_Base(); $navigation_c = new Essential_Grid_Navigation($this->grid_id); $item_skin = new Essential_Grid_Item_Skin(); $item_skin->grid_id = $this->grid_id; $item_skin->set_grid_type($base->getVar($this->grid_params, 'layout','even')); $item_skin->set_default_image_by_id($base->getVar($this->grid_postparams, 'default-image', 0, 'i')); $item_skin->set_default_youtube_image_by_id($base->getVar($this->grid_params, 'youtube-default-image', 0, 'i')); $item_skin->set_default_vimeo_image_by_id($base->getVar($this->grid_params, 'vimeo-default-image', 0, 'i')); $item_skin->set_default_html_image_by_id($base->getVar($this->grid_params, 'html5-default-image', 0, 'i')); if($set_load_more) $item_skin->set_load_more(); $m = new Essential_Grid_Meta(); $skins_html = ''; $skins_css = ''; $filters = array(); $rows_unlimited = $base->getVar($this->grid_params, 'rows-unlimited', 'on'); $load_more = $base->getVar($this->grid_params, 'load-more', 'none'); $load_more_start = $base->getVar($this->grid_params, 'load-more-start', 3, 'i'); if($rows_unlimited == 'on' && $load_more !== 'none' && $grid_preview == false){ //grid_preview means disable load more in preview $post_limit = $load_more_start; } $nav_filters = array(); $nav_layout = $base->getVar($this->grid_params, 'navigation-layout', array()); $nav_skin = $base->getVar($this->grid_params, 'navigation-skin', 'minimal-light'); $hover_animation = $base->getVar($this->grid_params, 'hover-animation', 'fade'); $filter_allow = $base->getVar($this->grid_params, 'filter-arrows', 'single'); $filter_start = $base->getVar($this->grid_params, 'filter-start', ''); $filter_all_text = $base->getVar($this->grid_params, 'filter-all-text', __('Filter - All', EG_TEXTDOMAIN)); $filter_dropdown_text = $base->getVar($this->grid_params, 'filter-dropdown-text', __('Filter Categories', EG_TEXTDOMAIN)); $show_count = $base->getVar($this->grid_params, 'filter-counter', 'off'); $search_text = $base->getVar($this->grid_params, 'search-text', __('Search...', EG_TEXTDOMAIN)); $filter_grouping = $base->getVar($this->grid_params, 'filter-grouping', 'false'); $listing_type = $base->getVar($this->grid_params, 'filter-listing', 'list'); //$selected = $base->getVar($this->grid_params, 'filter-selected', array()); $filters_arr['filter-grouping'] = $filter_grouping; $filters_arr['filter-listing'] = $listing_type; $filters_arr['filter-selected'] = array(); //always give empty array (metas ect. may still be checked if Grid was a post based grid before. $navigation_c->set_filter_settings('filter', $filters_arr); $nav_type = $base->getVar($this->grid_params, 'nagivation-type', 'internal'); $do_nav = ($nav_type == 'internal') ? true : false; $order_by = explode(',', $base->getVar($this->grid_params, 'sorting-order-by', 'date')); if(!is_array($order_by)) $order_by = array($order_by); $order_by_start = $base->getVar($this->grid_params, 'sorting-order-by-start', 'none'); $order_by_dir = $base->getVar($this->grid_params, 'sorting-order-type', 'ASC'); $sort_by_text = $base->getVar($this->grid_params, 'sort-by-text', __('Sort By ', EG_TEXTDOMAIN)); $module_spacings = $base->getVar($this->grid_params, 'module-spacings', '5'); $top_1_align = $base->getVar($this->grid_params, 'top-1-align', 'center'); $top_2_align = $base->getVar($this->grid_params, 'top-2-align', 'center'); $bottom_1_align = $base->getVar($this->grid_params, 'bottom-1-align', 'center'); $bottom_2_align = $base->getVar($this->grid_params, 'bottom-/facility_o.private-garden 0 1 0 7398 0 0 /search/facility_g.dishwasher/facility_i.elevator/facility_i.air-conditioning/facility_i.single-level-no-stairs/view.map 0 1 0 6655 0 0 /search/utility.private-owner/facility_g.independent-kitchen/facility_i.single-level-no-stairs/facility_o.outdoor-grill/facility_i.heating 0 1 0 7099 0 0 /search/holiday_type.leisure/utility.private-owner/holiday_type.countryside/holiday_type.mountain/holiday_type.sea-and-surf 0 1 0 7261 0 0 /search/holiday_type.leisure/facility_o.private-garden/holiday_type.religious-tourism/facility_o.outdoor-grill/order_by.total_square,asc 0 1 0 7361 0 0 /fr/search/facility_g.dishwasher/facility_i.heating/facility_g.independent-kitchen/order_by.views,asc 0 1 0 7353 0 0 /search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.cities-of-art/holiday_type.metropolises/suitability.pets 0 1 0 7358 0 0 /search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.metropolises/holiday_type.low-cost/order_by.featured,desc 0 1 0 7219 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.religious-tourism/holiday_type.penthouse/facility_o.private-garden 0 1 0 7380 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.eco-tourism/holiday_type.metropolises/order_by.no_bedrooms,desc 0 1 0 7229 0 0 /search/holiday_type.leisure/facility_i.internet/facility_o.private-garden/holiday_type.luxury/facility_o.hot-tub 0 1 0 7361 0 0 /search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.sailing-sports/holiday_type.sea-and-surf/order_by.featured,desc 0 1 0 7223 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.leisure/holiday_type.lakeside-and-rivers 0 1 0 7542 0 0 /fr/search/holiday_type.leisure/utility.private-owner/holiday_type.luxury/order_by.views,asc 0 1 0 7527 0 0 /search/europe/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.leisure/facility_i.washing-machine 0 2 0 14900 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.cities-of-art/holiday_type.sailing-sports/holiday_type.sea-and-surf 0 1 0 7403 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.bedroom/facility_i.fireplace/holiday_type.leisure 0 1 0 7392 0 0 /search/europe/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/facility_i.single-level-no-stairs 0 1 0 7452 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.eco-tourism/holiday_type.low-cost/holiday_type.bedroom 0 1 0 7387 0 0 /search/holiday_type.leisure/suitability.pets/holiday_type.metropolises/holiday_type.mountain/holiday_type.golf-courses/holiday_type.castle 0 1 0 7243 0 0 /fr/search/holiday_type.houses-with-pools/facility_i.single-level-no-stairs/facility_o.private-garden/holiday_type.detached-house/holiday_type.castle 0 1 0 7821 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.luxury/holiday_type.eco-tourism/holiday_type.sea-and-surf 0 1 0 7625 0 0 /it/search/europe/spain/balearic-islands/holiday_type.houses-with-pools/utility.private-owner/facility_i.elevator/facility_o.private-garden/suitability.pets/facility_i.internet/holiday_type.apartment 0 1 0 7783 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_i.washing-machine/suitability.pets/holiday_type.metropolises/holiday_type.castle/holiday_type.sailing-sports/order_by.views,asc 0 1 0 7599 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.hot-tub/holiday_type.golf-courses/facility_i.single-level-no-stairs/facility_i.heating 0 1 0 7476 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.golf-courses/holiday_type.luxury/holiday_type.sea-and-surf/view.list 0 1 0 7248 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.sea-and-surf/holiday_type.for-couples/holiday_type.mountain/order_by.total_square,asc 0 1 0 7257 0 0 /it/search/holiday_type.houses-with-pools/facility_o.outdoor-grill/suitability.pets/holiday_type.metropolises/order_by.ctime,desc 0 1 0 7562 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.internet/holiday_type.penthouse/holiday_type.countryside/holiday_type.leisure 0 1 0 7435 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.hot-tub/holiday_type.countryside/holiday_type.leisure/order_by.ctime,desc 0 1 0 7398 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_i.washing-machine/holiday_type.lakeside-and-rivers/holiday_type.sea-and-surf 0 1 0 7419 0 0 /search/europe/holiday_type.leisure/holiday_type.penthouse/holiday_type.apartment/holiday_type.metropolises 0 2 0 14584 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.cities-of-art/holiday_type.luxury/order_by.price,desc 0 2 0 14446 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.cities-of-art/holiday_type.castle/order_by.price,desc 0 1 0 7222 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.detached-house/holiday_type.countryside/holiday_type.bedroom/order_by.featured,desc 0 1 0 7253 0 0 /search/europe/spain/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.low-cost/order_by.price,asc 0 1 8589940736 7286 0 0 /search/facility_g.dishwasher/facility_i.fireplace/facility_i.internet/facility_i.heating/facility_i.washing-machine/holiday_type.houses-with-pools 0 1 162996592 7433 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.castle/holiday_type.for-couples/holiday_type.golf-courses/holiday_type.mountain 0 1 0 7448 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/suitability.pets/holiday_type.golf-courses/holiday_type.leisure/holiday_type.religious-tourism 0 1 0 7423 0 0 /search/holiday_type.houses-with-pools/facility_i.fireplace/facility_o.private-garden/holiday_type.leisure/holiday_type.metropolises/facility_o.outdoor-grill 0 1 0 7451 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/facility_o.hot-tub/holiday_type.religious-tourism/facility_i.heating/holiday_type.eco-tourism 0 1 0 7444 0 0 /search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.castle/holiday_type.sea-and-surf/holiday_type.apartment/holiday_type.golf-courses 0 1 0 7287 0 0 /search/holiday_type.houses-with-pools/holiday_type.cities-of-art/holiday_type.lakeside-and-rivers/holiday_type.detached-house/holiday_type.mountain/order_by.no_bedrooms,asc 0 1 8589940736 7259 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.detached-house/holiday_type.mountain/holiday_type.castle/holiday_type.luxury 0 1 0 7284 0 0 /search/facility_i.elevator/facility_o.private-garden/facility_i.internet/facility_i.air-conditioning/facility_o.hot-tub/facility_o.outdoor-grill/view.list 0 1 0 7094 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_o.private-garden/holiday_type.religious-tourism/holiday_type.countryside/facility_i.single-level-no-stairs 0 1 8589940736 7524 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_i.air-conditioning/holiday_type.apartment/holiday_type.metropolises/facility_i.internet 0 1 0 7465 0 0 /search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.lakeside-and-rivers/holiday_type.metropolises/holiday_type.luxury/holiday_type.sailing-sports 0 1 0 7447 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/suitability.pets/holiday_type.countryside/holiday_type.sea-and-surf/holiday_type.castle 0 1 2422285057281425408 7398 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.lakeside-and-rivers/holiday_type.sailing-sports/order_by.no_bathrooms,desc 0 1 149139136 7226 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.countryside/holiday_type.cities-of-art/holiday_type.for-couples/order_by.price,desc 0 1 148385536 7568 0 0 /es/search/holiday_type.leisure/utility.private-owner/holiday_type.detached-house/holiday_type.golf-courses/order_by.no_bedrooms,desc_post', $this, $grid_preview, $only_elements); } } /** * Output by posts */ public function output_by_posts($grid_preview = false){ global $sitepress; do_action('essgrid_output_by_posts_pre', $this, $grid_preview); $post_limit = 99999; $base = new Essential_Grid_Base(); $navigation_c = new Essential_Grid_Navigation($this->grid_id); $meta_c = new Essential_Grid_Meta(); $meta_link_c = new Essential_Grid_Meta_Linking(); $item_skin = new Essential_Grid_Item_Skin(); $item_skin->grid_id = $this->grid_id; $item_skin->set_grid_type($base->getVar($this->grid_params, 'layout','even')); $item_skin->set_default_image_by_id($base->getVar($this->grid_postparams, 'default-image', 0, 'i')); $item_skin->set_default_youtube_image_by_id($base->getVar($this->grid_params, 'youtube-default-image', 0, 'i')); $item_skin->set_default_vimeo_image_by_id($base->getVar($this->grid_params, 'vimeo-default-image', 0, 'i')); $item_skin->set_default_html_image_by_id($base->getVar($this->grid_params, 'html-default-image', 0, 'i')); $m = new Essential_Grid_Meta(); $skins_html = ''; $skins_css = ''; $filters = array(); $rows_unlimited = $base->getVar($this->grid_params, 'rows-unlimited', 'on'); $load_more = $base->getVar($this->grid_params, 'load-more', 'none'); $load_more_start = $base->getVar($this->grid_params, 'load-more-start', 3, 'i'); if($rows_unlimited == 'on' && $load_more !== 'none' && $grid_preview == false){ //grid_preview means disable load more in preview $post_limit = $load_more_start; } $start_sortby = $base->getVar($this->grid_params, 'sorting-order-by-start', 'none'); $start_sortby_type = $base->getVar($this->grid_params, 'sorting-order-type', 'ASC'); $post_category = $base->getVar($this->grid_postparams, 'post_category'); $post_types = $base->getVar($this->grid_postparams, 'post_types'); $page_ids = explode(',', $base->getVar($this->grid_postparams, 'selected_pages', '-1')); $cat_relation = $base->getVar($this->grid_postparams, 'category-relation', 'OR'); $max_entries = $this->get_maximum_entries($this); $additional_query = $base->getVar($this->grid_postparams, 'additional-query', ''); if($additional_query !== '') $additional_query = wp_parse_args($additional_query); $cat_tax = array('cats' => '', 'tax' => ''); if($this->custom_posts !== null){ //output by specific set posts $posts = Essential_Grid_Base::get_posts_by_ids($this->custom_posts, $start_sortby, $start_sortby_type); $cat_tax_obj = Essential_Grid_Base::get_categories_by_posts($posts); if(!empty($cat_tax_obj)){ $cat_tax['cats'] = Essential_Grid_Base::translate_categories_to_string($cat_tax_obj); } //$cat_tax = Essential_Grid_Base::getCatAndTaxData($post_category); //get cats by posts }elseif($this->custom_special !== null){ //output by some special rule $max_entries = intval($base->getVar($this->grid_params, 'max-entries', '20')); if($max_entries == 0) $max_entries = 20; switch($this->custom_special){ case 'related': $posts = Essential_Grid_Base::get_related_posts($max_entries); break; case 'popular': $posts = Essential_Grid_Base::get_popular_posts($max_entries); break; case 'latest': default: $posts = Essential_Grid_Base::get_latest_posts($max_entries); break; } $cat_tax_obj = Essential_Grid_Base::get_categories_by_posts($posts); if(!empty($cat_tax_obj)){ $cat_tax['cats'] = Essential_Grid_Base::translate_categories_to_string($cat_tax_obj); } //$cat_tax = Essential_Grid_Base::getCatAndTaxData($post_category); //get cats by posts }else{ //output with the grid settings from an existing grid $cat_tax = Essential_Grid_Base::getCatAndTaxData($post_category); $posts = Essential_Grid_Base::getPostsByCategory($this->grid_id, $cat_tax['cats'], $post_types, $cat_tax['tax'], $page_ids, $start_sortby, $start_sortby_type, $max_entries, $additional_query, true, $cat_relation); } $nav_layout = $base->getVar($this->grid_params, 'navigation-layout', array()); $nav_skin = $base->getVar($this->grid_params, 'navigation-skin', 'minimal-light'); $hover_animation = $base->getVar($this->grid_params, 'hover-animation', 'fade'); $filter_allow = $base->getVar($this->grid_params, 'filter-arrows', 'single'); $filter_start = $base->getVar($this->grid_params, 'filter-start', ''); $nav_type = $base->getVar($this->grid_params, 'nagivation-type', 'internal'); $do_nav = ($nav_type == 'internal') ? true : false; $order_by = explode(',', $base->getVar($this->grid_params, 'sorting-order-by', 'date')); if(!is_array($order_by)) $order_by = array($order_by); $order_by_start = $base->getVar($this->grid_params, 'sorting-order-by-start', 'none'); if(strpos($order_by_start, 'eg-') === 0 || strpos($order_by_start, 'egl-') === 0){ //add meta at the end for meta sorting //if essential Meta, replace to meta name. Else -> replace - and _ with space, set each word uppercase $metas = $m->get_all_meta(); $f = false; if(!empty($metas)){ foreach($metas as $meta){ if('eg-'.$meta['handle'] == $order_by_start || 'egl-'.$meta['handle'] == $order_by_start){ $f = true; $order_by_start = $meta['name']; break; } } } if($f === false){ $order_by_start = ucwords(str_replace(array('-', '_'), array(' ', ' '), $order_by_start)); } } $sort_by_text = $base->getVar($this->grid_params, 'sort-by-text', __('Sort By ', EG_TEXTDOMAIN)); $search_text = $base->getVar($this->grid_params, 'search-text', __('Search...', EG_TEXTDOMAIN)); $module_spacings = $base->getVar($this->grid_params, 'module-spacings', '5'); $top_1_align = $base->getVar($this->grid_params, 'top-1-align', 'center'); $top_2_align = $base->getVar($this->grid_params, 'top-2-align', 'center'); $bottom_1_align = $base->getVar($this->grid_params, 'bottom-1-align', 'center'); $bottom_2_align = $base->getVar($this->grid_params, 'bottom-2-align', 'center'); $top_1_margin = $base->getVar($this->grid_params, 'top-1-margin-bottom', 0, 'i'); $top_2_margin = $base->getVar($this->grid_params, 'top-2-margin-bottom', 0, 'i'); $bottom_1_margin = $base->getVar($this->grid_params, 'bottom-1-margin-top', 0, 'i'); $bottom_2_margin = $base->getVar($this->grid_params, 'bottom-2-margin-top', 0, 'i'); $left_margin = $base->getVar($this->grid_params, 'left-margin-left', 0, 'i'); $right_margin = $base->getVar($this->grid_params, 'right-margin-right', 0, 'i'); $nav_styles['top-1'] = array('margin-bottom' => $top_1_margin.'px', 'text-align' => $top_1_align); $nav_styles['top-2'] = array('margin-bottom' => $top_2_margin.'px', 'text-align' => $top_2_align); $nav_styles['left'] = array('margin-left' => $left_margin.'px'); $nav_styles['right'] = array('margin-right' => $right_margin.'px'); $nav_styles['bottom-1'] = array('margin-top' => $bottom_1_margin.'px', 'text-align' => $bottom_1_align); $nav_styles['bottom-2'] = array('margin-top' => $bottom_2_margin.'px', 'text-align' => $bottom_2_align); $ajax_container_position = $base->getVar($this->grid_params, 'ajax-container-position', 'top'); if($do_nav){ //only do if internal is selected $navigation_c->set_special_class('esg-fgc-'.$this->grid_id); $filters_meta = array(); $filters_extra = array(); foreach($this->grid_params as $gkey => $gparam){ if(strpos($gkey, 'filter-selected') === false) continue; $fil_id = intval(str_replace('filter-selected-', '', $gkey)); $fil_id = ($fil_id == 0) ? '' : '-'.$fil_id; $filters_arr = array(); $filters_arr['filter'.$fil_id]['filter-grouping'] = $base->getVar($this->grid_params, 'filter-grouping'.$fil_id, 'false'); $filters_arr['filter'.$fil_id]['filter-listing'] = $base->getVar($this->grid_params, 'filter-listing'.$fil_id, 'list'); $filters_arr['filter'.$fil_id]['filter-selected'] = $base->getVar($this->grid_params, 'filter-selected'.$fil_id, array()); $filter_all_text = $base->getVar($this->grid_params, 'filter-all-text'.$fil_id, __('Filter - All', EG_TEXTDOMAIN)); $filter_dropdown_text = $base->getVar($this->grid_params, 'filter-dropdown-text'.$fil_id, __('Filter Categories', EG_TEXTDOMAIN)); $show_count = $base->getVar($this->grid_params, 'filter-counter'.$fil_id, 'off'); if(!empty($filters_arr['filter'.$fil_id]['filter-selected'])){ if(!empty($posts) && count($posts) > 0){ foreach($filters_arr['filter'.$fil_id]['filter-selected'] as $fk => $filter){ if(strpos($filter, 'meta-') === 0){ unset($filters_arr['filter'.$fil_id]['filter-selected'][$fk]); //delete entry foreach($posts as $key => $post){ $fil = str_replace('meta-', '', $filter); $post_filter_meta = $meta_c->get_meta_value_by_handle($post['ID'], 'eg-'.$fil); if($post_filter_meta == ''){ //check if we are linking $post_filter_meta = $meta_link_c->get_link_meta_value_by_handle($post['ID'], 'egl-'.$fil); } $arr = json_decode($post_filter_meta, true); $cur_filter = (is_array($arr)) ? $arr : array($post_filter_meta); //$cur_filter = explode(',', $post_filter_meta); $add_filter = array(); if(!empty($cur_filter)){ foreach($cur_filter as $k => $v){ if(trim($v) !== ''){ $add_filter[sanitize_key($v)] = array('name' => $v, 'slug' => sanitize_key($v), 'parent' => '0'); if(!empty($filters_arr['filter'.$fil_id]['filter-selected'])){ $filter_found = false; foreach($filters_arr['filter'.$fil_id]['filter-selected'] as $fcheck){ if($fcheck == sanitize_key($v)){ $filter_found = true; break; } } if(!$filter_found){ $filters_arr['filter'.$fil_id]['filter-selected'][] = sanitize_key($v); //add found meta } }else{ $filters_arr['filter'.$fil_id]['filter-selected'][] = sanitize_key($v); //add found meta } } } $filters_meta = $filters_meta + $add_filter; if(!empty($add_filter)) $navigation_c->set_filter($add_filter); } } } } } $filters_extra = $filters_arr['filter'.$fil_id]['filter-selected'] + $filters_extra; } $navigation_c->set_filter_settings('filter'.$fil_id, $filters_arr['filter'.$fil_id]); $navigation_c->set_filter_text($filter_all_text, $fil_id); $navigation_c->set_dropdown_text($filter_dropdown_text, $fil_id); $navigation_c->set_show_count($show_count, $fil_id); } $navigation_c->set_filter_type($filter_allow); $navigation_c->set_filter_start_select($filter_start); $navigation_c->set_specific_styles($nav_styles); $navigation_c->set_layout($nav_layout); //set the layout $navigation_c->set_orders($order_by); //set order of filter $navigation_c->set_orders_text($sort_by_text); //set order of filter $navigation_c->set_orders_start($order_by_start); //set order of filter $navigation_c->set_search_text($search_text); } $nav_filters = array(); $taxes = array('post_tag'); if(!empty($cat_tax['tax'])) $taxes = explode(',', $cat_tax['tax']); if(!empty($cat_tax['cats'])){ $cats = explode(',', $cat_tax['cats']); foreach($cats as $key => $id){ if(Essential_Grid_Wpml::is_wpml_exists() && isset($sitepress)){ $new_id = icl_object_id($id, 'category', true, $sitepress->get_default_language()); $cat = get_category($new_id); }else{ $cat = get_category($id); } if(is_object($cat)){ $nav_filters[$id] = array('name' => $cat->cat_name, 'slug' => sanitize_key($cat->slug), 'parent' => $cat->category_parent); } foreach($taxes as $custom_tax){ $term = get_term_by('id', $id, $custom_tax); if(is_object($term)) $nav_filters[$id] = array('name' => $term->name, 'slug' => sanitize_key($term->slug), 'parent' => $term->parent); } } if(!empty($filters_meta)){ $nav_filters = $filters_meta + $nav_filters; } if(!empty($add_filter)){ $nav_filters = $nav_filters + $add_filter; } asort($nav_filters); } $item_skin->init_by_id($base->getVar($this->grid_params, 'entry-skin', 0, 'i')); $lazy_load = $base->getVar($this->grid_params, 'lazy-loading', 'off'); if($lazy_load == 'on'){ $item_skin->set_lazy_load(true); $lazy_load_blur = $base->getVar($this->grid_params, 'lazy-loading-blur', 'on'); if($lazy_load_blur == 'on') $item_skin->set_lazy_load_blur(true); } $default_media_source_order = $base->getVar($this->grid_postparams, 'media-source-order', ''); $item_skin->set_default_media_source_order($default_media_source_order); $default_lightbox_source_order = $base->getVar($this->grid_params, 'lb-source-order', ''); $item_skin->set_default_lightbox_source_order($default_lightbox_source_order); $default_aj_source_order = $base->getVar($this->grid_params, 'aj-source-order', ''); $item_skin->set_default_ajax_source_order($default_aj_source_order); $lightbox_mode = $base->getVar($this->grid_params, 'lightbox-mode', 'single'); $lightbox_include_media = $base->getVar($this->grid_params, 'lightbox-exclude-media', 'off'); $post_media_source_type = $base->getVar($this->grid_postparams, 'image-source-type', 'full'); $default_video_poster_order = $base->getVar($this->grid_params, 'poster-source-order', ''); if($default_video_poster_order == '') $default_video_poster_order = $base->getVar($this->grid_postparams, 'poster-source-order', ''); $item_skin->set_default_video_poster_order($default_video_poster_order); $layout = $base->getVar($this->grid_params, 'layout','even'); $layout_sizing = $base->getVar($this->grid_params, 'layout-sizing', 'boxed'); if($layout_sizing !== 'fullwidth' && $layout == 'masonry'){ $item_skin->set_poster_cropping(true); } $found_filter = array(); $i = 1; /*if($lightbox_mode == 'content' || $lightbox_mode == 'content-gallery' || $lightbox_mode == 'woocommerce-gallery'){ $item_skin->set_lightbox_rel('ess-'.$this->grid_id); } */ if(!empty($posts) && count($posts) > 0){ foreach($posts as $key => $post){ if($grid_preview == false){ //check if post should be visible or if its invisible on current grid settings $is_visible = $this->check_if_visible($post['ID'], $this->grid_id); if($is_visible == false) continue; // continue if invisible } if($lightbox_mode == 'content' || $lightbox_mode == 'content-gallery' || $lightbox_mode == 'woocommerce-gallery'){ //$item_skin->set_lightbox_rel('ess-'.$this->grid_id); $item_skin->set_lightbox_rel('ess-'.$post['ID']); } $post_media_source_data = $base->get_post_media_source_data($post['ID'], $post_media_source_type); $post_video_ratios = $m->get_post_video_ratios($post['ID']); $filters = array(); //$categories = get_the_category($post['ID']); $categories = $base->get_custom_taxonomies_by_post_id($post['ID']); //$tags = wp_get_post_terms($post['ID']); $tags = get_the_tags($post['ID']); if(!empty($categories)){ foreach($categories as $key => $category){ $filters[$category->term_id] = array('name' => $category->name, 'slug' => sanitize_key($category->slug), 'parent' => $category->parent); } } if(!empty($tags)){ foreach($tags as $key => $taxonomie){ $filters[$taxonomie->term_id] = array('name' => $taxonomie->name, 'slug' => sanitize_key($taxonomie->slug), 'parent' => '0'); } } foreach($this->grid_params as $gp_handle => $gp_values){ if(strpos($gp_handle, 'filter-selected') !== 0) continue; $filter_meta_selected = $base->getVar($this->grid 0 1 148308752 7572 0 0 /fr/search/holiday_type.leisure/facility_g.dishwasher/holiday_type.castle/facility_g.independent-kitchen/order_by.no_bedrooms,asc 0 1 8589940736 7717 0 0 /it/search/facility_i.internet/facility_i.washing-machine/facility_i.single-level-no-stairs 0 1 7798310843048722432 7275 0 0 /fr/search/facility_i.washing-machine/facility_o.outdoor-grill/facility_o.private-garden/facility_o.hot-tub/order_by.views,asc 0 1 8589940736 7415 0 0 /search/holiday_type.leisure/utility.private-owner/holiday_type.cities-of-art/holiday_type.for-couples/holiday_type.countryside/order_by.price,asc 0 1 0 7276 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_i.fireplace/facility_i.washing-machine/facility_i.internet/facility_o.private-garden 0 1 0 7422 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.eco-tourism/holiday_type.lakeside-and-rivers/facility_g.dishwasher 0 1 0 7817 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.low-cost/holiday_type.luxury/holiday_type.lakeside-and-rivers 0 1 0 7238 0 0 /search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.religious-tourism/holiday_type.apartment/view.list 0 1 0 7228 0 0 /fr/search/europe/holiday_type.leisure/holiday_type.penthouse/holiday_type.metropolises 0 1 0 7569 0 0 /fr/search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.cities-of-art/utility.private-owner 0 1 0 7585 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.cities-of-art/holiday_type.metropolises/holiday_type.detached-house/holiday_type.low-cost 0 1 0 7315 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.luxury/holiday_type.eco-tourism/holiday_type.bedroom/holiday_type.cities-of-art 0 1 0 7270 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.sailing-sports/holiday_type.apartment/holiday_type.luxury/facility_i.internet 0 1 0 7437 0 0 /search/facility_i.washing-machine/facility_o.outdoor-grill/suitability.pets/facility_i.elevator/facility_o.private-garden/order_by.views,desc 0 1 0 7067 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.detached-house/holiday_type.religious-tourism/order_by.no_bedrooms,asc 0 1 0 7429 0 0 /fr/search/holiday_type.leisure/facility_i.washing-machine/facility_o.outdoor-grill/facility_o.hot-tub/holiday_type.golf-courses 0 1 0 7808 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.for-couples/holiday_type.apartment/holiday_type.golf-courses 0 1 0 7398 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.luxury/holiday_type.religious-tourism 0 1 0 7530 0 0 /search/europe/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.apartment/holiday_type.penthouse 0 1 0 7435 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.sailing-sports/holiday_type.metropolises 0 1 0 7528 0 0 /fr/search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.sailing-sports/holiday_type.countryside 0 1 0 7551 0 0 /fr/search/holiday_type.houses-with-pools/facility_g.dishwasher/suitability.pets/holiday_type.mountain 0 1 0 7659 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.sea-and-surf/holiday_type.apartment/holiday_type.religious-tourism 0 1 0 7400 0 0 /search/holiday_type.leisure/utility.private-owner/holiday_type.religious-tourism/order_by.price,desc 0 3 0 21624 0 0 /rss/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.mountain/holiday_type.castle/ 0 1 0 1075 1 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.lakeside-and-rivers/facility_i.internet/order_by.total_square,desc 0 1 0 7353 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.sea-and-surf/holiday_type.lakeside-and-rivers/facility_i.elevator 0 1 0 7403 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.for-couples/holiday_type.penthouse/facility_i.washing-machine 0 1 0 7390 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.mountain/facility_o.hot-tub/facility_i.heating 0 1 0 7388 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.sea-and-surf/holiday_type.religious-tourism/holiday_type.bedroom 0 1 0 7405 0 0 /it/search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.golf-courses/holiday_type.for-couples 0 1 0 7621 0 0 /it/search/facility_i.internet/facility_o.outdoor-grill/facility_o.private-garden/facility_g.independent-kitchen 0 1 0 7307 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.mountain/facility_i.washing-machine/holiday_type.lakeside-and-rivers 0 1 0 7408 0 0 /rss/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.hot-tub/holiday_type.religious-tourism/ 0 1 0 1075 1 1 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.countryside/holiday_type.religious-tourism/holiday_type.cities-of-art 0 1 0 7252 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.metropolises/holiday_type.cities-of-art/holiday_type.eco-tourism 0 1 0 7408 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.sailing-sports/holiday_type.luxury/utility.private-owner 0 1 0 7275 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.eco-tourism/holiday_type.lakeside-and-rivers/facility_g.dishwasher 0 1 0 7414 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.countryside/holiday_type.eco-tourism/holiday_type.low-cost 0 2 0 14540 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.luxury/holiday_type.countryside/order_by.no_bedrooms,desc 0 1 0 7202 0 0 /search/holiday_type.leisure/facility_i.single-level-no-stairs/facility_o.outdoor-grill/facility_i.elevator/holiday_type.sea-and-surf 0 1 0 7402 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.mountain/holiday_type.for-couples 0 1 0 7348 0 0 /es/search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.eco-tourism/holiday_type.cities-of-art 0 1 0 7742 0 0 /search/holiday_type.houses-with-pools/facility_i.fireplace/facility_o.outdoor-grill/facility_i.washing-machine/facility_i.internet 0 1 0 7383 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.detached-house/holiday_type.castle 0 1 0 7454 0 0 /search/facility_i.washing-machine/facility_o.outdoor-grill/facility_i.internet/facility_o.private-garden/facility_i.heating 0 1 0 7080 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.heating/holiday_type.leisure/suitability.pets 0 1 0 7349 0 0 /fr/search/facility_g.independent-kitchen/facility_i.elevator/facility_o.outdoor-grill/suitability.pets 0 1 0 7352 0 0 /fr/search/facility_o.outdoor-grill/facility_o.private-garden/facility_i.heating 0 1 0 7349 0 0 /de/search/facility_i.elevator/facility_o.private-garden/facility_o.hot-tub/order_by.total_square,desc 0 1 0 7314 0 0 /search/holiday_type.leisure/facility_g.independent-kitchen/facility_o.outdoor-grill/suitability.pets/order_by.views,asc 0 1 0 7329 0 0 /search/utility.private-owner/facility_g.dishwasher/facility_i.fireplace/facility_g.independent-kitchen/order_by.no_bathrooms,asc 0 1 0 7062 0 0 /search/utility.private-owner/facility_i.air-conditioning/facility_i.single-level-no-stairs/facility_i.heating/order_by.no_bathrooms,asc 0 1 0 7086 0 0 /search/utility.private-owner/facility_g.dishwasher/facility_o.outdoor-grill/facility_o.private-garden/facility_i.elevator 0 2 0 14198 0 0 /search/holiday_type.leisure/facility_i.heating/facility_o.private-garden/suitability.pets/view.list 0 1 0 7319 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_g.dishwasher/holiday_type.metropolises/holiday_type.golf-courses 0 3 0 22257 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.bedroom/holiday_type.penthouse/order_by.no_bedrooms,desc 0 1 0 7220 0 0 /search/holiday_type.leisure/facility_i.elevator/facility_o.outdoor-grill/suitability.pets/holiday_type.mountain 0 1 0 7346 0 0 /search/facility_g.dishwasher/facility_i.elevator/facility_o.private-garden/facility_i.single-level-no-stairs/order_by.featured,desc 0 1 0 7062 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/holiday_type.cities-of-art/facility_i.washing-machine/facility_o.outdoor-grill/holiday_type.low-cost 0 1 0 7650 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_o.hot-tub/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.apartment/holiday_type.bedroom 0 1 0 7508 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.washing-machine/facility_o.private-garden/holiday_type.low-cost/facility_i.air-conditioning/facility_i.internet/facility_o.hot-tub/facility_i.fireplace 0 1 0 7669 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.leisure 0 1 0 7486 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/suitability.pets/facility_g.dishwasher 0 4 0 29312 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_o.outdoor-grill/holiday_type.castle/holiday_type.bedroom 0 2 0 14754 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.penthouse/utility.private-owner 0 7 0 51527 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.penthouse/order_by.no_bedrooms,desc 0 6 0 43926 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.cities-of-art/holiday_type.penthouse/order_by.price,desc 0 1 0 7223 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/suitability.pets/holiday_type.leisure/order_by.total_square,asc 0 1 0 7223 0 0 /search/holiday_type.leisure/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.low-cost/order_by.no_bathrooms,desc 0 1 0 7223 0 0 /es/search/holiday_type.leisure/facility_o.outdoor-grill/holiday_type.apartment/holiday_type.penthouse/facility_o.private-garden/order_by.no_bathrooms,asc 0 1 0 7783 0 0 /search/holiday_type.leisure/facility_i.washing-machine/holiday_type.bedroom/holiday_type.metropolises/order_by.no_bathrooms,asc 0 1 0 7352 0 0 /fr/search/europe/facility_i.air-conditioning/suitability.pets/order_by.no_bathrooms,desc 0 1 0 7348 0 0 /es/search/utility.private-owner/facility_i.air-conditioning/utility.property-manager/facility_o.private-garden 0 2 0 14852 0 0 /search/europe/holiday_type.leisure/holiday_type.metropolises/order_by.views,asc 0 5 0 36210 0 0 /search/europe/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.eco-tourism/holiday_type.low-cost 0 2 0 14862 0 0 /rss/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.religious-tourism/ 0 2 0 2150 1 1 /es/search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.luxury/holiday_type.apartment 0 1 0 7543 0 0 /it/search/europe/facility_g.independent-kitchen/facility_i.air-conditioning/order_by.total_square,asc 0 1 0 7220 0 0 /it/search/holiday_type.leisure/facility_o.private-garden/holiday_type.penthouse/order_by.price,asc 0 1 0 7552 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_i.air-conditioning/holiday_type.metropolises/holiday_type.luxury 0 1 0 7401 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.private-garden/holiday_type.golf-courses/order_by.price,asc 0 1 0 7364 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.mountain/order_by.no_bathrooms,asc 0 1 0 7330 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.leisure/holiday_type.golf-courses/holiday_type.metropolises 0 1 0 7398 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.luxury/holiday_type.detached-house/holiday_type.bedroom 0 1 0 7240 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.for-couples/holiday_type.luxury/view.list 0 1 0 7221 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.metropolises/holiday_type.detached-house/holiday_type.leisure 0 2 0 14448 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.apartment/holiday_type.golf-courses/holiday_type.castle 0 1 0 7245 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.apartment/holiday_type.leisure/order_by.total_square,desc 0 1 0 7202 0 0 /fr/search/holiday_type.houses-with-pools/facility_i.air-conditioning/suitability.pets/view.map 0 1 0 7229 0 0 /search/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/holiday_type.countryside/facility_o.hot-tub 0 1 0 7393 0 0 /search/holiday_type.leisure/utility.private-owner/facility_i.air-conditioning/holiday_type.penthouse/holiday_type.for-couples 0 1 0 7398 0 0 /search/holiday_type.leisure/suitability.pets/holiday_type.religious-tourism/holiday_type.metropolises/order_by.total_square,desc 0 2 0 14414 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.detached-house/holiday_type.apartment/holiday_type.bedroom 0 1 0 7380 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.religious-tourism/holiday_type.lakeside-and-rivers/facility_i.air-conditioning 0 1 0 7394 0 0 /search/holiday_type.leisure/facility_g.dishwasher/holiday_type.luxury/holiday_type.low-cost/order_by.price,asc 0 1 0 7346 0 0 /search/europe/holiday_type.houses-with-pools/facility_o.outdoor-grill/member.9/holiday_type.religious-tourism/facility_i.single-level-no-stairs 0 1 0 7533 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.penthouse/holiday_type.apartment/holiday_type.sailing-sports 0 1 0 7247 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.detached-house/utility.private-owner 0 1 0 7594 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.apartment/holiday_type.countryside/holiday_type.low-cost 0 1 0 7243 0 0 /de/search/holiday_type.houses-with-pools/holiday_type.cities-of-art/holiday_type.metropolises/holiday_type.sailing-sports 0 1 0 7533 0 0 /it/search/facility_i.internet/facility_o.private-garden/facility_o.outdoor-grill/order_by.no_bathrooms,asc 0 1 0 7273 0 0 /it/search/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_i.internet/holiday_type.for-couples 0 1 0 7604 0 0 /search/holiday_type.houses-with-pools/facility_i.internet/facility_o.private-garden/facility_i.single-level-no-stairs/holiday_type.luxury 0 1 0 7412 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.cities-of-art/holiday_type.metropolises/order_by.no_bathrooms,asc 0 1 0 7360 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.sailing-sports/order_by.total_square,asc 0 1 0 7356 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.castle/holiday_type.luxury 0 1 0 7551 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.golf-courses/holiday_type.leisure/holiday_type.for-couples 0 1 0 7250 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.castle/holiday_type.leisure/holiday_type.cities-of-art 0 1 0 7244 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_i.air-conditioning/holiday_type.mountain/order_by.price,asc 0 1 0 7354 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_g.dishwasher/facility_i.elevator/holiday_type.sailing-sports/order_by.no_bedrooms,desc 0 1 0 7473 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_o.outdoor-grill/holiday_type.mountain/facility_g.independent-kitchen/holiday_type.penthouse 0 1 0 7441 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.washing-machine/holiday_type.metropolises/holiday_type.religious-tourism/holiday_type.cities-of-art 0 1 0 7488 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_i.washing-machine/suitability.pets/holiday_type.metropolises/holiday_type.penthouse/holiday_type.for-couples/holiday_type.low-cost 0 1 0 7622 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/utility.private-owner/facility_i.washing-machine/holiday_type.metropolises/holiday_type.apartment/holiday_type.sailing-sports/holiday_type.castle 0 1 0 7662 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.air-conditioning/holiday_type.cities-of-art/holiday_type.eco-tourism/facility_i.single-level-no-stairs/order_by.total_square,desc 0 1 0 7581 0 0 /search/europe/spain/balearic-islands/holiday_type.leisure/facility_i.washing-machine/facility_o.private-garden/holiday_type.penthouse/holiday_type.sailing-sports/facility_i.fireplace/facility_o.hot-tub/facility_i.heating 0 1 0 7668 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.eco-tourism/holiday_type.apartment/holiday_type.metropolises/holiday_type.bedroom 0 1 0 7250 0 0 /search/holiday_type.houses-with-pools/holiday_type.leisure/holiday_type.lakeside-and-rivers/holiday_type.sailing-sports/holiday_type.mountain/holiday_type.metropolises 0 1 0 7309 0 0 /search/europe/spain/balearic-islands/ibiza/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.metropolises/holiday_type.countryside/holiday_type.sea-and-surf/holiday_type.penthouse 0 1 0 7583 0 0 /search/europe/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.eco-tourism/holiday_type.golf-courses/order_by.views,desc 0 1 0 7456 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.luxury/order_by.total_square,asc 0 1 0 7256 0 0 /search/holiday_type.leisure/facility_o.private-garden/holiday_type.penthouse/holiday_type.eco-tourism/holiday_type.for-couples/view.list 0 1 0 7391 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.sea-and-surf/holiday_type.cities-of-art/holiday_type.bedroom/holiday_type.lakeside-and-rivers 0 1 0 7341 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.countryside/holiday_type.leisure/holiday_type.apartment 0 1 0 7246 0 0 /search/europe/facility_i.single-level-no-stairs/facility_o.private-garden/facility_i.elevator/order_by.total_square,desc 0 2 0 14250 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.countryside/holiday_type.sea-and-surf/order_by.no_bathrooms,desc 0 1 0 7234 0 0 /fr/search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.luxury/holiday_type.apartment/facility_i.air-conditioning 0 1 2422285057281425408 7789 0 0 /fr/search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.for-couples/facility_i.heating/suitability.pets 0 1 8589940736 7717 0 0 /it/search/holiday_type.leisure/facility_i.washing-machine/suitability.pets/holiday_type.countryside/order_by.price,desc 0 1 8589940736 7554 0 0 /search/facility_g.dishwasher/facility_i.elevator/facility_o.outdoor-grill/facility_i.heating/facility_i.fireplace/facility_i.air-conditioning 0 1 162824432 7106 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.heating/holiday_type.bedroom/holiday_type.countryside/order_by.price,asc 0 1 162195984 7393 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.air-conditioning/holiday_type.leisure/holiday_type.sailing-sports/facility_g.independent-kitchen/facility_i.washing-machine 0 1 15083745678343471104 7494 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.metropolises/holiday_type.sea-and-surf/holiday_type.lakeside-and-rivers/holiday_type.sailing-sports 0 1 8589940736 7486 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/holiday_type.golf-courses/holiday_type.luxury/holiday_type.detached-house 0 1 8589940736 7267 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_o.outdoor-grill/holiday_type.religious-tourism/holiday_type.bedroom/facility_o.private-garden/order_by.no_bathrooms,asc 0 1 15083745678343471104 7502 0 0 /search/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/holiday_type.detached-house/holiday_type.religious-tourism/facility_i.single-level-no-stairs 0 1 8589940736 7500 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.religious-tourism/holiday_type.luxury/holiday_type.detached-house/facility_i.fireplace/facility_i.elevator 0 1 15083745678343471104 7516 0 0 /search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.countryside/holiday_type.detached-house/holiday_type.cities-of-art/holiday_type.low-cost 0 1 0 7309 0 0 /search/holiday_type.houses-with-pools/holiday_type.cities-of-art/holiday_type.sailing-sports/holiday_type.eco-tourism/holiday_type.apartment 0 1 156088752 7251 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_o.private-garden/holiday_type.apartment/holiday_type.for-couples/holiday_type.leisure/order_by.total_square,asc 0 1 8589940736 7471 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_i.air-conditioning/holiday_type.cities-of-art/holiday_type.religious-tourism/holiday_type.mountain/holiday_type.low-cost 0 1 15083745678343471104 7538 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_o.private-garden/holiday_type.apartment/holiday_type.for-couples/holiday_type.metropolises/order_by.price,asc 0 1 8589940736 7484 0 0 /search/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/holiday_type.religious-tourism/facility_i.fireplace/holiday_type.eco-tourism 0 1 0 7470 0 0 /search/holiday_type.leisure/utility.private-owner/facility_i.air-conditioning/facility_o.hot-tub/holiday_type.cities-of-art/holiday_type.apartment 0 1 2422285057281425408 7452 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.metropolises/holiday_type.castle/holiday_type.lakeside-and-rivers/facility_i.heating 0 1 0 7468 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.cities-of-art/holiday_type.penthouse/holiday_type.metropolises/order_by.no_bedrooms,desc 0 1 0 7396 0 0 /search/europe/facility_g.dishwasher/facility_i.air-conditioning/facility_i.heating/order_by.views,asc 0 1 7798310843048722432 7115 0 0 /it/search/holiday_type.houses-with-pools/suitability.pets/holiday_type.penthouse/holiday_type.sailing-sports/holiday_type.luxury 0 1 146698336 7452 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_o.outdoor-grill/holiday_type.castle/holiday_type.low-cost/order_by.total_square,desc 0 1 0 7390 0 0 /search/holiday_type.leisure/facility_o.private-garden/suitability.pets/holiday_type.for-couples/holiday_type.sailing-sports/order_by.ctime,desc 0 1 0 7359 0 0 /search/holiday_type.leisure/facility_i.washing-machine/holiday_type.metropolises/holiday_type.countryside/order_by.no_bedrooms,asc 0 1 0 7355 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.countryside/facility_i.heating/utility.private-owner 0 1 0 7410 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.eco-tourism/holiday_type.sailing-sports/facility_g.dishwasher 0 1 0 7410 0 0 /fr/search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.castle/holiday_type.leisure 0 1 0 7708 0 0 /search/holiday_type.houses-with-pools/holiday_type.lakeside-and-rivers/holiday_type.religious-tourism/holiday_type.cities-of-art/holiday_type.countryside 0 1 0 7255 0 0 /it/search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.mountain/order_by.no_bedrooms,asc 0 1 0 7417 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_i.single-level-no-stairs/holiday_type.golf-courses/holiday_type.penthouse/holiday_type.sailing-sports 0 1 0 7456 0 0 /search/holiday_type.houses-with-pools/facility_i.single-level-no-stairs/facility_o.outdoor-grill/holiday_type.golf-courses/holiday_type.castle/holiday_type.metropolises 0 1 0 7490 0 0 /search/holiday_type.houses-with-pools/holiday_type.countryside/holiday_type.for-couples/holiday_type.lakeside-and-rivers/holiday_type.Var($post, 'dislikes'); break; case 'retweets': $sorts['retweets'] = $base->getVar($post, 'retweets'); break; case 'favorites': $sorts['favorites'] = $base->getVar($post, 'favorites'); break; case 'itemCount': $sorts['itemCount'] = $base->getVar($post, 'itemCount'); break; case 'duration': $sorts['duration'] = $base->getVar($post, 'duration'); break; default: //check if meta. If yes, add meta values if(strpos($order, 'eg-') === 0 || strpos($order, 'egl-') === 0){ $sorts[$order] = $base->getVar($post, $order); } break; } } return apply_filters('essgrid_prepare_sorting_array_by_custom_post', $sorts, $post, $order_by); } public function prepare_sorting_array_by_stream($post, $order_by){ $d = apply_filters('essgrid_prepare_sorting_array_by_stream_pre', array('post' => $post, 'order_by' => $order_by)); $post = $d['post']; $order_by = $d['order_by']; $base = new Essential_Grid_Base(); $link_meta = new Essential_Grid_Meta_Linking(); $meta = new Essential_Grid_Meta(); $m = $meta->get_all_meta(false); $lm = $link_meta->get_all_link_meta(false); $sorts = array(); foreach($order_by as $order){ switch($order){ case 'date': $sorts['date'] = strtotime($base->getVar($post, 'date')); break; case 'title': $sorts['title'] = substr($base->getVar($post, 'title', ''), 0, 10); break; case 'excerpt': $sorts['excerpt'] = substr(strip_tags($base->getVar($post, 'excerpt', '')), 0, 10); break; case 'id': $sorts['id'] = $base->getVar($post, 'post_id'); break; case 'slug': $sorts['slug'] = $base->getVar($post, 'alias'); break; case 'author': $sorts['author'] = $base->getVar($post, 'author_name'); break; case 'last-modified': $sorts['last-modified'] = strtotime($base->getVar($post, 'date_modified')); break; case 'number-of-comments': $sorts['number-of-comments'] = $base->getVar($post, 'num_comments'); break; case 'random': $sorts['random'] = rand(0,9999); break; case 'views': $sorts['views'] = $base->getVar($post, 'views'); break; default: //check if meta. If yes, add meta values if(strpos($order, 'eg-') === 0 || strpos($order, 'egl-') === 0){ $sorts[$order] = $base->getVar($post, $order); } break; } } return apply_filters('essgrid_prepare_sorting_array_by_stream_post', $sorts, $post, $order_by); } public function output_wrapper_pre($grid_preview = false){ global $esg_grid_serial; $base = new Essential_Grid_Base(); $esg_grid_serial++; if($this->grid_div_name === null) $this->grid_div_name = $this->grid_id; $grid_id = ($grid_preview !== false) ? 'esg-preview-grid' : 'esg-grid-'.$this->grid_div_name.'-'.$esg_grid_serial; $grid_id_wrap = $grid_id . '-wrap'; $article_id = ($grid_preview !== false) ? ' esg-preview-skinlevel' : ''; $hide_markup_before_load = $base->getVar($this->grid_params, 'hide-markup-before-load', 'off'); $background_color = $base->getVar($this->grid_params, 'main-background-color', 'transparent'); $navigation_skin = $base->getVar($this->grid_params, 'navigation-skin', 'minimal-light'); $paddings = $base->getVar($this->grid_params, 'grid-padding', 0); $css_id = $base->getVar($this->grid_params, 'css-id', ''); $source_type = $base->getVar($this->grid_postparams, 'source-type', 'post'); $pad_style = ''; if(is_array($paddings) && !empty($paddings)){ $pad_style = 'padding: '; foreach($paddings as $size){ $pad_style .= $size.'px '; } $pad_style .= ';'; $pad_style .= ' box-sizing:border-box;'; $pad_style .= ' -moz-box-sizing:border-box;'; $pad_style .= ' -webkit-box-sizing:border-box;'; } $div_style = ' style="'; $div_style.= 'background-color: '.$background_color.';'; $div_style.= $pad_style;religious-tourism 0 1 0 7250 0 0 /search/holiday_type.houses-with-pools/facility_i.elevator/facility_o.private-garden/holiday_type.sea-and-surf/holiday_type.golf-courses/facility_g.independent-kitchen 0 1 0 7491 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.leisure/holiday_type.detached-house/order_by.no_bedrooms,asc 0 1 0 7357 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/facility_i.heating/holiday_type.for-couples/facility_i.washing-machine/facility_o.outdoor-grill 0 1 0 7445 0 0 /search/holiday_type.houses-with-pools/facility_i.washing-machine/holiday_type.metropolises/holiday_type.bedroom/facility_i.single-level-no-stairs/holiday_type.golf-courses 0 1 0 7496 0 0 /it/search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.leisure/holiday_type.countryside/order_by.total_square,asc 0 1 0 7612 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/suitability.pets/facility_i.elevator/holiday_type.sailing-sports 0 1 0 7355 0 0 /search/holiday_type.leisure/facility_o.private-garden/holiday_type.golf-courses/facility_o.hot-tub/view.list 0 1 0 7348 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.eco-tourism/holiday_type.for-couples/facility_i.washing-machine 0 1 0 7411 0 0 /search/utility.private-owner/facility_i.internet/facility_o.private-garden/facility_i.fireplace/order_by.featured,desc 0 1 0 7064 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.mountain/holiday_type.bedroom/order_by.views,asc 0 1 0 7228 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.religious-tourism/holiday_type.bedroom/view.map 0 1 0 6842 0 0 /search/facility_o.private-garden/facility_i.heating/facility_i.internet 0 1 0 7032 0 0 /search/holiday_type.houses-with-pools/holiday_type.castle/holiday_type.metropolises/holiday_type.sailing-sports/holiday_type.luxury 0 1 0 7244 0 0 /search/facility_i.single-level-no-stairs/facility_o.outdoor-grill/facility_i.washing-machine/facility_i.air-conditioning/facility_o.private-garden 0 1 0 7094 0 0 /search/europe/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_i.internet/order_by.no_bedrooms,desc 0 1 0 7407 0 0 /search/holiday_type.houses-with-pools/facility_g.dishwasher/suitability.pets/holiday_type.mountain/order_by.no_bathrooms,asc 0 1 0 7334 0 0 /search/holiday_type.houses-with-pools/holiday_type.for-couples/holiday_type.mountain/holiday_type.lakeside-and-rivers/order_by.price,desc 0 2 0 14458 0 0 /es/search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.luxury/order_by.price,desc 0 1 0 7657 0 0 /search/holiday_type.houses-with-pools/facility_g.independent-kitchen/facility_i.internet/facility_o.outdoor-grill/holiday_type.low-cost 0 1 0 7387 0 0 /search/holiday_type.houses-with-pools/facility_i.air-conditioning/holiday_type.lakeside-and-rivers/holiday_type.metropolises/holiday_type.penthouse 0 1 0 7405 0 0 /search/facility_i.air-conditioning/facility_o.hot-tub/facility_i.heating/facility_i.internet/order_by.no_bathrooms,desc 0 1 0 7057 0 0 /search/holiday_type.houses-with-pools/utility.private-owner/facility_o.outdoor-grill/holiday_type.cities-of-art/facility_o.hot-tub 0 1 0 7403 0 0 /search/holiday_type.leisure/facility_g.dishwasher/facility_i.elevator/holiday_type.low-cost/facility_i.washing-machine 0 1 0 7359 0 0 /it/search/facility_g.independent-kitchen/facility_i.single-level-no-stairs/facility_o.outdoor-grill/facility_i.heating 0 1 0 7323 0 0 /search/holiday_type.houses-with-pools/holiday_type.cities-of-art/holiday_type.lakeside-and-rivers/holiday_type.sea-and-surf/holiday_type.golf-courses 0 1 0 7249 0 0 /search/facility_g.dishwasher/facility_i.internet/facility_i.washing-machine/facility_i.elevator/view.list 0 1 0 7050 0 0 /search/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.apartment/holiday_type.eco-tourism/holiday_type.penthouse 0 1 0 7251 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.sea-and-surf/holiday_type.luxury/order_by.total_square,desc 0 1 0 7228 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.countryside/holiday_type.luxury 0 5 0 36095 0 0 /search/holiday_type.houses-with-pools/holiday_type.religious-tourism/holiday_type.penthouse/holiday_type.sea-and-surf/holiday_type.cities-of-art 0 1 0 7251 0 0 /search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.metropolises/holiday_type.luxury/order_by.no_bathrooms,desc 0 1 0 7229 0 0 /rss/holiday_type.houses-with-pools/holiday_type.metropolises/holiday_type.religious-tourism/holiday_type.eco-tourism/ 0 1 0 1075 0 0 /de/search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.bedroom/facility_g.dishwasher 0 1 0 7687 0 0 /es/affitto-in-pratica 0 2 0 11650 0 0 /search/holiday_type.leisure/facility_i.elevator/facility_o.outdoor-grill/holiday_type.penthouse/holiday_type.luxury 0 1 0 7360 0 0 /es/search/utility.private-owner/utility.property-manager/suitability.pets 0 1 0 7178 0 0 /search/holiday_type.houses-with-pools/holiday_type.sailing-sports/holiday_type.penthouse/holiday_type.sea-and-surf/order_by.views,desc 0 1 0 7227 0 0 /search/holiday_type.houses-with-pools/holiday_type.low-cost/holiday_type.countryside/holiday_type.metropolises/holiday_type.lakeside-and-rivers 0 1 0 7249 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.for-couples/holiday_type.apartment/order_by.no_bathrooms,desc 0 1 0 7226 0 0 /es/search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.castle/holiday_type.low-cost 0 1 0 7550 0 0 /it/search/holiday_type.houses-with-pools/facility_g.dishwasher/holiday_type.sailing-sports/order_by.views,desc 0 1 0 7557 0 0 /search/holiday_type.houses-with-pools/holiday_type.golf-courses/holiday_type.cities-of-art/holiday_type.low-cost/order_by.no_bedrooms,asc 0 2 0 14454 0 0 /search/holiday_type.houses-with-pools/holiday_type.sea-and-surf/holiday_type.bedroom/holiday_type.castle 0 7 0 50470 0 0 /search/holiday_type.houses-with-pools/holiday_type.eco-tourism/holiday_type.sea-and-surf/holiday_type.for-couples/order_by.total_square,asc 0 1 0 7230 0 0 /search/holiday_type.leisure/facility_i.air-conditioning/holiday_type.luxury/holiday_type.mountain/order_by.total_square,desc 0 1 0 7351 0 0 /search/holiday_type.houses-with-pools/facility_i.fireplace/facility_o.outdoor-grill/holiday_type.countryside/view.list 0 3 0 22044 0 0 /search/holiday_type.leisure/facility_i.washing-machine/facility_o.outdoor-grill/holiday_type.religious-tourism/facility_o.hot-tub 0 1 0 7389 0 0 /search/holiday_type.leisure/utility.private-owner/holiday_type.cities-of-art/holiday_type.mountain/holiday_type.for-couples 0 1 0 7262 0 0 /fr/search/holiday_type.leisure/facility_g.dishwasher/holiday_type.golf-courses/holiday_type.lakeside-and-rivers/holiday_type.eco-tourism/holiday_type.sea-and-surf 0 1 0 7853 0 0 /de/search/facility_i.washing-machine/facility_o.outdoor-grill/facility_i.single-level-no-stairs 0 1 0 7332 0 0 /search/facility_o.outdoor-grill/facility_o.hot-tub/facility_o.private-garden/view.list 0 8 0 56112 0 0 /search/europe/utility.private-owner/facility_o.private-garden/suitability.pets 0 4 0 28452 0 0 /search/holiday_type.houses-with-pools/facility_o.private-garden/suitability.pets/holiday_type.for-couples/facility_g.independent-kitchen 0 2 0 14754 0 0 /search/holiday_type.houses-with-pools/facility_o.outdoor-grill/holiday_type.lakeside-and-rivers/facility_o.private-garden/facility_i.washing-machine 0 2 0 14816 0 0 /search/holiday_type.houses-with-pools/suitability.pets/holiday_type.leisure/holiday_type.cities-of-art/holiday_type.mountain 0 1 0 7223 0 0 /it/search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_o.private-garden/holiday_type.cities-of-art/holiday_type.religious-tourism/holiday_type.bedroom/facility_o.outdoor-grill 0 1 0 7805 0 0 /search/europe/spain/balearic-islands/holiday_type.houses-with-pools/facility_i.air-conditioning/facility_o.private-garden/holiday_type.cities-of-art/holiday_type.bedroom/holiday_type.lakeside-and-rivers 0this->grid_params, 'rtl', 'off'); $media_filter_type = $base->getVar($this->grid_postparams, 'media-filter-type', 'none'); $wait_for_fonts = get_option('tp_eg_wait_for_fonts', 'true'); $pagination_numbers = $base->getVar($this->grid_params, 'pagination-numbers', 'smart'); $pagination_scroll = $base->getVar($this->grid_params, 'pagination-scroll', 'off'); $pagination_scroll_offset = $base->getVar($this->grid_params, 'pagination-scroll-offset', '0', 'i'); $ajax_callback = $base->getVar($this->grid_params, 'ajax-callback', ''); $ajax_css_url = $base->getVar($this->grid_params, 'ajax-css-url', ''); $ajax_js_url = $base->getVar($this->grid_params, 'ajax-js-url', ''); $ajax_scroll_onload = $base->getVar($this->grid_params, 'ajax-scroll-onload', 'on'); $ajax_callback_argument = $base->getVar($this->grid_params, 'ajax-callback-arg', 'on'); $ajax_content_id = $base->getVar($this->grid_params, 'ajax-container-id', ''); $ajax_scrollto_offset = $base->getVar($this->grid_params, 'ajax-scrollto-offset', '0'); $ajax_close_button = $base->getVar($this->grid_params, 'ajax-close-button', 'off'); $ajax_button_nav = $base->getVar($this->grid_params, 'ajax-nav-button', 'off'); $ajax_content_sliding = $base->getVar($this->grid_params, 'ajax-content-sliding', 'on'); $ajax_button_type = $base->getVar($this->grid_params, 'ajax-button-type', 'button'); if($ajax_button_type == 'type2'){ $ajax_button_text = $base->getVar($this->grid_params, 'ajax-button-text', __('Close', EG_TEXTDOMAIN)); } $ajax_button_skin = $base->getVar($this->grid_params, 'ajax-button-skin', 'light'); $ajax_button_inner = $base->getVar($this->grid_params, 'ajax-button-inner', 'false'); $ajax_button_h_pos = $base->getVar($this->grid_params, 'ajax-button-h-pos', 'r'); $ajax_button_v_pos = $base->getVar($this->grid_params, 'ajax-button-v-pos', 't'); $cobbles_pattern = $base->getVar($this->grid_params, 'cobbles-pattern', array()); $use_cobbles_pattern = $base->getVar($this->grid_params, 'use-cobbles-pattern', 'off'); $cookie_time = intval($base->getVar($this->grid_params, 'cookie-save-time', '30')); $cookie_search = $base->getVar($this->grid_params, 'cookie-save-search', 'off'); $cookie_filter = $base->getVar($this->grid_params, 'cookie-save-filter', 'off'); $cookie_pagination = $base->getVar($this->grid_params, 'cookie-save-pagination', 'off'); $js_to_footer = (get_option('tp_eg_js_to_footer', 'false') == 'true') ? true : false; //add inline style into the footer if($js_to_footer && $is_demo == false){ ob_start(); } echo '