From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- .../class-astra-bb-ultimate-addon.php | 428 +++++++++++++++++++++ 1 file changed, 428 insertions(+) create mode 100644 inc/compatibility/class-astra-bb-ultimate-addon.php (limited to 'inc/compatibility/class-astra-bb-ultimate-addon.php') diff --git a/inc/compatibility/class-astra-bb-ultimate-addon.php b/inc/compatibility/class-astra-bb-ultimate-addon.php new file mode 100644 index 0000000..c77b165 --- /dev/null +++ b/inc/compatibility/class-astra-bb-ultimate-addon.php @@ -0,0 +1,428 @@ + $font_family[0], + 'weight' => astra_get_option( 'font-weight-button' ), + ); + } + + /** + * Button Font Size + */ + public function button_font_size() { + return ''; + } + + /** + * Button Line Height + */ + public function button_line_height() { + return ''; + } + + /** + * Default type : Button Font Size + * + * @since 2.2.0 + */ + public function default_type_button_font_size() { + $font_size_arr = array(); + $body_font_size = astra_get_option( 'font-size-body' ); + $theme_btn_font_size = astra_get_option( 'font-size-button' ); + + $font_size_arr['desktop'] = astra_responsive_font( $theme_btn_font_size, 'desktop' ); + $font_size_arr['tablet'] = astra_responsive_font( $theme_btn_font_size, 'tablet' ); + $font_size_arr['mobile'] = astra_responsive_font( $theme_btn_font_size, 'mobile' ); + + if ( empty( $font_size_arr['desktop'] ) ) { + $font_size_arr['desktop'] = astra_responsive_font( $body_font_size, 'desktop' ); + } + if ( empty( $font_size_arr['tablet'] ) ) { + $font_size_arr['tablet'] = astra_responsive_font( $body_font_size, 'tablet' ); + } + if ( empty( $font_size_arr['mobile'] ) ) { + $font_size_arr['mobile'] = astra_responsive_font( $body_font_size, 'mobile' ); + } + + return $font_size_arr; + } + + /** + * Default type : Button Line Height + * + * @since 2.2.0 + */ + public function default_type_button_line_height() { + $theme_btn_body_line_height = astra_get_option( 'body-line-height', 1.85714285714286 ); + $theme_btn_line_height = astra_get_option( 'theme-btn-line-height', $theme_btn_body_line_height ); + return $theme_btn_line_height; + } + + /** + * Button Letter Spacing + */ + public function button_letter_spacing() { + return ''; + } + + /** + * Default type : Button Letter Spacing + * + * @since 2.2.0 + */ + public function default_type_button_letter_spacing() { + $theme_btn_letter_spacing = astra_get_option( 'theme-btn-letter-spacing' ); + return $theme_btn_letter_spacing; + } + + /** + * Button Text Transform + */ + public function button_text_transform() { + return ''; + } + + /** + * Default type : Button Text Transform + * + * @since 2.2.0 + */ + public function default_type_button_text_transform() { + $theme_btn_text_transform = astra_get_option( 'text-transform-button' ); + return $theme_btn_text_transform; + } + + /** + * Button Text Color + */ + public function button_text_color() { + $theme_color = astra_get_option( 'theme-color' ); + $link_color = astra_get_option( 'link-color', $theme_color ); + $color = astra_get_option( 'button-color' ); + if ( empty( $color ) ) { + $color = astra_get_foreground_color( $link_color ); + } + return $color; + } + + /** + * Default type : Button Text Color + * + * @since 2.2.0 + */ + public function default_type_button_text_color() { + $theme_color = astra_get_option( 'theme-color' ); + $btn_text_color = astra_get_option( 'button-color' ); + if ( empty( $btn_text_color ) ) { + $btn_text_color = astra_get_foreground_color( $theme_color ); + } + + return $btn_text_color; + } + + /** + * Button Text Hover Color + */ + public function button_text_hover_color() { + $link_hover_color = astra_get_option( 'link-h-color' ); + $btn_text_hover_color = astra_get_option( 'button-h-color' ); + if ( empty( $btn_text_hover_color ) ) { + $btn_text_hover_color = astra_get_foreground_color( $link_hover_color ); + } + + return $btn_text_hover_color; + } + + /** + * Default type : Button Text Hover Color + * + * @since 2.2.0 + */ + public function default_type_button_text_hover_color() { + $link_hover_color = astra_get_option( 'link-h-color' ); + $btn_text_hover_color = astra_get_option( 'button-h-color' ); + if ( empty( $btn_text_hover_color ) ) { + $btn_text_hover_color = astra_get_foreground_color( $link_hover_color ); + } + + return $btn_text_hover_color; + } + + /** + * Button Background Color + */ + public function button_bg_color() { + return astra_get_option( 'button-bg-color' ); + } + + /** + * Default type : Button Background Color + * + * @since 2.2.0 + */ + public function default_type_button_bg_color() { + $theme_color = astra_get_option( 'theme-color' ); + $btn_bg_color = astra_get_option( 'button-bg-color', $theme_color ); + return $btn_bg_color; + } + + /** + * Button Background Color + */ + public function button_bg_hover_color() { + return astra_get_option( 'button-bg-h-color' ); + } + + /** + * Default type : Button Background Color + * + * @since 2.2.0 + */ + public function default_type_button_bg_hover_color() { + $link_hover_color = astra_get_option( 'link-h-color' ); + $btn_bg_hover_color = astra_get_option( 'button-bg-h-color', $link_hover_color ); + return $btn_bg_hover_color; + } + + /** + * Button Border Radius + */ + public function button_border_radius() { + return astra_get_option( 'button-radius' ); + } + + + /** + * Button Padding + */ + public function button_padding() { + $padding = ''; + $v_padding = astra_get_option( 'button-v-padding' ); + $h_padding = astra_get_option( 'button-h-padding' ); + if ( '' != $v_padding && '' != $h_padding ) { + $padding = $v_padding . 'px ' . $h_padding . 'px'; + } + return $padding; + } + + /** + * Default type : Button Padding + * + * @since 2.2.0 + */ + public function default_type_button_padding() { + + $padding = astra_get_option( 'theme-button-padding' ); + + return $padding; + } + + /** + * Button Border Width + */ + public function button_border_width() { + + $btn_width = array(); + $get_btn_width = astra_get_option( 'theme-button-border-group-border-size' ); + + if ( ! empty( $get_btn_width ) ) { + $btn_width = $get_btn_width; + } + + return $btn_width; + } + + /** + * Button Border Color + */ + public function button_border_color() { + + $theme_color = astra_get_option( 'theme-color' ); + $btn_bg_color = astra_get_option( 'button-bg-color', $theme_color ); + $get_btn_border_color = astra_get_option( 'theme-button-border-group-border-color', $btn_bg_color ); + + return $get_btn_border_color; + } + + /** + * Button Border Hover Color + */ + public function button_border_hover_color() { + + $link_hover_color = astra_get_option( 'link-h-color' ); + $btn_bg_hover_color = astra_get_option( 'button-bg-h-color', $link_hover_color ); + $get_btn_border_h_color = astra_get_option( 'theme-button-border-group-border-h-color', $btn_bg_hover_color ); + + return $get_btn_border_h_color; + } + + /** + * Button Vertical Padding. + * + * @deprecated 2.2.0 + */ + public function button_vertical_padding() { + + $padding = ''; + $v_padding = astra_get_option( 'button-v-padding' ); + + if ( '' != $v_padding ) { + $padding = $v_padding; + } + + return $padding; + } + + /** + * Button Horizontal Padding. + * + * @deprecated 2.2.0 + */ + public function button_horizontal_padding() { + + $padding = ''; + $h_padding = astra_get_option( 'button-h-padding' ); + + if ( '' != $h_padding ) { + $padding = $h_padding; + } + + return $padding; + } + + } + +endif; + +/** + * Kicking this off by calling 'get_instance()' method + */ +Astra_BB_Ultimate_Addon::get_instance(); -- cgit v1.2.3-60-g2f50