function __construct () { global $Ecart; parent::__construct(); $this->Settings = &$Ecart->Settings; $this->Catalog = &$Ecart->Catalog; $this->Category = &$Ecart->Category; $this->Product = &$Ecart->Product; $pages = $this->Settings->get('pages'); if (!empty($pages)) $this->pages = $pages; Ecart_buyObject::store('search',$this->search); Ecart_buyObject::store('browsing',$this->browsing); Ecart_buyObject::store('breadcrumb',$this->breadcrumb); Ecart_buyObject::store('referrer',$this->referrer); add_action('wp', array(&$this, 'pageid')); add_action('wp', array(&$this, 'security')); add_action('wp', array(&$this, 'cart')); add_action('wp', array(&$this, 'catalog')); add_action('wp', array(&$this, 'shortcodes')); add_action('wp', array(&$this, 'behaviors')); add_filter('the_title', array(&$this,'pagetitle'), 10, 2); // Ecart product text filters add_filter('ecart_product_name','convert_chars'); add_filter('ecart_product_summary','convert_chars'); add_filter('ecart_product_description', 'wptexturize'); add_filter('ecart_product_description', 'convert_chars'); add_filter('ecart_product_description', 'wpautop'); add_filter('ecart_product_description', 'do_shortcode', 11); // AFTER wpautop() add_filter('ecart_product_spec', 'wptexturize'); add_filter('ecart_product_spec', 'convert_chars'); add_filter('ecart_product_spec', 'do_shortcode', 11); // AFTER wpautop() add_filter('ecart_order_lookup','ecartdiv'); add_filter('ecart_order_confirmation','ecartdiv'); add_filter('ecart_errors_page','ecartdiv'); add_filter('ecart_cart_template','ecartdiv'); add_filter('ecart_checkout_page','ecartdiv'); add_filter('ecart_account_template','ecartdiv'); add_filter('ecart_order_receipt','ecartdiv'); add_filter('ecart_account_manager','ecartdiv'); add_filter('ecart_account_vieworder','ecartdiv'); add_filter('aioseop_canonical_url', array(&$this,'canonurls')); add_action('wp_enqueue_scripts', 'ecart_dependencies'); $this->smartcategories(); $this->searching(); $this->account(); }
/** * Setup error system and PHP error capture * * @since 1.0 * * @return void **/ function __construct ($level = ECART_ALL_ERR) { Ecart_buyObject::store('errors',$this->errors); if (defined('WP_DEBUG') && WP_DEBUG) $this->reporting = ECART_DEBUG_ERR; if ($level > $this->reporting) $this->reporting = $level; $this->notifications = new CallbackSubscription(); $types = E_ALL ^ E_NOTICE; if (defined('WP_DEBUG') && WP_DEBUG) $types = E_ALL; // Handle PHP errors if ($this->reporting >= ECART_PHP_ERR) set_error_handler(array($this,'phperror'),$types); }