← All changes
|
includes/blocks/academy-course-curriculums/block.php
+24
-12
2.12.0
→
2.15.0
View file →
| @@ -27,75 +27,87 @@ | ||
| 27 | 27 | $css_generator->add_class_styles( |
| 28 | 28 | '{{WRAPPER}} .academy-single-course__content-item--curriculum .academy-curriculum-title', |
| 29 | 29 | $this->get_curriculum_heading_css( $attributes ), |
| 30 | 30 | $this->get_curriculum_heading_css( $attributes, 'Tablet' ), |
| 31 | - $this->get_curriculum_heading_css( $attributes, 'Mobile' ) | |
| 31 | + $this->get_curriculum_heading_css( $attributes, 'Mobile' ), | |
| 32 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_curriculum_heading_css( $attributes, $device ); } ) | |
| 32 | 33 | ); |
| 33 | 34 | $css_generator->add_class_styles( |
| 34 | 35 | '{{WRAPPER}} .academy-single-course__content-item--curriculum .academy-curriculum-title:hover', |
| 35 | 36 | $this->get_curriculum_heading_hover_css( $attributes ), |
| 36 | 37 | $this->get_curriculum_heading_hover_css( $attributes, 'Tablet' ), |
| 37 | - $this->get_curriculum_heading_hover_css( $attributes, 'Mobile' ) | |
| 38 | + $this->get_curriculum_heading_hover_css( $attributes, 'Mobile' ), | |
| 39 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_curriculum_heading_hover_css( $attributes, $device ); } ) | |
| 38 | 40 | ); |
| 39 | 41 | $css_generator->add_class_styles( |
| 40 | 42 | '{{WRAPPER}} .academy-accordion a.academy-accordion__title', |
| 41 | 43 | $this->get_sub_heading_css( $attributes ), |
| 42 | 44 | $this->get_sub_heading_css( $attributes, 'Tablet' ), |
| 43 | - $this->get_sub_heading_css( $attributes, 'Mobile' ) | |
| 45 | + $this->get_sub_heading_css( $attributes, 'Mobile' ), | |
| 46 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_sub_heading_css( $attributes, $device ); } ) | |
| 44 | 47 | ); |
| 45 | 48 | $css_generator->add_class_styles( |
| 46 | 49 | '{{WRAPPER}} .academy-accordion a.academy-accordion__title:hover', |
| 47 | 50 | $this->get_sub_heading_hover_css( $attributes ), |
| 48 | 51 | $this->get_sub_heading_hover_css( $attributes, 'Tablet' ), |
| 49 | - $this->get_sub_heading_hover_css( $attributes, 'Mobile' ) | |
| 52 | + $this->get_sub_heading_hover_css( $attributes, 'Mobile' ), | |
| 53 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_sub_heading_hover_css( $attributes, $device ); } ) | |
| 50 | 54 | ); |
| 51 | 55 | $css_generator->add_class_styles( |
| 52 | 56 | '{{WRAPPER}} .academy-lesson-list__item .academy-entry-content .academy-entry-title', |
| 53 | 57 | $this->get_lesson_title_css( $attributes ), |
| 54 | 58 | $this->get_lesson_title_css( $attributes, 'Tablet' ), |
| 55 | - $this->get_lesson_title_css( $attributes, 'Mobile' ) | |
| 59 | + $this->get_lesson_title_css( $attributes, 'Mobile' ), | |
| 60 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_lesson_title_css( $attributes, $device ); } ) | |
| 56 | 61 | ); |
| 57 | 62 | $css_generator->add_class_styles( |
| 58 | 63 | '{{WRAPPER}} .academy-lesson-list__item .academy-entry-content .academy-entry-title:hover', |
| 59 | 64 | $this->get_lesson_title_hover_css( $attributes ), |
| 60 | 65 | $this->get_lesson_title_hover_css( $attributes, 'Tablet' ), |
| 61 | - $this->get_lesson_title_hover_css( $attributes, 'Mobile' ) | |
| 66 | + $this->get_lesson_title_hover_css( $attributes, 'Mobile' ), | |
| 67 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_lesson_title_hover_css( $attributes, $device ); } ) | |
| 62 | 68 | ); |
| 63 | 69 | $css_generator->add_class_styles( |
| 64 | 70 | '{{WRAPPER}} .academy-lesson-list__item', |
| 65 | 71 | $this->get_lesson_list_css( $attributes ), |
| 66 | 72 | $this->get_lesson_list_css( $attributes, 'Tablet' ), |
| 67 | - $this->get_lesson_list_css( $attributes, 'Mobile' ) | |
| 73 | + $this->get_lesson_list_css( $attributes, 'Mobile' ), | |
| 74 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_lesson_list_css( $attributes, $device ); } ) | |
| 68 | 75 | ); |
| 69 | 76 | $css_generator->add_class_styles( |
| 70 | 77 | '{{WRAPPER}} .academy-lesson-list__item:hover', |
| 71 | 78 | $this->get_lesson_list_hover_css( $attributes ), |
| 72 | 79 | $this->get_lesson_list_hover_css( $attributes, 'Tablet' ), |
| 73 | - $this->get_lesson_list_hover_css( $attributes, 'Mobile' ) | |
| 80 | + $this->get_lesson_list_hover_css( $attributes, 'Mobile' ), | |
| 81 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_lesson_list_hover_css( $attributes, $device ); } ) | |
| 74 | 82 | ); |
| 75 | 83 | $css_generator->add_class_styles( |
| 76 | 84 | '{{WRAPPER}} .academy-lesson-list__item .academy-entry-control .academy-btn-play i', |
| 77 | 85 | $this->get_icon_css( $attributes, '' ), |
| 78 | 86 | $this->get_icon_css( $attributes, 'Tablet' ), |
| 79 | - $this->get_icon_css( $attributes, 'Mobile' ) | |
| 87 | + $this->get_icon_css( $attributes, 'Mobile' ), | |
| 88 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_css( $attributes, $device ); } ) | |
| 80 | 89 | ); |
| 81 | 90 | $css_generator->add_class_styles( |
| 82 | 91 | '{{WRAPPER}} .academy-lesson-list__item .academy-entry-control .academy-btn-play i:hover', |
| 83 | 92 | $this->get_icon_hover_css( $attributes, '' ), |
| 84 | 93 | $this->get_icon_hover_css( $attributes, 'Tablet' ), |
| 85 | - $this->get_icon_hover_css( $attributes, 'Mobile' ) | |
| 94 | + $this->get_icon_hover_css( $attributes, 'Mobile' ), | |
| 95 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_icon_hover_css( $attributes, $device ); } ) | |
| 86 | 96 | ); |
| 87 | 97 | $css_generator->add_class_styles( |
| 88 | 98 | '{{WRAPPER}} .academy-lesson-list__item .academy-entry-content .academy-icon::before', |
| 89 | 99 | $this->get_read_icon_css( $attributes, '' ), |
| 90 | 100 | $this->get_read_icon_css( $attributes, 'Tablet' ), |
| 91 | - $this->get_read_icon_css( $attributes, 'Mobile' ) | |
| 101 | + $this->get_read_icon_css( $attributes, 'Mobile' ), | |
| 102 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_read_icon_css( $attributes, $device ); } ) | |
| 92 | 103 | ); |
| 93 | 104 | $css_generator->add_class_styles( |
| 94 | 105 | '{{WRAPPER}} .academy-lesson-list__item .academy-entry-content .academy-icon:hover::before', |
| 95 | 106 | $this->get_read_icon_hover_css( $attributes, '' ), |
| 96 | 107 | $this->get_read_icon_hover_css( $attributes, 'Tablet' ), |
| 97 | - $this->get_read_icon_hover_css( $attributes, 'Mobile' ) | |
| 108 | + $this->get_read_icon_hover_css( $attributes, 'Mobile' ), | |
| 109 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_read_icon_hover_css( $attributes, $device ); } ) | |
| 98 | 110 | ); |
| 99 | 111 | |
| 100 | 112 | return $css_generator->generate_css(); |
| 101 | 113 | } |