Astra_Posts_Structure_Loader::__construct()
Constructor
Description
Source
File: inc/modules/posts-structures/class-astra-posts-structure-loader.php
public function __construct() {
/**
* Update Astra default color and typography values. To not update directly on existing users site, added backwards.
*
* @since 4.0.0
*/
$apply_new_default_color_typo_values = Astra_Dynamic_CSS::astra_check_default_color_typo();
self::$customizer_defaults['responsive-background'] = array(
'desktop' => array(
'background-color' => '',
'background-image' => '',
'background-repeat' => 'repeat',
'background-position' => 'center center',
'background-size' => 'auto',
'background-attachment' => 'scroll',
'background-type' => '',
'background-media' => '',
),
'tablet' => array(
'background-color' => '',
'background-image' => '',
'background-repeat' => 'repeat',
'background-position' => 'center center',
'background-size' => 'auto',
'background-attachment' => 'scroll',
'background-type' => '',
'background-media' => '',
),
'mobile' => array(
'background-color' => '',
'background-image' => '',
'background-repeat' => 'repeat',
'background-position' => 'center center',
'background-size' => 'auto',
'background-attachment' => 'scroll',
'background-type' => '',
'background-media' => '',
),
);
self::$customizer_defaults['responsive-spacing'] = array(
'desktop' => array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
),
'tablet' => array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
),
'mobile' => array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
),
'desktop-unit' => 'px',
'tablet-unit' => 'px',
'mobile-unit' => 'px',
);
self::$customizer_defaults['responsive-padding'] = array(
'desktop' => array(
'top' => 3,
'right' => 3,
'bottom' => 3,
'left' => 3,
),
'tablet' => array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
),
'mobile' => array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
),
'desktop-unit' => 'em',
'tablet-unit' => 'em',
'mobile-unit' => 'em',
);
self::$customizer_defaults['font-size'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
'desktop-unit' => 'px',
'tablet-unit' => 'px',
'mobile-unit' => 'px',
);
self::$customizer_defaults['title-font-size'] = array(
'desktop' => $apply_new_default_color_typo_values ? '32' : '',
'tablet' => '',
'mobile' => '',
'desktop-unit' => 'px',
'tablet-unit' => 'px',
'mobile-unit' => 'px',
);
self::$customizer_defaults['title-font-weight'] = $apply_new_default_color_typo_values ? '600' : 'inherit';
self::$customizer_defaults['responsive-slider'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
self::$customizer_defaults['responsive-color'] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
self::$customizer_defaults['font-extras'] = array(
'line-height' => '',
'line-height-unit' => 'em',
'letter-spacing' => '',
'letter-spacing-unit' => 'px',
'text-transform' => '',
'text-decoration' => '',
);
add_action( 'customize_register', array( $this, 'posts_structures_customize_register' ), 2 );
add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 );
add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |