Changeset 1491650
- Timestamp:
- 09/07/2016 09:38:12 AM (10 years ago)
- Location:
- zibbra/trunk
- Files:
-
- 10 added
- 7 edited
-
core/controller.php (modified) (4 diffs)
-
css/widget_filters.css (added)
-
jscripts/widget_category.js (added)
-
modules/abstract.php (modified) (1 diff)
-
modules/search.php (added)
-
readme.txt (modified) (2 diffs)
-
tags/templates.php (modified) (1 diff)
-
tags/widgets.php (modified) (1 diff)
-
templates/catalog-filters.php (modified) (3 diffs)
-
templates/search.php (added)
-
templates/widget-category.php (added)
-
templates/widget-filters.php (added)
-
widgets/category-form.php (added)
-
widgets/category.php (added)
-
widgets/filters-form.php (added)
-
widgets/filters.php (added)
-
zibbra.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zibbra/trunk/core/controller.php
r1474412 r1491650 119 119 add_action("wp_head", array($this, "register_ga")); 120 120 add_action("wp_head", array($this, "register_fb")); 121 add_action("pre_get_posts", array($this, "pre_get_posts")); 121 122 122 123 // Register filters … … 334 335 335 336 } // end function 337 338 public function pre_get_posts(WP_Query $query) { 339 340 // Disable loading of any posts when in Zibbra pages 341 342 if(!is_admin() && $query->is_main_query()) { 343 344 $query->query_vars['cat'] = -1; 345 346 } // end if 347 348 // Custom search => set post type to zibbra so our custom module is loaded 349 350 if(!is_admin() && $query->is_main_query() && $query->is_search()) { 351 352 $query->set("type", "zibbra"); 353 354 } // end if 355 356 } // end function 336 357 337 358 public function generate_rewrite_rules(WP_Rewrite $wp_rewrite) { … … 589 610 590 611 return $template; 591 592 // if($wp_query->is_search) {593 //594 // exit("SEARCH: ".$wp_query->query['s']);595 //596 // } // end if597 //598 // return false;599 612 600 613 } // end function … … 608 621 // Get the template slug 609 622 610 $template = rtrim($template, ".php").(!empty($slug) ? "-".$slug : "").".php";623 $template = preg_replace("/\.php$/", "", $template).(!empty($slug) ? "-".$slug : "").".php"; 611 624 612 625 // Check if a custom template exists in the theme folder, if not, load the plugin template file -
zibbra/trunk/modules/abstract.php
r1308807 r1491650 23 23 $module_name = $this->getName(); 24 24 25 add_filter("the_title",function ($old_title) use($title, $module_name) { 25 add_filter("the_title",function ($old_title, $id) use($title, $module_name) { 26 27 if(is_zibbra() && $id==0) { 28 29 return $title; 30 31 } // end if 26 32 27 return $old_title ==$module_name ? $title : $old_title;33 return $old_title; 28 34 29 } ); // end add_filter35 }, 10, 2); // end add_filter 30 36 31 add_filter("wp_title", function ($old_title) use($title , $module_name) {37 add_filter("wp_title", function ($old_title) use($title) { 32 38 33 39 return $title." | ".$old_title; -
zibbra/trunk/readme.txt
r1487906 r1491650 1 1 === Zibbra === 2 Requires at least: 4. 3.12 Requires at least: 4.5.0 3 3 Tested up to: 4.6.0 4 4 Contributors: Zibbra 5 5 Tags: Ecommerce, Cloud 6 Stable tag: 1. 3.66 Stable tag: 1.4.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 51 51 52 52 == Changelog == 53 54 = 1.4.0 = 55 56 * New widgets 57 * Small improvements 58 * Custom search 53 59 54 60 = 1.3.6 = -
zibbra/trunk/tags/templates.php
r1308807 r1491650 72 72 } // end function 73 73 74 function is_zibbra_account() { 75 76 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Account; 77 78 } // end function 79 80 function is_zibbra_brand() { 81 82 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Brand; 83 84 } // end function 85 86 function is_zibbra_cart() { 87 88 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Cart; 89 90 } // end function 91 92 function is_zibbra_catalog() { 93 94 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Catalog; 95 96 } // end function 97 98 function is_zibbra_checkout() { 99 100 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Checkout; 101 102 } // end function 103 104 function is_zibbra_login() { 105 106 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Login; 107 108 } // end function 109 110 function is_zibbra_payment() { 111 112 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Payment; 113 114 } // end function 115 116 function is_zibbra_product() { 117 118 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Product; 119 120 } // end function 121 122 function is_zibbra_register() { 123 124 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Register; 125 126 } // end function 127 128 function is_zibbra_reset() { 129 130 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Reset; 131 132 } // end function 133 134 function is_zibbra_shipping() { 135 136 return Zibbra_Plugin_Controller::getInstance()->getActiveModule() instanceof Zibbra_Plugin_Module_Shipping; 137 138 } // end function 139 74 140 ?> -
zibbra/trunk/tags/widgets.php
r1474412 r1491650 42 42 43 43 } // end function 44 45 ?> -
zibbra/trunk/templates/catalog-filters.php
r1308807 r1491650 7 7 ?> 8 8 <?php foreach($filters as $filter): ?> 9 < div id="<?php echo $filter->getField(); ?>" class="zibbra-filter <?php echo $filter->getType(); ?>">10 < ?php if($filter->getType()==ZProductFilter::TYPE_RANGE && $filter->getMin()!=$filter->getMax()): ?>9 <?php if($filter->getType()==ZProductFilter::TYPE_RANGE && $filter->hasMinMax() && $filter->getMin()!=$filter->getMax()): ?> 10 <div id="<?php echo $filter->getField(); ?>" class="zibbra-filter <?php echo $filter->getType(); ?>"> 11 11 <h3 class="header"><span><?php echo $filter->getName(); ?></span></h3> 12 12 <div class="range"> … … 15 15 <div id="<?php echo $filter->getField(); ?>_range" class="slider noUi-extended" data-prefix="€" data-field="<?php echo $filter->getField(); ?>" data-min="<?php echo floor(round($filter->getMin(),2)); ?>" data-max="<?php echo ceil($filter->getMax()); ?>" data-value-min="<?php echo floor(round($filter->getMin(),2)); ?>" data-value-max="<?php echo ceil($filter->getMax()); ?>"></div> 16 16 </div> 17 <?php endif; ?> 18 <?php if($filter->getType()==ZProductFilter::TYPE_LIST && count($filter->getOptions())>0): ?> 17 </div> 18 <?php endif; ?> 19 <?php if($filter->getType()==ZProductFilter::TYPE_LIST && count($filter->getOptions())>0): ?> 20 <div id="<?php echo $filter->getField(); ?>" class="zibbra-filter <?php echo $filter->getType(); ?>"> 19 21 <h3 class="header"><span><?php echo $filter->getName(); ?></span><div class="icon"></div></h3> 20 22 <div id="<?php echo $filter->getField(); ?>_list" class="list"> … … 25 27 <div class="clearfix"></div> 26 28 </div> 27 < ?php endif; ?>28 < /div>29 </div> 30 <?php endif; ?> 29 31 <?php endforeach; ?> 30 32 <?php if(ZIBBRA_SHOW_STOCK): ?> -
zibbra/trunk/zibbra.php
r1487906 r1491650 6 6 * Plugin URI: http://wordpress.org/plugins/zibbra/ 7 7 * Description: Zibbra integration plugin for Wordpress 8 * Version: 1. 3.68 * Version: 1.4.0 9 9 * Author: Zibbra 10 10 * Author URI: https://www.zibbra.com … … 51 51 require_once(ZIBBRA_BASE_DIR."/modules/register.php"); 52 52 require_once(ZIBBRA_BASE_DIR."/modules/reset.php"); 53 require_once(ZIBBRA_BASE_DIR."/modules/search.php"); 53 54 require_once(ZIBBRA_BASE_DIR."/modules/shipping.php"); 54 55 require_once(ZIBBRA_BASE_DIR."/modules/sitemap.php"); … … 59 60 require_once(ZIBBRA_BASE_DIR."/widgets/minicart.php"); 60 61 require_once(ZIBBRA_BASE_DIR."/widgets/bestsellers.php"); 62 require_once(ZIBBRA_BASE_DIR."/widgets/category.php"); 63 require_once(ZIBBRA_BASE_DIR."/widgets/filters.php"); 61 64 require_once(ZIBBRA_BASE_DIR."/widgets/newsletter.php"); 62 65 require_once(ZIBBRA_BASE_DIR."/widgets/login.php"); … … 81 84 const FORM_ACTION = "zibbra"; 82 85 const ROLE = "customer"; 83 const VERSION = "1. 3.6";86 const VERSION = "1.4.0"; 84 87 85 88 private $controller = null;
Note: See TracChangeset
for help on using the changeset viewer.