function __construct()
 {
     if (is_plural_form_active()) {
         $names = get_catalog_names();
         $label = sprintf(__('Related %s', 'ecommerce-product-catalog'), ic_ucfirst($names['plural']));
         $sublabel = sprintf(__('Shows related %s.', 'ecommerce-product-catalog'), ic_lcfirst($names['plural']));
     } else {
         $label = __('Related Catalog Items', 'ecommerce-product-catalog');
         $sublabel = __('Shows related catalog items.', 'ecommerce-product-catalog');
     }
     $widget_ops = array('classname' => 'related_products_widget', 'description' => $sublabel);
     parent::__construct('related_products_widget', $label, $widget_ops);
 }
Beispiel #2
0
 function __construct()
 {
     if (is_plural_form_active()) {
         $names = get_catalog_names();
         $label = sprintf(__('%s Search', 'ecommerce-product-catalog'), ic_ucfirst($names['singular']));
         $sublabel = sprintf(__('A search form for your %s.', 'ecommerce-product-catalog'), ic_lcfirst($names['plural']));
     } else {
         $label = __('Product Search', 'ecommerce-product-catalog');
         $sublabel = __('A search form for your catalog items.', 'ecommerce-product-catalog');
     }
     $widget_ops = array('classname' => 'product_search search widget_search', 'description' => $sublabel);
     parent::__construct('product_search', $label, $widget_ops);
 }
 function __construct()
 {
     if (is_plural_form_active()) {
         $names = get_catalog_names();
         $label = sprintf(__('%s Categories', 'ecommerce-product-catalog'), ic_ucfirst($names['singular']));
         $sublabel = sprintf(__('A list or dropdown of %s categories', 'ecommerce-product-catalog'), ic_lcfirst($names['singular']));
     } else {
         $label = __('Catalog Categories', 'ecommerce-product-catalog');
         $sublabel = __('A list or dropdown of catalog categories', 'ecommerce-product-catalog');
     }
     $widget_ops = array('classname' => 'widget_product_categories widget_categories', 'description' => $sublabel);
     parent::__construct('product_categories', $label, $widget_ops);
 }
Beispiel #4
0
 function __construct()
 {
     if (is_plural_form_active()) {
         $names = get_catalog_names();
         $label = sprintf(__('%s Price Filter', 'ecommerce-product-catalog'), ic_ucfirst($names['singular']));
         $sublabel = sprintf(__('Filter %s by price.', 'ecommerce-product-catalog'), ic_lcfirst($names['plural']));
     } else {
         $label = __('Catalog Price Filter', 'ecommerce-product-catalog');
         $sublabel = __('Filter items by price.', 'ecommerce-product-catalog');
     }
     $widget_ops = array('classname' => 'product_price_filter', 'description' => $sublabel);
     parent::__construct('product_price_filter', $label, $widget_ops);
 }
Beispiel #5
0
function get_product_slug()
{
    $page_id = get_product_listing_id();
    $slug = urldecode(untrailingslashit(get_page_uri($page_id)));
    if (empty($slug)) {
        $settings = get_multiple_settings();
        $slug = ic_lcfirst($settings['catalog_plural']);
    }
    return apply_filters('product_slug', $slug);
}