Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.24.4 #7711

Merged
merged 7 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
*** Changelog ***

## 4.24.4 - 2024-11-12
### Security
- Messages and emails accessible using the search REST API

### Added
- Allow additional users to manage students [#7700](https://github.com/Automattic/sensei/pull/7700)

### Fixed
- Horizontal scroll on Course page when using Course theme [#7705](https://github.com/Automattic/sensei/pull/7705)
- Loading some translations too early which generates a warning on WP 6.7 [#7701](https://github.com/Automattic/sensei/pull/7701)
- PHP deprecation notice in View Results block [#7680](https://github.com/Automattic/sensei/pull/7680)
- Hello elementor theme throwing 404 when rendering the Courses archive page [#7683](https://github.com/Automattic/sensei/pull/7683)
- Label on course complete email received by the teacher [#7672](https://github.com/Automattic/sensei/pull/7672)
- Timed quiz not stopping when time ends [#7675](https://github.com/Automattic/sensei/pull/7675)

### Development
- Added a hook to conditionally render the lesson actions in the frontend [#7677](https://github.com/Automattic/sensei/pull/7677)
- Filter course IDs associated with a given teacher [#7702](https://github.com/Automattic/sensei/pull/7702)

## 4.24.3 - 2024-08-22
### Fixed
- Ensure quiz description is displayed to the student [#7669](https://github.com/Automattic/sensei/pull/7669)
Expand Down
4 changes: 0 additions & 4 deletions changelog/add-filter-student-management-teacher-ids

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-archive-404-issue-in-hello-elementor

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-co-teachers-get-students

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-course-horizontal-scroll-with-course-theme

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-early-translations

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-teacher-student-complete-email-label

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-timed-quiz-input-not-stopping-when-time-ends

This file was deleted.

4 changes: 0 additions & 4 deletions changelog/fix-view-results-block-deprecated-notice

This file was deleted.

4 changes: 2 additions & 2 deletions includes/admin/class-sensei-learner-management.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function __construct( $file ) {
/**
* Graceful fallback for deprecated properties.
*
* @since $$next-version$$
* @since 4.24.4
*
* @param string $key The key to get.
*
Expand Down Expand Up @@ -722,7 +722,7 @@ private function can_user_manage_students( int $course_id, int $post_author ): b
/**
* Filter the user IDs that have permission to manage students in a given course.
*
* @since $$next-version$$
* @since 4.24.4
*
* @hook sensei_learners_allowed_user_ids
*
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __get( $key ) {
/**
* Get the screen name.
*
* @since $$next-version$$
* @since 4.24.4
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-grading.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct( $file ) {
/**
* Graceful fallback for deprecated properties.
*
* @since $$next-version$$
* @since 4.24.4
*
* @param string $key The key to get.
*
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-lesson.php
Original file line number Diff line number Diff line change
Expand Up @@ -5077,7 +5077,7 @@ public static function should_show_lesson_actions( int $lesson_id, int $user_id
/**
* Filters if the lesson actions should be shown.
*
* @since $$next-version$$
* @since 4.24.4
*
* @hook sensei_lesson_show_actions
*
Expand Down
28 changes: 27 additions & 1 deletion includes/class-sensei-posttypes.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

use Sensei\Internal\Emails\Email_Post_Type;

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
Expand Down Expand Up @@ -111,6 +114,7 @@ public function __construct() {

// REST API functionality.
add_action( 'rest_api_init', [ $this, 'setup_rest_api' ] );
add_filter( 'rest_post_search_query', [ $this, 'exclude_post_types_from_rest_search' ] );

// Add protections on feeds for certain CPTs.
add_action( 'wp', [ $this, 'protect_feeds' ] );
Expand All @@ -128,7 +132,7 @@ public function __construct() {
/**
* Graceful fallback for deprecated properties.
*
* @since $$next-version$$
* @since 4.24.4
*
* @param string $key The key to get.
*
Expand Down Expand Up @@ -177,6 +181,28 @@ public function setup_rest_api() {
add_filter( 'post_password_required', [ $this, 'lesson_is_protected' ], 10, 2 );
}

/**
* Exclude post types from the REST API search.
*
* @since 4.24.4
* @access private
*
* @param array $args The query args.
* @return array The modified query args.
*/
public function exclude_post_types_from_rest_search( $args ) {
$excluded_post_types = [
'sensei_message',
Email_Post_Type::POST_TYPE,
];

if ( isset( $args['post_type'] ) ) {
$args['post_type'] = array_diff( (array) $args['post_type'], $excluded_post_types );
}

return $args;
}

/**
* Add protection to Sensei post type feeds.
*
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function __construct( $file = __FILE__ ) {
*
* @internal
*
* @since $$next-version$$
* @since 4.24.4
* @return void
*/
public function enqueue_styles() {
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-settings-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function __construct() {
/**
* Graceful fallback for deprecated properties.
*
* @since $$next-version$$
* @since 4.24.4
*
* @param string $key The key to get.
*
Expand Down
2 changes: 1 addition & 1 deletion includes/class-sensei-teacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public function filter_learners_query( $learners_sql ) {
/**
* Filter the course IDs associated with a given teacher.
*
* @since $$next-version$$
* @since 4.24.4
*
* @hook sensei_teacher_course_ids
*
Expand Down
Loading
Loading