← All changes
|
includes/blocks/storeengine-cart-button/block.php
+26
-13
2.13.1
→
2.14.0
View file →
| @@ -29,9 +29,10 @@ | ||
| 29 | 29 | {{WRAPPER}} .storeengine-btn--direct-checkout, |
| 30 | 30 | {{WRAPPER}} .storeengine-btn--view-options', |
| 31 | 31 | $this->get_button_css( $attributes ), |
| 32 | 32 | $this->get_button_css( $attributes, 'Tablet' ), |
| 33 | - $this->get_button_css( $attributes, 'Mobile' ) | |
| 33 | + $this->get_button_css( $attributes, 'Mobile' ), | |
| 34 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_css( $attributes, $device ); } ) | |
| 34 | 35 | ); |
| 35 | 36 | $css_generator->add_class_styles( |
| 36 | 37 | '{{WRAPPER}} .storeengine-btn--add-to-cart:hover, |
| 37 | 38 | {{WRAPPER}} .storeengine-btn--add-to-cart-replacement:hover, |
| @@ -38,27 +39,31 @@ | ||
| 38 | 39 | {{WRAPPER}} .storeengine-btn--direct-checkout:hover, |
| 39 | 40 | {{WRAPPER}} .storeengine-btn--view-options:hover', |
| 40 | 41 | $this->get_button_hover_css( $attributes, '' ), |
| 41 | 42 | $this->get_button_hover_css( $attributes, 'Tablet' ), |
| 42 | - $this->get_button_hover_css( $attributes, 'Mobile' ) | |
| 43 | + $this->get_button_hover_css( $attributes, 'Mobile' ), | |
| 44 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_hover_css( $attributes, $device ); } ) | |
| 43 | 45 | ); |
| 44 | 46 | $css_generator->add_class_styles( |
| 45 | 47 | '{{WRAPPER}} .storeengine-single-product-quantity-wrap', |
| 46 | 48 | $this->get_button_alignment_css( $attributes, '' ), |
| 47 | 49 | $this->get_button_alignment_css( $attributes, 'Tablet' ), |
| 48 | - $this->get_button_alignment_css( $attributes, 'Mobile' ) | |
| 50 | + $this->get_button_alignment_css( $attributes, 'Mobile' ), | |
| 51 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_alignment_css( $attributes, $device ); } ) | |
| 49 | 52 | ); |
| 50 | 53 | $css_generator->add_class_styles( |
| 51 | 54 | '{{WRAPPER}} .storeengine-add-to-cart-shortcode .storeengine-price.amount', |
| 52 | 55 | $this->get_price_css( $attributes, '' ), |
| 53 | 56 | $this->get_price_css( $attributes, 'Tablet' ), |
| 54 | - $this->get_price_css( $attributes, 'Mobile' ) | |
| 57 | + $this->get_price_css( $attributes, 'Mobile' ), | |
| 58 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_price_css( $attributes, $device ); } ) | |
| 55 | 59 | ); |
| 56 | 60 | $css_generator->add_class_styles( |
| 57 | 61 | '{{WRAPPER}} .storeengine-add-to-cart-shortcode .storeengine-price.amount:hover', |
| 58 | 62 | $this->get_price_hover_css( $attributes, '' ), |
| 59 | 63 | $this->get_price_hover_css( $attributes, 'Tablet' ), |
| 60 | - $this->get_price_hover_css( $attributes, 'Mobile' ) | |
| 64 | + $this->get_price_hover_css( $attributes, 'Mobile' ), | |
| 65 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_price_hover_css( $attributes, $device ); } ) | |
| 61 | 66 | ); |
| 62 | 67 | $css_generator->add_class_styles( |
| 63 | 68 | '{{WRAPPER}} .storeengine-single-product-price-name, |
| 64 | 69 | {{WRAPPER}} .storeengine-loop-product-price-summery .storeengine-loop-product-price-label', |
| @@ -63,9 +68,10 @@ | ||
| 63 | 68 | '{{WRAPPER}} .storeengine-single-product-price-name, |
| 64 | 69 | {{WRAPPER}} .storeengine-loop-product-price-summery .storeengine-loop-product-price-label', |
| 65 | 70 | $this->get_price_name_css( $attributes, '' ), |
| 66 | 71 | $this->get_price_name_css( $attributes, 'Tablet' ), |
| 67 | - $this->get_price_name_css( $attributes, 'Mobile' ) | |
| 72 | + $this->get_price_name_css( $attributes, 'Mobile' ), | |
| 73 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_price_name_css( $attributes, $device ); } ) | |
| 68 | 74 | ); |
| 69 | 75 | $css_generator->add_class_styles( |
| 70 | 76 | '{{WRAPPER}} .storeengine-single-product-price-name:hover, |
| 71 | 77 | {{WRAPPER}} .storeengine-loop-product-price-summery .storeengine-loop-product-price-label:hover', |
| @@ -70,9 +76,10 @@ | ||
| 70 | 76 | '{{WRAPPER}} .storeengine-single-product-price-name:hover, |
| 71 | 77 | {{WRAPPER}} .storeengine-loop-product-price-summery .storeengine-loop-product-price-label:hover', |
| 72 | 78 | $this->get_price_name_hover_css( $attributes, '' ), |
| 73 | 79 | $this->get_price_name_hover_css( $attributes, 'Tablet' ), |
| 74 | - $this->get_price_name_hover_css( $attributes, 'Mobile' ) | |
| 80 | + $this->get_price_name_hover_css( $attributes, 'Mobile' ), | |
| 81 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_price_name_hover_css( $attributes, $device ); } ) | |
| 75 | 82 | ); |
| 76 | 83 | $css_generator->add_class_styles( |
| 77 | 84 | '{{WRAPPER}} .storeengine-single__amount .storeengine-dropdown, |
| 78 | 85 | {{WRAPPER}} .storeengine-single__amount .storeengine-product__multi-prices, |
| @@ -80,9 +87,10 @@ | ||
| 80 | 87 | {{WRAPPER}} .storeengine-dropdown.open .storeengine-dropdown-content .storeengine-product__multi-price label, |
| 81 | 88 | {{WRAPPER}} .storeengine-single-product-prices', |
| 82 | 89 | $this->get_box_css( $attributes, '' ), |
| 83 | 90 | $this->get_box_css( $attributes, 'Tablet' ), |
| 84 | - $this->get_box_css( $attributes, 'Mobile' ) | |
| 91 | + $this->get_box_css( $attributes, 'Mobile' ), | |
| 92 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_box_css( $attributes, $device ); } ) | |
| 85 | 93 | ); |
| 86 | 94 | $css_generator->add_class_styles( |
| 87 | 95 | '{{WRAPPER}} .storeengine-single__amount .storeengine-dropdown:hover, |
| 88 | 96 | {{WRAPPER}} .storeengine-single__amount .storeengine-product__multi-prices:hover, |
| @@ -90,27 +98,31 @@ | ||
| 90 | 98 | {{WRAPPER}} .storeengine-dropdown.open .storeengine-dropdown-content .storeengine-product__multi-price label:hover, |
| 91 | 99 | {{WRAPPER}} .storeengine-single-product-prices:hover', |
| 92 | 100 | $this->get_box_hover_css( $attributes, '' ), |
| 93 | 101 | $this->get_box_hover_css( $attributes, 'Tablet' ), |
| 94 | - $this->get_box_hover_css( $attributes, 'Mobile' ) | |
| 102 | + $this->get_box_hover_css( $attributes, 'Mobile' ), | |
| 103 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_box_hover_css( $attributes, $device ); } ) | |
| 95 | 104 | ); |
| 96 | 105 | $css_generator->add_class_styles( |
| 97 | 106 | '{{WRAPPER}} .storeengine-single-product-price-summery .storeengine-single-product-price-label input[type=radio]', |
| 98 | 107 | $this->get_radio_css( $attributes, '' ), |
| 99 | 108 | $this->get_radio_css( $attributes, 'Tablet' ), |
| 100 | - $this->get_radio_css( $attributes, 'Mobile' ) | |
| 109 | + $this->get_radio_css( $attributes, 'Mobile' ), | |
| 110 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_radio_css( $attributes, $device ); } ) | |
| 101 | 111 | ); |
| 102 | 112 | $css_generator->add_class_styles( |
| 103 | 113 | '{{WRAPPER}} .storeengine-single__amount', |
| 104 | 114 | $this->get_alignment_css( $attributes, '' ), |
| 105 | 115 | $this->get_alignment_css( $attributes, 'Tablet' ), |
| 106 | - $this->get_alignment_css( $attributes, 'Mobile' ) | |
| 116 | + $this->get_alignment_css( $attributes, 'Mobile' ), | |
| 117 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_alignment_css( $attributes, $device ); } ) | |
| 107 | 118 | ); |
| 108 | 119 | $css_generator->add_class_styles( |
| 109 | 120 | '{{WRAPPER}} .storeengine-add-to-cart-shortcode', |
| 110 | 121 | $this->get_gap_css( $attributes, '' ), |
| 111 | 122 | $this->get_gap_css( $attributes, 'Tablet' ), |
| 112 | - $this->get_gap_css( $attributes, 'Mobile' ) | |
| 123 | + $this->get_gap_css( $attributes, 'Mobile' ), | |
| 124 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_gap_css( $attributes, $device ); } ) | |
| 113 | 125 | ); |
| 114 | 126 | $css_generator->add_class_styles( |
| 115 | 127 | '{{WRAPPER}} .storeengine-single-product-prices .storeengine-single-product-price, |
| 116 | 128 | {{WRAPPER}} .storeengine-product__multi-prices .storeengine-dropdown__toggle, |
| @@ -116,9 +128,10 @@ | ||
| 116 | 128 | {{WRAPPER}} .storeengine-product__multi-prices .storeengine-dropdown__toggle, |
| 117 | 129 | {{WRAPPER}} .storeengine-single__amount .storeengine-product__multi-prices', |
| 118 | 130 | $this->get_price_box_css( $attributes, '' ), |
| 119 | 131 | $this->get_price_box_css( $attributes, 'Tablet' ), |
| 120 | - $this->get_price_box_css( $attributes, 'Mobile' ) | |
| 132 | + $this->get_price_box_css( $attributes, 'Mobile' ), | |
| 133 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_price_box_css( $attributes, $device ); } ) | |
| 121 | 134 | ); |
| 122 | 135 | |
| 123 | 136 | return $css_generator->generate_css(); |
| 124 | 137 | } |