This function has been deprecated. Use astra_prepare_widget_defaults() instead.
prepare_widget_defaults( array $defaults, string $index )
Deprecating prepare_widget_defaults function.
Description
Default configurations for builder Widget components.
See also
Parameters
- $defaults
-
(array) (Required) Widget default configs.
- $index
-
(string) (Required) builder Widget component index.
Return
(array)
Source
File: inc/core/deprecated/deprecated-functions.php
function 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
Changelog
| Version | Description |
|---|---|
| 3.7.4 | Introduced. |