astra_prepare_button_defaults( array $defaults, int $index )
Prepare Button Defaults.
Description
Parameters
- $defaults
-
(array) (Required) defaults.
- $index
-
(int) (Required) index.
Source
File: inc/core/builder/class-astra-builder-options.php
function astra_prepare_button_defaults( $defaults, $index ) {
$_prefix = 'button' . $index;
$defaults[ 'header-' . $_prefix . '-text' ] = __( 'Button', 'astra' );
$defaults[ 'header-' . $_prefix . '-link-option' ] = array(
'url' => apply_filters( 'astra_site_url', 'https://www.wpastra.com' ),
'new_tab' => false,
'link_rel' => '',
);
$defaults[ 'header-' . $_prefix . '-font-family' ] = 'inherit';
$defaults[ 'header-' . $_prefix . '-font-weight' ] = 'inherit';
$defaults[ 'header-' . $_prefix . '-text-transform' ] = '';
$defaults[ 'header-' . $_prefix . '-line-height' ] = '';
$defaults[ 'header-' . $_prefix . '-font-size' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
'desktop-unit' => 'px',
'tablet-unit' => 'px',
'mobile-unit' => 'px',
);
$defaults[ 'header-' . $_prefix . '-text-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'header-' . $_prefix . '-back-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'header-' . $_prefix . '-text-h-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'header-' . $_prefix . '-back-h-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'header-' . $_prefix . '-padding' ] = 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',
);
$defaults[ 'header-' . $_prefix . '-border-size' ] = array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
);
$defaults[ 'header-' . $_prefix . '-border-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'header-' . $_prefix . '-border-radius' ] = '';
$defaults[ 'section-hb-button-' . $index . '-padding' ] = Astra_Builder_Helper::$default_responsive_spacing;
$defaults[ 'section-hb-button-' . $index . '-margin' ] = Astra_Builder_Helper::$default_responsive_spacing;
$defaults[ 'sticky-header-button' . $index . '-padding' ] = Astra_Builder_Helper::$default_responsive_spacing;
$_prefix = 'button' . $index;
$defaults[ 'footer-' . $_prefix . '-text' ] = __( 'Button', 'astra' );
$defaults[ 'footer-' . $_prefix . '-link-option' ] = array(
'url' => apply_filters( 'astra_site_url', 'https://www.wpastra.com' ),
'new_tab' => false,
'link_rel' => '',
);
$defaults[ 'footer-' . $_prefix . '-font-family' ] = 'inherit';
$defaults[ 'footer-' . $_prefix . '-font-weight' ] = 'inherit';
$defaults[ 'footer-' . $_prefix . '-text-transform' ] = '';
$defaults[ 'footer-' . $_prefix . '-line-height' ] = '';
$defaults[ 'footer-' . $_prefix . '-font-size' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
'desktop-unit' => 'px',
'tablet-unit' => 'px',
'mobile-unit' => 'px',
);
$defaults[ 'footer-' . $_prefix . '-text-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'footer-' . $_prefix . '-back-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'footer-' . $_prefix . '-text-h-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'footer-' . $_prefix . '-back-h-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'footer-' . $_prefix . '-padding' ] = 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',
);
$defaults[ 'footer-' . $_prefix . '-border-size' ] = array(
'top' => '',
'right' => '',
'bottom' => '',
'left' => '',
);
$defaults[ 'footer-' . $_prefix . '-border-color' ] = array(
'desktop' => '',
'tablet' => '',
'mobile' => '',
);
$defaults[ 'footer-' . $_prefix . '-border-radius' ] = '';
$defaults[ 'footer-button-' . $index . '-alignment' ] = array(
'desktop' => 'center',
'tablet' => 'center',
'mobile' => 'center',
);
$defaults[ 'section-fb-button-' . $index . '-padding' ] = Astra_Builder_Helper::$default_responsive_spacing;
$defaults[ 'section-fb-button-' . $index . '-margin' ] = Astra_Builder_Helper::$default_responsive_spacing;
return $defaults;
}
Expand full source code Collapse full source code View on Trac