/** * Get specific layouts from options for shop-related pages * * @since 1.0.0 * @param string $layout layout type. * @return string */ public function shop_page_layouts($layout) { if (is_shop()) { $layout = cherry_wc_options()->get_option('shop-loop-layout', 'no-sidebar'); } elseif (is_product_taxonomy()) { $layout = cherry_wc_options()->get_option('shop-category-layout', 'no-sidebar'); } elseif (is_singular('product')) { $layout = cherry_wc_options()->get_option('shop-single-layout', 'no-sidebar'); } return $layout; }
/** * Prepare account dropdown options * * @since 1.0.0 * @return void */ public function prepare_options() { foreach ($this->account_options as $option_name => $option_val) { $this->account_options[$option_name] = cherry_wc_options()->get_option($option_name, $option_val); } }
$sidebars[$sidebar['id']] = $sidebar['name']; } return $sidebars; } /** * Returns the instance. * * @since 1.0.0 * @return object */ public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; } } /** * Wrapper for Cherry_WC_Options class innstance * * @since 1.0.0 * @return object */ function cherry_wc_options() { return Cherry_WC_Options::get_instance(); } cherry_wc_options(); }