astra_prepare_widget_defaults( array $defaults, integer $index )
Prepare Widget Defaults.
Description
Parameters
- $defaults
-
(array) (Required) defaults.
- $index
-
(integer) (Required) index.
Source
File: inc/core/builder/class-astra-builder-options.php
function astra_prepare_widget_defaults( $defaults, $index ) { // Widget Header defaults. // Colors. $defaults[ 'header-widget-' . $index . '-title-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-widget-' . $index . '-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-widget-' . $index . '-link-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'header-widget-' . $index . '-link-h-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); // Title Typography. $defaults[ 'header-widget-' . $index . '-font-family' ] = 'inherit'; $defaults[ 'header-widget-' . $index . '-font-weight' ] = 'inherit'; $defaults[ 'header-widget-' . $index . '-text-transform' ] = ''; $defaults[ 'header-widget-' . $index . '-line-height' ] = ''; $defaults[ 'header-widget-' . $index . '-font-size' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Content Typography. $defaults[ 'header-widget-' . $index . '-content-font-family' ] = 'inherit'; $defaults[ 'header-widget-' . $index . '-content-font-weight' ] = 'inherit'; $defaults[ 'header-widget-' . $index . '-content-text-transform' ] = ''; $defaults[ 'header-widget-' . $index . '-content-line-height' ] = ''; $defaults[ 'header-widget-' . $index . '-content-font-size' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults[ 'sidebar-widgets-header-widget-' . $index . '-margin' ] = Astra_Builder_Helper::$default_responsive_spacing; // Widget Footer defaults. // Colors. $defaults[ 'footer-widget-' . $index . '-title-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'footer-widget-' . $index . '-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'footer-widget-' . $index . '-link-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); $defaults[ 'footer-widget-' . $index . '-link-h-color' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', ); // Title Typography. $defaults[ 'footer-widget-' . $index . '-font-family' ] = 'inherit'; $defaults[ 'footer-widget-' . $index . '-font-weight' ] = 'inherit'; $defaults[ 'footer-widget-' . $index . '-text-transform' ] = ''; $defaults[ 'footer-widget-' . $index . '-line-height' ] = ''; $defaults[ 'footer-widget-' . $index . '-font-size' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); // Content Typography. $defaults[ 'footer-widget-' . $index . '-content-font-family' ] = 'inherit'; $defaults[ 'footer-widget-' . $index . '-content-font-weight' ] = 'inherit'; $defaults[ 'footer-widget-' . $index . '-content-text-transform' ] = ''; $defaults[ 'footer-widget-' . $index . '-content-line-height' ] = ''; $defaults[ 'footer-widget-' . $index . '-content-font-size' ] = array( 'desktop' => '', 'tablet' => '', 'mobile' => '', 'desktop-unit' => 'px', 'tablet-unit' => 'px', 'mobile-unit' => 'px', ); $defaults[ 'footer-widget-alignment-' . $index ] = array( 'desktop' => 'left', 'tablet' => 'center', 'mobile' => 'center', ); $defaults[ 'sidebar-widgets-footer-widget-' . $index . '-margin' ] = Astra_Builder_Helper::$default_responsive_spacing; return $defaults; }
Expand full source code Collapse full source code View on Trac