Astra_Addon_Button_Component_Dynamic_CSS::astra_ext_button_dynamic_css( string $builder_type = 'header' )
Dynamic CSS
Description
Parameters
- $builder_type
-
(string) (Optional) Builder Type.
Default value: 'header'
Return
(String) Generated dynamic CSS for Heading Colors.
Source
File: classes/builder/type/base/dynamic-css/button/class-astra-addon-button-component-dynamic-css.php
public static function astra_ext_button_dynamic_css( $builder_type = 'header' ) {
$dynamic_css = '';
$number_of_button = ( 'header' === $builder_type ) ? astra_addon_builder_helper()->num_of_header_button : astra_addon_builder_helper()->num_of_footer_button;
for ( $index = 1; $index <= $number_of_button; $index++ ) {
if ( ! Astra_Addon_Builder_Helper::is_component_loaded( 'button-' . $index, $builder_type ) ) {
continue;
}
$_section = ( 'header' === $builder_type ) ? 'section-hb-button-' . $index : 'section-fb-button-' . $index;
$_prefix = 'button' . $index;
$selector = '.ast-' . $builder_type . '-button-' . $index . ' .ast-custom-button';
$dynamic_css .= Astra_Addon_Base_Dynamic_CSS::prepare_box_shadow_dynamic_css( $builder_type . '-button' . $index, $selector );
}
return $dynamic_css;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |