From 79ab61e5631edfa50d6bad7947526fd7e43b4a9f Mon Sep 17 00:00:00 2001 From: Bones Date: Thu, 16 Jun 2022 15:15:32 +0100 Subject: [PATCH] Fixes notification width on Students page --- assets/css/admin-custom.scss | 5 +---- .../admin/class-sensei-learner-management.php | 22 +++++++++---------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/assets/css/admin-custom.scss b/assets/css/admin-custom.scss index e63ba2a0f7..667bf224c7 100644 --- a/assets/css/admin-custom.scss +++ b/assets/css/admin-custom.scss @@ -162,10 +162,7 @@ div.question_boolean_fields { margin-bottom: 10px; } * Sensei custom navigation */ .sensei-custom-navigation { - display: flex; - flex-flow: column wrap; - align-items: flex-start; - gap: 20px; + display: grid; margin: 30px auto 20px; } diff --git a/includes/admin/class-sensei-learner-management.php b/includes/admin/class-sensei-learner-management.php index bd7d9b3c42..488af0fd91 100644 --- a/includes/admin/class-sensei-learner-management.php +++ b/includes/admin/class-sensei-learner-management.php @@ -105,7 +105,6 @@ public function __construct( $file ) { add_action( 'wp_ajax_remove_user_from_post', array( $this, 'remove_user_from_post' ) ); add_action( 'wp_ajax_reset_user_post', array( $this, 'reset_user_post' ) ); add_action( 'wp_ajax_sensei_json_search_users', array( $this, 'json_search_users' ) ); - // Add custom navigation. add_action( 'in_admin_header', [ $this, 'add_custom_navigation' ] ); } @@ -123,7 +122,7 @@ public function add_custom_navigation() { if ( ! $screen ) { return; } - + if ( in_array( $screen->id, [ 'course_page_sensei_learners' ], true ) && ( 'term' !== $screen->base ) ) { $this->display_students_navigation( $screen ); } @@ -136,17 +135,18 @@ public function add_custom_navigation() { */ private function display_students_navigation( WP_Screen $screen ) { ?> -
-
-
-

+
+
+
+

+
+
+ + +
-
- - - +
-