← All changes
|
includes/blocks/storeengine-product-review/block.php
+32
-16
2.11.0
→
2.14.0
View file →
| @@ -26,15 +26,17 @@ | ||
| 26 | 26 | $css_generator->add_class_styles( |
| 27 | 27 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings', |
| 28 | 28 | $this->get_feedback_section_css( $attributes ), |
| 29 | 29 | $this->get_feedback_section_css( $attributes, 'Tablet' ), |
| 30 | - $this->get_feedback_section_css( $attributes, 'Mobile' ) | |
| 30 | + $this->get_feedback_section_css( $attributes, 'Mobile' ), | |
| 31 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_section_css( $attributes, $device ); } ) | |
| 31 | 32 | ); |
| 32 | 33 | $css_generator->add_class_styles( |
| 33 | 34 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings:hover', |
| 34 | 35 | $this->get_feedback_section_hover_css( $attributes ), |
| 35 | 36 | $this->get_feedback_section_hover_css( $attributes, 'Tablet' ), |
| 36 | - $this->get_feedback_section_hover_css( $attributes, 'Mobile' ) | |
| 37 | + $this->get_feedback_section_hover_css( $attributes, 'Mobile' ), | |
| 38 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_section_hover_css( $attributes, $device ); } ) | |
| 37 | 39 | ); |
| 38 | 40 | |
| 39 | 41 | $css_generator->add_class_styles( |
| 40 | 42 | '{{WRAPPER}} .storeengine-single-product__content-item h2', |
| @@ -39,27 +41,31 @@ | ||
| 39 | 41 | $css_generator->add_class_styles( |
| 40 | 42 | '{{WRAPPER}} .storeengine-single-product__content-item h2', |
| 41 | 43 | $this->get_heading_css( $attributes ), |
| 42 | 44 | $this->get_heading_css( $attributes, 'Tablet' ), |
| 43 | - $this->get_heading_css( $attributes, 'Mobile' ) | |
| 45 | + $this->get_heading_css( $attributes, 'Mobile' ), | |
| 46 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_heading_css( $attributes, $device ); } ) | |
| 44 | 47 | ); |
| 45 | 48 | $css_generator->add_class_styles( |
| 46 | 49 | '{{WRAPPER}} .storeengine-single-product__content-item h2:hover', |
| 47 | 50 | $this->get_heading_hover_css( $attributes ), |
| 48 | 51 | $this->get_heading_hover_css( $attributes, 'Tablet' ), |
| 49 | - $this->get_heading_hover_css( $attributes, 'Mobile' ) | |
| 52 | + $this->get_heading_hover_css( $attributes, 'Mobile' ), | |
| 53 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_heading_hover_css( $attributes, $device ); } ) | |
| 50 | 54 | ); |
| 51 | 55 | $css_generator->add_class_styles( |
| 52 | 56 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating', |
| 53 | 57 | $this->get_avarage_css( $attributes, '' ), |
| 54 | 58 | $this->get_avarage_css( $attributes, 'Tablet' ), |
| 55 | - $this->get_avarage_css( $attributes, 'Mobile' ) | |
| 59 | + $this->get_avarage_css( $attributes, 'Mobile' ), | |
| 60 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_avarage_css( $attributes, $device ); } ) | |
| 56 | 61 | ); |
| 57 | 62 | $css_generator->add_class_styles( |
| 58 | 63 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating:hover', |
| 59 | 64 | $this->get_avarage_hover_css( $attributes, '' ), |
| 60 | 65 | $this->get_avarage_hover_css( $attributes, 'Tablet' ), |
| 61 | - $this->get_avarage_hover_css( $attributes, 'Mobile' ) | |
| 66 | + $this->get_avarage_hover_css( $attributes, 'Mobile' ), | |
| 67 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_avarage_hover_css( $attributes, $device ); } ) | |
| 62 | 68 | ); |
| 63 | 69 | $css_generator->add_class_styles( |
| 64 | 70 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon, |
| 65 | 71 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon:before', |
| @@ -64,9 +70,10 @@ | ||
| 64 | 70 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon, |
| 65 | 71 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon:before', |
| 66 | 72 | $this->get_rating_css( $attributes, '' ), |
| 67 | 73 | $this->get_rating_css( $attributes, 'Tablet' ), |
| 68 | - $this->get_rating_css( $attributes, 'Mobile' ) | |
| 74 | + $this->get_rating_css( $attributes, 'Mobile' ), | |
| 75 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_css( $attributes, $device ); } ) | |
| 69 | 76 | ); |
| 70 | 77 | $css_generator->add_class_styles( |
| 71 | 78 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon:hover, |
| 72 | 79 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon:hover::before', |
| @@ -71,33 +78,38 @@ | ||
| 71 | 78 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon:hover, |
| 72 | 79 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-rating-html .storeengine-icon:hover::before', |
| 73 | 80 | $this->get_rating_hover_css( $attributes, '' ), |
| 74 | 81 | $this->get_rating_hover_css( $attributes, 'Tablet' ), |
| 75 | - $this->get_rating_hover_css( $attributes, 'Mobile' ) | |
| 82 | + $this->get_rating_hover_css( $attributes, 'Mobile' ), | |
| 83 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_hover_css( $attributes, $device ); } ) | |
| 76 | 84 | ); |
| 77 | 85 | $css_generator->add_class_styles( |
| 78 | 86 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-review', |
| 79 | 87 | $this->get_review_text_css( $attributes, '' ), |
| 80 | 88 | $this->get_review_text_css( $attributes, 'Tablet' ), |
| 81 | - $this->get_review_text_css( $attributes, 'Mobile' ) | |
| 89 | + $this->get_review_text_css( $attributes, 'Mobile' ), | |
| 90 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_review_text_css( $attributes, $device ); } ) | |
| 82 | 91 | ); |
| 83 | 92 | $css_generator->add_class_styles( |
| 84 | 93 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-avg-review:hover', |
| 85 | 94 | $this->get_review_text_hover_css( $attributes, '' ), |
| 86 | 95 | $this->get_review_text_hover_css( $attributes, 'Tablet' ), |
| 87 | - $this->get_review_text_hover_css( $attributes, 'Mobile' ) | |
| 96 | + $this->get_review_text_hover_css( $attributes, 'Mobile' ), | |
| 97 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_review_text_hover_css( $attributes, $device ); } ) | |
| 88 | 98 | ); |
| 89 | 99 | $css_generator->add_class_styles( |
| 90 | 100 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-fill', |
| 91 | 101 | $this->get_rating_fill_css( $attributes, '' ), |
| 92 | 102 | $this->get_rating_fill_css( $attributes, 'Tablet' ), |
| 93 | - $this->get_rating_fill_css( $attributes, 'Mobile' ) | |
| 103 | + $this->get_rating_fill_css( $attributes, 'Mobile' ), | |
| 104 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_fill_css( $attributes, $device ); } ) | |
| 94 | 105 | ); |
| 95 | 106 | $css_generator->add_class_styles( |
| 96 | 107 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-fill:hover', |
| 97 | 108 | $this->get_rating_fill_hover_css( $attributes, '' ), |
| 98 | 109 | $this->get_rating_fill_hover_css( $attributes, 'Tablet' ), |
| 99 | - $this->get_rating_fill_hover_css( $attributes, 'Mobile' ) | |
| 110 | + $this->get_rating_fill_hover_css( $attributes, 'Mobile' ), | |
| 111 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_fill_hover_css( $attributes, $device ); } ) | |
| 100 | 112 | ); |
| 101 | 113 | $css_generator->add_class_styles( |
| 102 | 114 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-fill, |
| 103 | 115 | {{WEAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-label span, |
| @@ -104,9 +116,10 @@ | ||
| 104 | 116 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-label, |
| 105 | 117 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-col', |
| 106 | 118 | $this->get_rating_text_css( $attributes, '' ), |
| 107 | 119 | $this->get_rating_text_css( $attributes, 'Tablet' ), |
| 108 | - $this->get_rating_text_css( $attributes, 'Mobile' ) | |
| 120 | + $this->get_rating_text_css( $attributes, 'Mobile' ), | |
| 121 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_text_css( $attributes, $device ); } ) | |
| 109 | 122 | ); |
| 110 | 123 | $css_generator->add_class_styles( |
| 111 | 124 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-fill:hover, |
| 112 | 125 | {{WEAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-label span:hover, |
| @@ -113,21 +126,24 @@ | ||
| 113 | 126 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-label:hover, |
| 114 | 127 | {{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-ratings-list-item-col:hover', |
| 115 | 128 | $this->get_rating_text_hover_css( $attributes, '' ), |
| 116 | 129 | $this->get_rating_text_hover_css( $attributes, 'Tablet' ), |
| 117 | - $this->get_rating_text_hover_css( $attributes, 'Mobile' ) | |
| 130 | + $this->get_rating_text_hover_css( $attributes, 'Mobile' ), | |
| 131 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_text_hover_css( $attributes, $device ); } ) | |
| 118 | 132 | ); |
| 119 | 133 | $css_generator->add_class_styles( |
| 120 | 134 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-icon', |
| 121 | 135 | $this->get_feedback_star_css( $attributes, '' ), |
| 122 | 136 | $this->get_feedback_star_css( $attributes, 'Tablet' ), |
| 123 | - $this->get_feedback_star_css( $attributes, 'Mobile' ) | |
| 137 | + $this->get_feedback_star_css( $attributes, 'Mobile' ), | |
| 138 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_star_css( $attributes, $device ); } ) | |
| 124 | 139 | ); |
| 125 | 140 | $css_generator->add_class_styles( |
| 126 | 141 | '{{WRAPPER}} .storeengine-single-product__content-item--feedback .storeengine-product-feedback-ratings .storeengine-ratings-list-item .storeengine-icon:hover', |
| 127 | 142 | $this->get_feedback_star_hover_css( $attributes, '' ), |
| 128 | 143 | $this->get_feedback_star_hover_css( $attributes, 'Tablet' ), |
| 129 | - $this->get_feedback_star_hover_css( $attributes, 'Mobile' ) | |
| 144 | + $this->get_feedback_star_hover_css( $attributes, 'Mobile' ), | |
| 145 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_star_hover_css( $attributes, $device ); } ) | |
| 130 | 146 | ); |
| 131 | 147 | |
| 132 | 148 | return $css_generator->generate_css(); |
| 133 | 149 | } |