Skip to content
80 changes: 56 additions & 24 deletions classes/class-responsive-block-editor-addons-frontend-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -5189,7 +5189,10 @@ public static function get_responsive_block_card_css( $attr, $id ) {
'margin-left' => self::get_css_value( $attr['ctaButtonLeftMargin'], 'px' ),
'margin-right' => self::get_css_value( $attr['ctaButtonRightMargin'], 'px' ),
'border-style' => 'empty' !== $attr['butborderStyle'] && 'none' !== $attr['ctaBorderStyle'] ? $attr['butborderStyle'] : $attr['ctaBorderStyle'], // For compatibility with v1.3.2.
'border-radius' => 999 !== $attr['butborderRadius'] && 2 === $attr['ctaBorderRadius'] ? self::get_css_value( $attr['butborderRadius'], 'px' ) : self::get_css_value( $attr['ctaBorderRadius'], 'px' ), // For compatibility with v1.3.2.
'border-top-left-radius' => self::get_css_value( $attr['ctaBlockTopRadius'], 'px' ),
'border-top-right-radius' => self::get_css_value( $attr['ctaBlockRightRadius'], 'px' ),
'border-bottom-left-radius' => self::get_css_value( $attr['ctaBlockBottomRadius'], 'px' ),
'border-bottom-right-radius' => self::get_css_value( $attr['ctaBlockLeftRadius'], 'px' ),
'border-width' => 999 !== $attr['butborderWidth'] && 1 === $attr['ctaBorderWidth'] ? self::get_css_value( $attr['butborderWidth'], 'px' ) : self::get_css_value( $attr['ctaBorderWidth'], 'px' ), // For compatibility with v1.3.2.
'background-image' => $flag ? '' : $updated_button_background_color,
'border-color' => $attr['ctaBorderColor'],
Expand Down Expand Up @@ -5233,6 +5236,10 @@ public static function get_responsive_block_card_css( $attr, $id ) {
'margin-bottom' => self::get_css_value( $attr['ctaButtonBottomMarginMobile'], 'px' ),
'margin-left' => self::get_css_value( $attr['ctaButtonLeftMarginMobile'], 'px' ),
'margin-right' => self::get_css_value( $attr['ctaButtonRightMarginMobile'], 'px' ),
'border-top-left-radius' => self::get_css_value( $attr['ctaBlockTopRadiusMobile'], 'px' ),
'border-top-right-radius' => self::get_css_value( $attr['ctaBlockRightRadiusMobile'], 'px' ),
'border-bottom-left-radius' => self::get_css_value( $attr['ctaBlockBottomRadiusMobile'], 'px' ),
'border-bottom-right-radius' => self::get_css_value( $attr['ctaBlockLeftRadiusMobile'], 'px' ),
),
' .wp-block-responsive-block-editor-addons-card-item' => array(
'border-top-left-radius' => self::get_css_value( $attr['blockTopRadiusMobile'], 'px' ),
Expand Down Expand Up @@ -5286,6 +5293,10 @@ public static function get_responsive_block_card_css( $attr, $id ) {
'margin-bottom' => self::get_css_value( $attr['ctaButtonBottomMarginTablet'], 'px' ),
'margin-left' => self::get_css_value( $attr['ctaButtonLeftMarginTablet'], 'px' ),
'margin-right' => self::get_css_value( $attr['ctaButtonRightMarginTablet'], 'px' ),
'border-top-left-radius' => self::get_css_value( $attr['ctaBlockTopRadiusTablet'], 'px' ),
'border-top-right-radius' => self::get_css_value( $attr['ctaBlockRightRadiusTablet'], 'px' ),
'border-bottom-left-radius' => self::get_css_value( $attr['ctaBlockBottomRadiusTablet'], 'px' ),
'border-bottom-right-radius' => self::get_css_value( $attr['ctaBlockLeftRadiusTablet'], 'px' ),
),
' .wp-block-responsive-block-editor-addons-card-item' => array(
'border-top-left-radius' => self::get_css_value( $attr['blockTopRadiusTablet'], 'px' ),
Expand Down Expand Up @@ -5585,6 +5596,18 @@ public static function get_responsive_block_card_default_attributes() {
'backgroundImageTwoId' => null,
'backgroundImageThreeId' => null,
'backgroundImageFourId' => null,
'ctaBlockTopRadius' => 0,
'ctaBlockRightRadius' => 0,
'ctaBlockBottomRadius' => 0,
'ctaBlockLeftRadius' => 0,
'ctaBlockTopRadiusMobile' => 0,
'ctaBlockRightRadiusMobile' => 0,
'ctaBlockBottomRadiusMobile' => 0,
'ctaBlockLeftRadiusMobile' => 0,
'ctaBlockTopRadiusTablet' => 0,
'ctaBlockRightRadiusTablet' => 0,
'ctaBlockBottomRadiusTablet' => 0,
'ctaBlockLeftRadiusTablet' => 0,
);
}

Expand Down Expand Up @@ -7221,7 +7244,7 @@ public static function get_responsive_block_gallery_masonry_css( $attr, $id ) {
'font-weight' => ( isset( $attr['filterTabTypographyFontWeight'] ) && '' !== $attr['filterTabTypographyFontWeight'] ) ? $attr['filterTabTypographyFontWeight'] : '',
'line-height' => ( isset( $attr['filterTabTypographyLineHeight'] ) && '' !== $attr['filterTabTypographyLineHeight'] ) ? $attr['filterTabTypographyLineHeight'] : '',
'letter-spacing' => ( isset( $attr['filterTabTypographyLetterSpacing'] ) && '' !== $attr['filterTabTypographyLetterSpacing'] ) ? self::get_css_value( $attr['filterTabTypographyLetterSpacing'], 'px' ) : '',
'text-transform' => isset( $attr['filterTabTypographyTextTransform'] ) ? $attr['filterTabTypographyTextTransform'] : '',
'text-transform' => $attr['filterTabTypographyTextTransform'],
'text-decoration'=> isset( $attr['filterTabTypographyTextDecoration'] ) ? $attr['filterTabTypographyTextDecoration'] : '',
),
' .gallery-filter-wrapper .gallery-filter-button' => array(
Expand All @@ -7245,7 +7268,7 @@ public static function get_responsive_block_gallery_masonry_css( $attr, $id ) {
'font-style' => isset( $attr['filterTabTypographyFontStyle'] ) ? $attr['filterTabTypographyFontStyle'] : 'normal',
'line-height' => ( isset( $attr['filterTabTypographyLineHeight'] ) && '' !== $attr['filterTabTypographyLineHeight'] ) ? $attr['filterTabTypographyLineHeight'] : '',
'letter-spacing' => ( isset( $attr['filterTabTypographyLetterSpacing'] ) && '' !== $attr['filterTabTypographyLetterSpacing'] ) ? self::get_css_value( $attr['filterTabTypographyLetterSpacing'], 'px' ) : '',
'text-transform' => isset( $attr['filterTabTypographyTextTransform'] ) ? $attr['filterTabTypographyTextTransform'] : '',
'text-transform' => $attr['filterTabTypographyTextTransform'],
'text-decoration' => isset( $attr['filterTabTypographyTextDecoration'] ) ? $attr['filterTabTypographyTextDecoration'] : '',
),
' .gallery-filter-wrapper .gallery-filter-button:hover, .gallery-filter-wrapper .gallery-filter-button.is-active' => array(
Expand Down Expand Up @@ -7292,7 +7315,7 @@ public static function get_responsive_block_gallery_masonry_css( $attr, $id ) {
'font-weight' => ( isset( $attr['filterTabTypographyFontWeight'] ) && '' !== $attr['filterTabTypographyFontWeight'] ) ? $attr['filterTabTypographyFontWeight'] : '',
'line-height' => ( isset( $attr['filterTabTypographyLineHeight'] ) && '' !== $attr['filterTabTypographyLineHeight'] ) ? $attr['filterTabTypographyLineHeight'] : '',
'letter-spacing' => ( isset( $attr['filterTabTypographyLetterSpacing'] ) && '' !== $attr['filterTabTypographyLetterSpacing'] ) ? self::get_css_value( $attr['filterTabTypographyLetterSpacing'], 'px' ) : '',
'text-transform' => isset( $attr['filterTabTypographyTextTransform'] ) ? $attr['filterTabTypographyTextTransform'] : '',
'text-transform' => $attr['filterTabTypographyTextTransform'],
'text-decoration'=> isset( $attr['filterTabTypographyTextDecoration'] ) ? $attr['filterTabTypographyTextDecoration'] : '',
),
' .gallery-filter-wrapper .gallery-filter-button' => array(
Expand All @@ -7301,7 +7324,7 @@ public static function get_responsive_block_gallery_masonry_css( $attr, $id ) {
'font-weight' => ( isset( $attr['filterTabTypographyFontWeight'] ) && '' !== $attr['filterTabTypographyFontWeight'] ) ? $attr['filterTabTypographyFontWeight']: '',
'line-height' => ( isset( $attr['filterTabTypographyLineHeight'] ) && '' !== $attr['filterTabTypographyLineHeight'] ) ? $attr['filterTabTypographyLineHeight']: '',
'letter-spacing' => ( isset( $attr['filterTabTypographyLetterSpacing'] ) && '' !== $attr['filterTabTypographyLetterSpacing'] ) ? self::get_css_value( $attr['filterTabTypographyLetterSpacing'], 'px' ): '',
'text-transform' => isset( $attr['filterTabTypographyTextTransform'] ) ? $attr['filterTabTypographyTextTransform'] : '',
'text-transform' => $attr['filterTabTypographyTextTransform'],
'text-decoration' => isset( $attr['filterTabTypographyTextDecoration'] ) ? $attr['filterTabTypographyTextDecoration'] : '',
'padding-top' => ( $v = self::get_css_value( ( isset( $attr['filterTabTopPaddingMobile'] ) && $attr['filterTabTopPaddingMobile'] !== '' ) ? $attr['filterTabTopPaddingMobile'] : ( ( isset( $attr['filterTabTopPadding'] ) && $attr['filterTabTopPadding'] !== '' ) ? $attr['filterTabTopPadding'] : 7 ), 'px' ) ) ? $v : '',
'padding-right' => ( $v = self::get_css_value( ( isset( $attr['filterTabRightPaddingMobile'] ) && $attr['filterTabRightPaddingMobile'] !== '' ) ? $attr['filterTabRightPaddingMobile'] : ( ( isset( $attr['filterTabRightPadding'] ) && $attr['filterTabRightPadding'] !== '' ) ? $attr['filterTabRightPadding'] : 7 ), 'px' ) ) ? $v : '',
Expand Down Expand Up @@ -7362,7 +7385,7 @@ public static function get_responsive_block_gallery_masonry_css( $attr, $id ) {
'font-weight' => ( isset( $attr['filterTabTypographyFontWeight'] ) && '' !== $attr['filterTabTypographyFontWeight'] ) ? $attr['filterTabTypographyFontWeight'] : '',
'line-height' => ( isset( $attr['filterTabTypographyLineHeight'] ) && '' !== $attr['filterTabTypographyLineHeight'] ) ? $attr['filterTabTypographyLineHeight'] : '',
'letter-spacing' => ( isset( $attr['filterTabTypographyLetterSpacing'] ) && '' !== $attr['filterTabTypographyLetterSpacing'] ) ? self::get_css_value( $attr['filterTabTypographyLetterSpacing'], 'px' ) : '',
'text-transform' => isset( $attr['filterTabTypographyTextTransform'] ) ? $attr['filterTabTypographyTextTransform'] : '',
'text-transform' => $attr['filterTabTypographyTextTransform'],
'text-decoration'=> isset( $attr['filterTabTypographyTextDecoration'] ) ? $attr['filterTabTypographyTextDecoration'] : '',
),
' .gallery-filter-wrapper .gallery-filter-button' => array(
Expand All @@ -7371,7 +7394,7 @@ public static function get_responsive_block_gallery_masonry_css( $attr, $id ) {
'font-weight' => ( isset( $attr['filterTabTypographyFontWeight'] ) && '' !== $attr['filterTabTypographyFontWeight'] ) ? $attr['filterTabTypographyFontWeight'] : '',
'line-height' => ( isset( $attr['filterTabTypographyLineHeight'] ) && '' !== $attr['filterTabTypographyLineHeight'] ) ? $attr['filterTabTypographyLineHeight'] : '',
'letter-spacing' => ( isset( $attr['filterTabTypographyLetterSpacing'] ) && '' !== $attr['filterTabTypographyLetterSpacing'] ) ? self::get_css_value( $attr['filterTabTypographyLetterSpacing'], 'px' ) : '',
'text-transform' => isset( $attr['filterTabTypographyTextTransform'] ) ? $attr['filterTabTypographyTextTransform'] : '',
'text-transform' => $attr['filterTabTypographyTextTransform'],
'text-decoration' => isset( $attr['filterTabTypographyTextDecoration'] ) ? $attr['filterTabTypographyTextDecoration'] : '',
'padding-top' => '' !== ( $v = self::get_css_value( ( isset( $attr['filterTabTopPaddingTablet'] ) && $attr['filterTabTopPaddingTablet'] !== '' ) ? $attr['filterTabTopPaddingTablet'] : ( ( isset( $attr['filterTabTopPadding'] ) && $attr['filterTabTopPadding'] !== '' ) ? $attr['filterTabTopPadding'] : 7 ), 'px' ) ) ? $v : '',
'padding-right' => '' !== ( $v = self::get_css_value( ( isset( $attr['filterTabRightPaddingTablet'] ) && $attr['filterTabRightPaddingTablet'] !== '' ) ? $attr['filterTabRightPaddingTablet'] : ( ( isset( $attr['filterTabRightPadding'] ) && $attr['filterTabRightPadding'] !== '' ) ? $attr['filterTabRightPadding'] : 7 ), 'px' ) ) ? $v : '',
Expand Down Expand Up @@ -7450,6 +7473,15 @@ public static function get_responsive_block_gallery_masonry_block_default_attrib
'customHeight' => '',
'columnsize' => 3,
'filterTabRightPaddingMobile' => 30,
'filterTabTypographyFontFamily' => '',
'filterTabTypographyFontSize' => 14,
'filterTabTypographyFontSizeTablet' => '',
'filterTabTypographyFontSizeMobile' => '',
'filterTabTypographyFontWeight' => 400,
'filterTabTypographyLineHeight' => 1.5,
'filterTabTypographyLetterSpacing' => 0,
'filterTabTypographyTextTransform' => 'none',
'filterTabTypographyTextDecoration' => '',
);
}

Expand Down Expand Up @@ -13452,11 +13484,11 @@ public static function get_responsive_block_testimonial_slider_css( $attr, $id )

$imgopacity = $attr['opacity'] / 100;

$updated_background_image = 'url(' . $attr['backgroundImage'] . ')';
$background_image_effect = '';
$updated_background_image = '';

$color_type = '';
if ( 'color' === $attr['overlayType'] || '' === $attr['overlayType'] || 'none' === $attr['overlayType'] ) {
if ( 'color' === $attr['overlayType'] ) {
$color_type = self::hex_to_rgba(
$attr['backgroundImageColor'],
$imgopacity
Expand Down Expand Up @@ -14875,7 +14907,7 @@ public static function get_responsive_block_count_up_default_attributes() {
'contentTextDecoration' => '',
'headingTextDecoration' => '',
'dateTextDecoration' => '',
'countupTopPadding' => '',
'countupTopPadding' => 30,
'countupTopPaddingMobile' => '',
'countupTopPaddingTablet' => '',
'countupBottomPadding' => '',
Expand Down Expand Up @@ -20700,13 +20732,13 @@ public static function get_responsive_block_feature_grid_default_attributes() {
'ctaBackColor' => '',
'ctaHoverColor' => '',
'ctaHoverBackColor' => '',
'buttonbackgroundType' => 'color',
'buttonbackgroundType' => '',
'buttoncolorLocation1' => 0,
'buttoncolorLocation2' => 100,
'buttongradientDirection' => 90,
'buttonbackgroundColor1' => '',
'buttonbackgroundColor2' => '#fff',
'buttonHbackgroundType' => 'color',
'buttonHbackgroundType' => '',
'buttonHcolorLocation1' => 0,
'buttonHcolorLocation2' => 100,
'buttonHgradientDirection' => 90,
Expand Down Expand Up @@ -20814,18 +20846,18 @@ public static function get_responsive_block_feature_grid_default_attributes() {
'titleTypographyColor' => '',
'descTypographyColor' => '',

'ctaButtonTopPadding' => '',
'ctaButtonBottomPadding' => '',
'ctaButtonLeftPadding' => '',
'ctaButtonRightPadding' => '',
'ctaButtonTopPaddingTablet' => '',
'ctaButtonBottomPaddingTablet' => '',
'ctaButtonRightPaddingTablet' => '',
'ctaButtonLeftPaddingTablet' => '',
'ctaButtonTopPaddingMobile' => '',
'ctaButtonBottomPaddingMobile' => '',
'ctaButtonLeftPaddingMobile' => '',
'ctaButtonRightPaddingMobile' => '',
'ctaButtonTopPadding' => 15,
'ctaButtonBottomPadding' => 15,
'ctaButtonLeftPadding' => 30,
'ctaButtonRightPadding' => 30,
'ctaButtonTopPaddingTablet' => 15,
'ctaButtonBottomPaddingTablet' => 15,
'ctaButtonRightPaddingTablet' => 30,
'ctaButtonLeftPaddingTablet' => 30,
'ctaButtonTopPaddingMobile' => 15,
'ctaButtonBottomPaddingMobile' => 15,
'ctaButtonLeftPaddingMobile' => 30,
'ctaButtonRightPaddingMobile' => 30,

'ctaBlockTopRadius' => '',
'ctaBlockRightRadius' => '',
Expand Down
8 changes: 8 additions & 0 deletions includes/class-responsive-block-editor-addons.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,14 @@ public static function get_post_types() {
continue;
}

if ( 'e-floating-buttons' === $post_type->name ) {
continue;
}

if ( 'elementor_library' === $post_type->name ) {
continue;
}

$options[] = array(
'value' => $post_type->name,
'label' => $post_type->label,
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/call-to-action/components/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ export default class Inspector extends Component {
{...this.props}
/>
)}
{resctaType === "button" && (
{resctaType === "button" && !inheritFromTheme && (
<TypographyHelperControl
title={__("Button Typography", "responsive-block-editor-addons")}
attrNameTemplate="buttonText%s"
Expand Down
52 changes: 48 additions & 4 deletions src/blocks/card/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,6 @@ const attributes = {
type: "number",
default: 1,
},
ctaBorderRadius: {
type: "number",
default: 2,
},
ctaBorderStyle: {
type: "string",
default: "none",
Expand Down Expand Up @@ -1063,5 +1059,53 @@ const attributes = {
backgroundImageTwoId: { type: "number", default: null },
backgroundImageThreeId: { type: "number", default: null },
backgroundImageFourId: { type: "number", default: null },
ctaBlockTopRadius: {
type: "number",
default: 0,
},
ctaBlockRightRadius: {
type: "number",
default: 0,
},
ctaBlockBottomRadius: {
type: "number",
default: 0,
},
ctaBlockLeftRadius: {
type: "number",
default: 0,
},
ctaBlockTopRadiusMobile: {
type: "number",
default: 0,
},
ctaBlockRightRadiusMobile: {
type: "number",
default: 0,
},
ctaBlockBottomRadiusMobile: {
type: "number",
default: 0,
},
ctaBlockLeftRadiusMobile: {
type: "number",
default: 0,
},
ctaBlockTopRadiusTablet: {
type: "number",
default: 0,
},
ctaBlockRightRadiusTablet: {
type: "number",
default: 0,
},
ctaBlockBottomRadiusTablet: {
type: "number",
default: 0,
},
ctaBlockLeftRadiusTablet: {
type: "number",
default: 0,
},
};
export default attributes;
Loading
Loading