/**
* Sticky Header - Customizer.
*
* @package Astra Addon
* @since 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! class_exists( 'Astra_Ext_Transparent_Header_Loader' ) ) {
/**
* Customizer Initialization
*
* @since 1.0.0
*/
class Astra_Ext_Transparent_Header_Loader {
/**
* Member Variable
*
* @var instance
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
add_filter( 'astra_theme_defaults', array( $this, 'theme_defaults' ) );
add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) );
add_action( 'customize_register', array( $this, 'customize_register' ), 2 );
}
/**
* Set Options Default Values
*
* @param array $defaults Astra options default value array.
* @return array
*/
public function theme_defaults( $defaults ) {
// Header - Transparent.
$defaults['transparent-header-logo'] = '';
$defaults['transparent-header-retina-logo'] = '';
$defaults['different-transparent-logo'] = 0;
$defaults['different-transparent-retina-logo'] = 0;
$defaults['transparent-header-logo-width'] = array(
'desktop' => 150,
'tablet' => 120,
'mobile' => 100,
);
$defaults['transparent-header-enable'] = 0;
$defaults['transparent-header-disable-archive'] = 1;
$defaults['transparent-header-disable-latest-posts-index'] = 1;
$defaults['transparent-header-on-devices'] = 'both';
$defaults['transparent-header-main-sep'] = '';
$defaults['transparent-header-main-sep-color'] = '';
/**
* Transparent Header
*/
$defaults['transparent-header-bg-color'] = '';
$defaults['transparent-header-color-site-title'] = '';
$defaults['transparent-header-color-h-site-title'] = '';
$defaults['transparent-menu-bg-color'] = '';
$defaults['transparent-menu-color'] = '';
$defaults['transparent-menu-h-color'] = '';
$defaults['transparent-submenu-bg-color'] = '';
$defaults['transparent-submenu-color'] = '';
$defaults['transparent-submenu-h-color'] = '';
/**
* Transparent Header Responsive Colors
*/
$defaults['transparent-header-bg-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-header-color-site-title-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-header-color-h-site-title-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-menu-bg-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-menu-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-menu-h-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-submenu-bg-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-submenu-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-submenu-h-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-content-section-text-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-content-section-link-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults['transparent-content-section-link-h-color-responsive'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
return $defaults;
}
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
public function customize_register( $wp_customize ) {
// @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
/**
* Register Panel & Sections
*/
require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/class-astra-transparent-header-panels-and-sections.php';
/**
* Sections
*/
require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-colors-transparent-header-configs.php';
// Check Transparent Header is activated.
require_once ASTRA_THEME_TRANSPARENT_HEADER_DIR . 'classes/sections/class-astra-customizer-transparent-header-configs.php';
// @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
}
/**
* Customizer Preview
*/
public function preview_scripts() {
/**
* Load unminified if SCRIPT_DEBUG is true.
*/
/* Directory and Extension */
$dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
$file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_script( 'astra-transparent-header-customizer-preview-js', ASTRA_THEME_TRANSPARENT_HEADER_URI . 'assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true );
// Localize variables for further JS.
wp_localize_script(
'astra-transparent-header-customizer-preview-js',
'AstraBuilderTransparentData',
array(
'is_astra_hf_builder_active' => Astra_Builder_Helper::$is_header_footer_builder_active,
'is_flex_based_css' => Astra_Builder_Helper::apply_flex_based_css(),
)
);
}
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Astra_Ext_Transparent_Header_Loader::get_instance();
iii. Creditors you may offer a relationship to the new digital disclosures into the or toward software for as long as customers don’t avoid the fresh new disclosures ahead of entry the applying.
iv. New disclosures will be on the same Web page since the the applying in place of fundamentally appearing to the 1st monitor, immediately preceding the switch the user will simply click to submit the application.

(2) Precedence out-of specific disclosures. The fresh disclosures revealed when you look at the paragraph (d)(1) by way of (4)(ii) of area will predate another requisite disclosures.
1. Precedence code. The list of conditions considering within creditor’s alternative below (d)(4)(iii) shouldn’t have to precede another disclosures.
(3) Getting a software which is accessed because of the user into the digital means, the disclosures needed significantly less than so it point is accessible to the new consumer in electronic means on otherwise toward app.
we. below), instance online in the a home computer system, the brand new creditor should provide new disclosures inside digital form (such as on the application to your their Webpages) to meet up with the need to bring disclosures within the an excellent timely style towards the or into the application.
ii. On the other hand, if a consumer is actually contained in this new creditor’s work environment, and you may accesses a installment loan Chase KS house collateral personal line of credit application electronically, for example thru a terminal or kiosk (or if an individual uses a terminal otherwise kiosk found on brand new premises of an affiliate marketer or 3rd party who’s got set up into collector to incorporate programs so you can people), this new collector might provide disclosures in both electronic otherwise paper setting, provided the new creditor complies for the timing, beginning, and you may retainability conditions of regulation.
(b) Time of disclosures. New disclosures and you can brochure necessary for sentences (d) and you may (e) of the point will likely be given during the time a credit card applicatoin is provided with the individual. The disclosures therefore the brochure could be produced or listed in the latest post perhaps not afterwards than just around three working days after the bill out-of a consumer’s software regarding programs present in periodicals or other e-books, otherwise if software is gotten by mobile or using a keen mediator agent or representative.
step 1. Post and you may mobile programs. In the event your creditor sends applications from send, the brand new disclosures and a brochure need certainly to compliment the applying. When the a loan application is absorbed the device, the latest disclosures and brochure tends to be lead or shipped within this about three business days of using the software. In the event the a software was shipped on the individual following a telephone consult, although not, the newest collector together with must publish the new disclosures and you can a brochure collectively for the application.
dos. General purpose apps. This new disclosures and you can a pamphlet need not be offered whenever an effective general purpose software is supplied to a consumer unless (1) the application or information accompanying they imply that it can be accustomed sign up for a house equity plan or (2) the application exists responding to a consumer’s specific query on a home guarantee package. Simultaneously, in the event that a general mission application is offered responding to a consumer’s particular inquiry no more than credit aside from a home security package, the fresh disclosures and you can brochure need not be given even if the software means it can be utilized to have a property security bundle, until it is followed by advertisements factual statements about family collateral preparations.
]]>