| @@ -38,9 +38,8 @@ | ||
| 38 | 38 | // Handle flash toast message for redirect_to util helper. |
| 39 | 39 | add_action( 'wp_head', array( new Utils(), 'handle_flash_message' ), 999 ); |
| 40 | 40 | |
| 41 | 41 | add_action( 'tutor_course/single/before/wrap', array( $this, 'do_auto_course_complete' ) ); |
| 42 | - add_filter( 'body_class', array( $this, 'add_kids_mode_attribute' ) ); | |
| 43 | 42 | } |
| 44 | 43 | |
| 45 | 44 | /** |
| 46 | 45 | * Do auto course complete on course details page. |
| @@ -122,26 +121,6 @@ | ||
| 122 | 121 | */ |
| 123 | 122 | public function add_menu_atts( $atts, $item, $args ) { |
| 124 | 123 | $atts['onClick'] = 'return true'; |
| 125 | 124 | return $atts; |
| 126 | - } | |
| 127 | - | |
| 128 | - /** | |
| 129 | - * Add kids mode data attribute to the <body> tag. | |
| 130 | - * | |
| 131 | - * Note: body_class filter only accepts class names, not attributes. | |
| 132 | - * | |
| 133 | - * @since 4.0.0 | |
| 134 | - * | |
| 135 | - * @param array $classes Body classes. | |
| 136 | - * | |
| 137 | - * @return array | |
| 138 | - */ | |
| 139 | - public function add_kids_mode_attribute( $classes ) { | |
| 140 | - if ( ! tutor_utils()->is_kids_mode() ) { | |
| 141 | - return $classes; | |
| 142 | - } | |
| 143 | - | |
| 144 | - echo ' data-tutor-ui="kids"'; | |
| 145 | - return $classes; | |
| 146 | 125 | } |
| 147 | 126 | } |