← All changes
|
includes/blocks/academy-enroll-content/block.php
+22
-11
2.11.0
→
2.14.0
View file →
| @@ -24,15 +24,17 @@ | ||
| 24 | 24 | $css_generator->add_class_styles( |
| 25 | 25 | '{{WRAPPER}} .academy-widget-enroll__content-lists', |
| 26 | 26 | $this->get_content_css( $attributes, '' ), |
| 27 | 27 | $this->get_content_css( $attributes, 'Tablet' ), |
| 28 | - $this->get_content_css( $attributes, 'Mobile' ) | |
| 28 | + $this->get_content_css( $attributes, 'Mobile' ), | |
| 29 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_css( $attributes, $device ); } ) | |
| 29 | 30 | ); |
| 30 | 31 | $css_generator->add_class_styles( |
| 31 | 32 | '{{WRAPPER}} .academy-widget-enroll__content-lists:hover', |
| 32 | 33 | $this->get_content_hover_css( $attributes, '' ), |
| 33 | 34 | $this->get_content_hover_css( $attributes, 'Tablet' ), |
| 34 | - $this->get_content_hover_css( $attributes, 'Mobile' ) | |
| 35 | + $this->get_content_hover_css( $attributes, 'Mobile' ), | |
| 36 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_hover_css( $attributes, $device ); } ) | |
| 35 | 37 | ); |
| 36 | 38 | $css_generator->add_class_styles( |
| 37 | 39 | '{{WRAPPER}} .academy-widget-enroll__content-lists li .academy-icon, |
| 38 | 40 | {{WRAPPER}} .academy-icon--level:before, |
| @@ -38,9 +40,10 @@ | ||
| 38 | 40 | {{WRAPPER}} .academy-icon--level:before, |
| 39 | 41 | {{WRAPPER}} .academy-icon--video-lesson:before', |
| 40 | 42 | $this->get_content_icon_css( $attributes, '' ), |
| 41 | 43 | $this->get_content_icon_css( $attributes, 'Tablet' ), |
| 42 | - $this->get_content_icon_css( $attributes, 'Mobile' ) | |
| 44 | + $this->get_content_icon_css( $attributes, 'Mobile' ), | |
| 45 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_icon_css( $attributes, $device ); } ) | |
| 43 | 46 | ); |
| 44 | 47 | $css_generator->add_class_styles( |
| 45 | 48 | '{{WRAPPER}} .academy-widget-enroll__content-lists li .academy-icon:hover, |
| 46 | 49 | {{WRAPPER}} .academy-icon--level:hover::before, |
| @@ -46,51 +49,59 @@ | ||
| 46 | 49 | {{WRAPPER}} .academy-icon--level:hover::before, |
| 47 | 50 | {{WRAPPER}} .academy-icon--video-lesson:hover::before', |
| 48 | 51 | $this->get_content_icon_hover_css( $attributes, '' ), |
| 49 | 52 | $this->get_content_icon_hover_css( $attributes, 'Tablet' ), |
| 50 | - $this->get_content_icon_hover_css( $attributes, 'Mobile' ) | |
| 53 | + $this->get_content_icon_hover_css( $attributes, 'Mobile' ), | |
| 54 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_icon_hover_css( $attributes, $device ); } ) | |
| 51 | 55 | ); |
| 52 | 56 | $css_generator->add_class_styles( |
| 53 | 57 | '{{WRAPPER}} .academy-widget-enroll__content-lists li', |
| 54 | 58 | $this->get_content_list_css( $attributes, '' ), |
| 55 | 59 | $this->get_content_list_css( $attributes, 'Tablet' ), |
| 56 | - $this->get_content_list_css( $attributes, 'Mobile' ) | |
| 60 | + $this->get_content_list_css( $attributes, 'Mobile' ), | |
| 61 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_list_css( $attributes, $device ); } ) | |
| 57 | 62 | ); |
| 58 | 63 | $css_generator->add_class_styles( |
| 59 | 64 | '{{WRAPPER}} .academy-widget-enroll__content-lists li:hover', |
| 60 | 65 | $this->get_content_list_hover_css( $attributes, '' ), |
| 61 | 66 | $this->get_content_list_hover_css( $attributes, 'Tablet' ), |
| 62 | - $this->get_content_list_hover_css( $attributes, 'Mobile' ) | |
| 67 | + $this->get_content_list_hover_css( $attributes, 'Mobile' ), | |
| 68 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_content_list_hover_css( $attributes, $device ); } ) | |
| 63 | 69 | ); |
| 64 | 70 | $css_generator->add_class_styles( |
| 65 | 71 | '{{WRAPPER}} .academy-widget-enroll__wishlist-and-share .academy-btn', |
| 66 | 72 | $this->get_share_button_css( $attributes, '' ), |
| 67 | 73 | $this->get_share_button_css( $attributes, 'Tablet' ), |
| 68 | - $this->get_share_button_css( $attributes, 'Mobile' ) | |
| 74 | + $this->get_share_button_css( $attributes, 'Mobile' ), | |
| 75 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_button_css( $attributes, $device ); } ) | |
| 69 | 76 | ); |
| 70 | 77 | $css_generator->add_class_styles( |
| 71 | 78 | '{{WRAPPER}} .academy-widget-enroll__wishlist-and-share .academy-btn:hover', |
| 72 | 79 | $this->get_share_button_hover_css( $attributes, '' ), |
| 73 | 80 | $this->get_share_button_hover_css( $attributes, 'Tablet' ), |
| 74 | - $this->get_share_button_hover_css( $attributes, 'Mobile' ) | |
| 81 | + $this->get_share_button_hover_css( $attributes, 'Mobile' ), | |
| 82 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_share_button_hover_css( $attributes, $device ); } ) | |
| 75 | 83 | ); |
| 76 | 84 | $css_generator->add_class_styles( |
| 77 | 85 | '{{WRAPPER}} .academy-widget-enroll__wishlist-and-share .academy-course__wishlist', |
| 78 | 86 | $this->get_wishlist_button_css( $attributes, '' ), |
| 79 | 87 | $this->get_wishlist_button_css( $attributes, 'Tablet' ), |
| 80 | - $this->get_wishlist_button_css( $attributes, 'Mobile' ) | |
| 88 | + $this->get_wishlist_button_css( $attributes, 'Mobile' ), | |
| 89 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wishlist_button_css( $attributes, $device ); } ) | |
| 81 | 90 | ); |
| 82 | 91 | $css_generator->add_class_styles( |
| 83 | 92 | '{{WRAPPER}} .academy-widget-enroll__wishlist-and-share .academy-course__wishlist:hover', |
| 84 | 93 | $this->get_wishlist_button_hover_css( $attributes, '' ), |
| 85 | 94 | $this->get_wishlist_button_hover_css( $attributes, 'Tablet' ), |
| 86 | - $this->get_wishlist_button_hover_css( $attributes, 'Mobile' ) | |
| 95 | + $this->get_wishlist_button_hover_css( $attributes, 'Mobile' ), | |
| 96 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wishlist_button_hover_css( $attributes, $device ); } ) | |
| 87 | 97 | ); |
| 88 | 98 | $css_generator->add_class_styles( |
| 89 | 99 | '{{WRAPPER}} .academy-widget-enroll__wishlist-and-share .academy-btn i.academy-icon', |
| 90 | 100 | $this->get_button_icon_css( $attributes, '' ), |
| 91 | 101 | $this->get_button_icon_css( $attributes, 'Tablet' ), |
| 92 | - $this->get_button_icon_css( $attributes, 'Mobile' ) | |
| 102 | + $this->get_button_icon_css( $attributes, 'Mobile' ), | |
| 103 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_button_icon_css( $attributes, $device ); } ) | |
| 93 | 104 | ); |
| 94 | 105 | |
| 95 | 106 | return $css_generator->generate_css(); |
| 96 | 107 | } |