← All changes
|
includes/blocks/academy-course-reviews/block.php
+36
-18
2.12.0
→
2.14.0
View file →
| @@ -27,63 +27,73 @@ | ||
| 27 | 27 | $css_generator->add_class_styles( |
| 28 | 28 | '{{WRAPPER}} .academy-single-course__content-item--feedback .feedback-title', |
| 29 | 29 | $this->get_feedback_heading_css( $attributes ), |
| 30 | 30 | $this->get_feedback_heading_css( $attributes, 'Tablet' ), |
| 31 | - $this->get_feedback_heading_css( $attributes, 'Mobile' ) | |
| 31 | + $this->get_feedback_heading_css( $attributes, 'Mobile' ), | |
| 32 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_heading_css( $attributes, $device ); } ) | |
| 32 | 33 | ); |
| 33 | 34 | $css_generator->add_class_styles( |
| 34 | 35 | '{{WRAPPER}} .academy-single-course__content-item--feedback .feedback-title:hover', |
| 35 | 36 | $this->get_feedback_heading_hover_css( $attributes ), |
| 36 | 37 | $this->get_feedback_heading_hover_css( $attributes, 'Tablet' ), |
| 37 | - $this->get_feedback_heading_hover_css( $attributes, 'Mobile' ) | |
| 38 | + $this->get_feedback_heading_hover_css( $attributes, 'Mobile' ), | |
| 39 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_heading_hover_css( $attributes, $device ); } ) | |
| 38 | 40 | ); |
| 39 | 41 | $css_generator->add_class_styles( |
| 40 | 42 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings', |
| 41 | 43 | $this->get_feedback_section_css( $attributes ), |
| 42 | 44 | $this->get_feedback_section_css( $attributes, 'Tablet' ), |
| 43 | - $this->get_feedback_section_css( $attributes, 'Mobile' ) | |
| 45 | + $this->get_feedback_section_css( $attributes, 'Mobile' ), | |
| 46 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_section_css( $attributes, $device ); } ) | |
| 44 | 47 | ); |
| 45 | 48 | $css_generator->add_class_styles( |
| 46 | 49 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings:hover', |
| 47 | 50 | $this->get_feedback_section_hover_css( $attributes ), |
| 48 | 51 | $this->get_feedback_section_hover_css( $attributes, 'Tablet' ), |
| 49 | - $this->get_feedback_section_hover_css( $attributes, 'Mobile' ) | |
| 52 | + $this->get_feedback_section_hover_css( $attributes, 'Mobile' ), | |
| 53 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_section_hover_css( $attributes, $device ); } ) | |
| 50 | 54 | ); |
| 51 | 55 | $css_generator->add_class_styles( |
| 52 | 56 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-avg-rating', |
| 53 | 57 | $this->get_avg_rating_css( $attributes ), |
| 54 | 58 | $this->get_avg_rating_css( $attributes, 'Tablet' ), |
| 55 | - $this->get_avg_rating_css( $attributes, 'Mobile' ) | |
| 59 | + $this->get_avg_rating_css( $attributes, 'Mobile' ), | |
| 60 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_avg_rating_css( $attributes, $device ); } ) | |
| 56 | 61 | ); |
| 57 | 62 | $css_generator->add_class_styles( |
| 58 | 63 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-avg-rating:hover', |
| 59 | 64 | $this->get_avg_rating_hover_css( $attributes, '' ), |
| 60 | 65 | $this->get_avg_rating_hover_css( $attributes, 'Tablet' ), |
| 61 | - $this->get_avg_rating_hover_css( $attributes, 'Mobile' ) | |
| 66 | + $this->get_avg_rating_hover_css( $attributes, 'Mobile' ), | |
| 67 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_avg_rating_hover_css( $attributes, $device ); } ) | |
| 62 | 68 | ); |
| 63 | 69 | $css_generator->add_class_styles( |
| 64 | 70 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-avg-rating-html .academy-icon::before', |
| 65 | 71 | $this->get_rating_star_css( $attributes ), |
| 66 | 72 | $this->get_rating_star_css( $attributes, 'Tablet' ), |
| 67 | - $this->get_rating_star_css( $attributes, 'Mobile' ) | |
| 73 | + $this->get_rating_star_css( $attributes, 'Mobile' ), | |
| 74 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_star_css( $attributes, $device ); } ) | |
| 68 | 75 | ); |
| 69 | 76 | $css_generator->add_class_styles( |
| 70 | 77 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-avg-rating-html .academy-icon:hover::before', |
| 71 | 78 | $this->get_rating_star_hover_css( $attributes, '' ), |
| 72 | 79 | $this->get_rating_star_hover_css( $attributes, 'Tablet' ), |
| 73 | - $this->get_rating_star_hover_css( $attributes, 'Mobile' ) | |
| 80 | + $this->get_rating_star_hover_css( $attributes, 'Mobile' ), | |
| 81 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_rating_star_hover_css( $attributes, $device ); } ) | |
| 74 | 82 | ); |
| 75 | 83 | $css_generator->add_class_styles( |
| 76 | 84 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-avg-rating-total', |
| 77 | 85 | $this->get_total_rating_css( $attributes, '' ), |
| 78 | 86 | $this->get_total_rating_css( $attributes, 'Tablet' ), |
| 79 | - $this->get_total_rating_css( $attributes, 'Mobile' ) | |
| 87 | + $this->get_total_rating_css( $attributes, 'Mobile' ), | |
| 88 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_total_rating_css( $attributes, $device ); } ) | |
| 80 | 89 | ); |
| 81 | 90 | $css_generator->add_class_styles( |
| 82 | 91 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-avg-rating-total:hover', |
| 83 | 92 | $this->get_total_rating_hover_css( $attributes, '' ), |
| 84 | 93 | $this->get_total_rating_hover_css( $attributes, 'Tablet' ), |
| 85 | - $this->get_total_rating_hover_css( $attributes, 'Mobile' ) | |
| 94 | + $this->get_total_rating_hover_css( $attributes, 'Mobile' ), | |
| 95 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_total_rating_hover_css( $attributes, $device ); } ) | |
| 86 | 96 | ); |
| 87 | 97 | $css_generator->add_class_styles( |
| 88 | 98 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-col, |
| 89 | 99 | {{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-label, |
| @@ -89,9 +99,10 @@ | ||
| 89 | 99 | {{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-label, |
| 90 | 100 | {{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-label span', |
| 91 | 101 | $this->get_feedback_css( $attributes, '' ), |
| 92 | 102 | $this->get_feedback_css( $attributes, 'Tablet' ), |
| 93 | - $this->get_feedback_css( $attributes, 'Mobile' ) | |
| 103 | + $this->get_feedback_css( $attributes, 'Mobile' ), | |
| 104 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_css( $attributes, $device ); } ) | |
| 94 | 105 | ); |
| 95 | 106 | $css_generator->add_class_styles( |
| 96 | 107 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-col:hover, |
| 97 | 108 | {{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-label:hover, |
| @@ -97,45 +108,52 @@ | ||
| 97 | 108 | {{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-label:hover, |
| 98 | 109 | {{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-label span:hover', |
| 99 | 110 | $this->get_feedback_hover_css( $attributes, '' ), |
| 100 | 111 | $this->get_feedback_hover_css( $attributes, 'Tablet' ), |
| 101 | - $this->get_feedback_hover_css( $attributes, 'Mobile' ) | |
| 112 | + $this->get_feedback_hover_css( $attributes, 'Mobile' ), | |
| 113 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_feedback_hover_css( $attributes, $device ); } ) | |
| 102 | 114 | ); |
| 103 | 115 | $css_generator->add_class_styles( |
| 104 | 116 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-icon', |
| 105 | 117 | $this->get_start_css( $attributes, '' ), |
| 106 | 118 | $this->get_start_css( $attributes, 'Tablet' ), |
| 107 | - $this->get_start_css( $attributes, 'Mobile' ) | |
| 119 | + $this->get_start_css( $attributes, 'Mobile' ), | |
| 120 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_start_css( $attributes, $device ); } ) | |
| 108 | 121 | ); |
| 109 | 122 | $css_generator->add_class_styles( |
| 110 | 123 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-icon:hover', |
| 111 | 124 | $this->get_start_hover_css( $attributes, '' ), |
| 112 | 125 | $this->get_start_hover_css( $attributes, 'Tablet' ), |
| 113 | - $this->get_start_hover_css( $attributes, 'Mobile' ) | |
| 126 | + $this->get_start_hover_css( $attributes, 'Mobile' ), | |
| 127 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_start_hover_css( $attributes, $device ); } ) | |
| 114 | 128 | ); |
| 115 | 129 | $css_generator->add_class_styles( |
| 116 | 130 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-fill', |
| 117 | 131 | $this->get_fill_css( $attributes, '' ), |
| 118 | 132 | $this->get_fill_css( $attributes, 'Tablet' ), |
| 119 | - $this->get_fill_css( $attributes, 'Mobile' ) | |
| 133 | + $this->get_fill_css( $attributes, 'Mobile' ), | |
| 134 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_fill_css( $attributes, $device ); } ) | |
| 120 | 135 | ); |
| 121 | 136 | $css_generator->add_class_styles( |
| 122 | 137 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-fill:hover', |
| 123 | 138 | $this->get_fill_hover_css( $attributes, '' ), |
| 124 | 139 | $this->get_fill_hover_css( $attributes, 'Tablet' ), |
| 125 | - $this->get_fill_hover_css( $attributes, 'Mobile' ) | |
| 140 | + $this->get_fill_hover_css( $attributes, 'Mobile' ), | |
| 141 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_fill_hover_css( $attributes, $device ); } ) | |
| 126 | 142 | ); |
| 127 | 143 | $css_generator->add_class_styles( |
| 128 | 144 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-fill-bar', |
| 129 | 145 | $this->get_active_fill_css( $attributes, '' ), |
| 130 | 146 | $this->get_active_fill_css( $attributes, 'Tablet' ), |
| 131 | - $this->get_active_fill_css( $attributes, 'Mobile' ) | |
| 147 | + $this->get_active_fill_css( $attributes, 'Mobile' ), | |
| 148 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_active_fill_css( $attributes, $device ); } ) | |
| 132 | 149 | ); |
| 133 | 150 | $css_generator->add_class_styles( |
| 134 | 151 | '{{WRAPPER}} .academy-single-course__content-item--feedback .academy-student-course-feedback-ratings .academy-ratings-list-item .academy-ratings-list-item-fill-bar:hover', |
| 135 | 152 | $this->get_active_fill_hover_css( $attributes, '' ), |
| 136 | 153 | $this->get_active_fill_hover_css( $attributes, 'Tablet' ), |
| 137 | - $this->get_active_fill_hover_css( $attributes, 'Mobile' ) | |
| 154 | + $this->get_active_fill_hover_css( $attributes, 'Mobile' ), | |
| 155 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_active_fill_hover_css( $attributes, $device ); } ) | |
| 138 | 156 | ); |
| 139 | 157 | |
| 140 | 158 | return $css_generator->generate_css(); |
| 141 | 159 | } |