self::PANEL_ID, 'title' => __( 'Wishlist', 'brandy' ), ); return $panels; } /** * Returns module configurations * Because this is the main loader, so return panel configurations * * @override */ public static function get_configurations() { $configurations = array( array( 'configuration_type' => 'panel', 'id' => self::PANEL_ID, 'title' => __( 'Wishlist', 'brandy' ), 'description' => '', 'priority' => 10, 'type' => 'brandy_panel', ), ); $configurations[] = array( 'configuration_type' => 'section', 'id' => self::SETTING_ID, 'title' => __( 'Wishlist', 'brandy' ), 'panel' => self::PANEL_ID, 'type' => 'brandy-section', 'description_hidden' => true, ); $configurations[] = array( 'configuration_type' => 'control', 'id' => self::SETTING_ID, 'label' => __( 'Wishlist', 'brandy' ), 'section' => self::SETTING_ID, 'type' => 'brandy_settings', 'input_attrs' => array( 'value' => '', 'style' => 'display:none;', ), 'partial' => false, 'default' => self::get_default_settings(), 'transport' => 'postMessage', ); return $configurations; } public static function get_default_settings() { return array( 'add_to_wishlist_text' => 'Add to wishlist', 'already_in_package_text' => 'This product is already in your wishlist!', 'added_text' => 'Product added!', 'view_wishlist_text' => 'Browse wishlist', 'wishlist_page' => '', 'icon_color' => array( 'normal' => 'var(--wp--preset--color--brandy-secondary-text)', 'hover' => 'var(--wp--preset--color--brandy-primary-text)', 'active' => 'var(--wp--preset--color--brandy-primary-text)', ), 'text_color' => array( 'normal' => 'var(--wp--preset--color--brandy-secondary-text)', 'hover' => 'var(--wp--preset--color--brandy-primary-text)', ), ); } public static function get_settings() { $settings = get_theme_mod( self::SETTING_ID ); return empty( $settings ) ? self::get_default_settings() : $settings; } public static function get_add_to_wishlist_text() { return self::get_settings()['add_to_wishlist_text']; } public static function get_already_in_package_text() { return self::get_settings()['already_in_package_text']; } public static function get_added_text() { return self::get_settings()['added_text']; } public static function get_wishlist_page() { return self::get_settings()['wishlist_page']; } public static function get_view_wishlist_text() { return self::get_settings()['view_wishlist_text']; } public static function print_wishlist_css() { ?>