From 9cc47948c768182d7ca4b206557c238dc5d53747 Mon Sep 17 00:00:00 2001 From: donnapep Date: Tue, 12 Nov 2024 13:15:26 +0000 Subject: [PATCH] deploy: da146f445e4d0ea457d6b29fc0514e672d812b7b --- ...n_class-sensei-learner-management.php.html | 4 +-- includes_class-sensei-analysis.php.html | 2 +- includes_class-sensei-grading.php.html | 2 +- includes_class-sensei-lesson.php.html | 2 +- includes_class-sensei-posttypes.php.html | 28 ++++++++++++++++++- includes_class-sensei-quiz.php.html | 2 +- includes_class-sensei-settings-api.php.html | 2 +- includes_class-sensei-teacher.php.html | 2 +- sensei_%7B$post_type%7D_initial_publish.html | 2 +- sensei_course_category_slug.html | 2 +- sensei_course_slug.html | 2 +- sensei_learners_allowed_user_ids.html | 2 +- sensei_lesson_show_actions.html | 2 +- sensei_lesson_slug.html | 2 +- sensei_lesson_tag_slug.html | 2 +- sensei_messages_slug.html | 2 +- sensei_multiple_question_slug.html | 2 +- sensei_pro_groups_menu_item.html | 2 +- sensei_question_category_slug.html | 2 +- sensei_question_type_slug.html | 2 +- sensei_quiz_slug.html | 2 +- sensei_quiz_type_slug.html | 2 +- sensei_register_post_type_course.html | 2 +- sensei_register_post_type_lesson.html | 2 +- sensei_register_post_type_question.html | 2 +- sensei_register_post_type_quiz.html | 2 +- sensei_register_post_type_sensei_message.html | 2 +- sensei_student_groups_hide.html | 2 +- sensei_teacher_course_ids.html | 2 +- 29 files changed, 56 insertions(+), 30 deletions(-) diff --git a/includes_admin_class-sensei-learner-management.php.html b/includes_admin_class-sensei-learner-management.php.html index 656e7028d0..52cb326e56 100644 --- a/includes_admin_class-sensei-learner-management.php.html +++ b/includes_admin_class-sensei-learner-management.php.html @@ -131,7 +131,7 @@

Source: includes/admin/class-sensei-learner-management.ph /** * Graceful fallback for deprecated properties. * - * @since $$next-version$$ + * @since 4.24.4 * * @param string $key The key to get. * @@ -755,7 +755,7 @@

Source: includes/admin/class-sensei-learner-management.ph /** * 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 * diff --git a/includes_class-sensei-analysis.php.html b/includes_class-sensei-analysis.php.html index 56566a90b3..580ec8516e 100644 --- a/includes_class-sensei-analysis.php.html +++ b/includes_class-sensei-analysis.php.html @@ -110,7 +110,7 @@

Source: includes/class-sensei-analysis.php

/** * Get the screen name. * - * @since $$next-version$$ + * @since 4.24.4 * * @return string */ diff --git a/includes_class-sensei-grading.php.html b/includes_class-sensei-grading.php.html index ec79ddd88e..2888ef93ec 100644 --- a/includes_class-sensei-grading.php.html +++ b/includes_class-sensei-grading.php.html @@ -85,7 +85,7 @@

Source: includes/class-sensei-grading.php

/** * Graceful fallback for deprecated properties. * - * @since $$next-version$$ + * @since 4.24.4 * * @param string $key The key to get. * diff --git a/includes_class-sensei-lesson.php.html b/includes_class-sensei-lesson.php.html index 47b6ef6516..06b997c3c3 100644 --- a/includes_class-sensei-lesson.php.html +++ b/includes_class-sensei-lesson.php.html @@ -5110,7 +5110,7 @@

Source: includes/class-sensei-lesson.php

/** * Filters if the lesson actions should be shown. * - * @since $$next-version$$ + * @since 4.24.4 * * @hook sensei_lesson_show_actions * diff --git a/includes_class-sensei-posttypes.php.html b/includes_class-sensei-posttypes.php.html index f8d3d8f08b..47e9f65c67 100644 --- a/includes_class-sensei-posttypes.php.html +++ b/includes_class-sensei-posttypes.php.html @@ -32,6 +32,9 @@

Source: includes/class-sensei-posttypes.php

<?php
+
+use Sensei\Internal\Emails\Email_Post_Type;
+
 if ( ! defined( 'ABSPATH' ) ) {
 	exit; // Exit if accessed directly
 }
@@ -144,6 +147,7 @@ 

Source: includes/class-sensei-posttypes.php

// 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' ] ); @@ -161,7 +165,7 @@

Source: includes/class-sensei-posttypes.php

/** * Graceful fallback for deprecated properties. * - * @since $$next-version$$ + * @since 4.24.4 * * @param string $key The key to get. * @@ -210,6 +214,28 @@

Source: includes/class-sensei-posttypes.php

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. * diff --git a/includes_class-sensei-quiz.php.html b/includes_class-sensei-quiz.php.html index 515126c97b..4894036c35 100644 --- a/includes_class-sensei-quiz.php.html +++ b/includes_class-sensei-quiz.php.html @@ -146,7 +146,7 @@

Source: includes/class-sensei-quiz.php

* * @internal * - * @since $$next-version$$ + * @since 4.24.4 * @return void */ public function enqueue_styles() { diff --git a/includes_class-sensei-settings-api.php.html b/includes_class-sensei-settings-api.php.html index e3feaadfdf..360f8df248 100644 --- a/includes_class-sensei-settings-api.php.html +++ b/includes_class-sensei-settings-api.php.html @@ -173,7 +173,7 @@

Source: includes/class-sensei-settings-api.php

/** * Graceful fallback for deprecated properties. * - * @since $$next-version$$ + * @since 4.24.4 * * @param string $key The key to get. * diff --git a/includes_class-sensei-teacher.php.html b/includes_class-sensei-teacher.php.html index 5cc1d326ec..80ba18cbf0 100644 --- a/includes_class-sensei-teacher.php.html +++ b/includes_class-sensei-teacher.php.html @@ -874,7 +874,7 @@

Source: includes/class-sensei-teacher.php

/** * Filter the course IDs associated with a given teacher. * - * @since $$next-version$$ + * @since 4.24.4 * * @hook sensei_teacher_course_ids * diff --git a/sensei_%7B$post_type%7D_initial_publish.html b/sensei_%7B$post_type%7D_initial_publish.html index 06a9c4d196..b9e23c1a36 100644 --- a/sensei_%7B$post_type%7D_initial_publish.html +++ b/sensei_%7B$post_type%7D_initial_publish.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_course_category_slug.html b/sensei_course_category_slug.html index 3efdc56715..5c160c079b 100644 --- a/sensei_course_category_slug.html +++ b/sensei_course_category_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_course_slug.html b/sensei_course_slug.html index 277ca6db24..c98c784ed1 100644 --- a/sensei_course_slug.html +++ b/sensei_course_slug.html @@ -315,7 +315,7 @@
Parameters:
Source:
diff --git a/sensei_learners_allowed_user_ids.html b/sensei_learners_allowed_user_ids.html index 497ee9077a..1cb19dcd25 100644 --- a/sensei_learners_allowed_user_ids.html +++ b/sensei_learners_allowed_user_ids.html @@ -142,7 +142,7 @@
Parameters:
Since:
-
  • $$next-version$$
+
  • 4.24.4
diff --git a/sensei_lesson_show_actions.html b/sensei_lesson_show_actions.html index c678e3dce6..5b661ff651 100644 --- a/sensei_lesson_show_actions.html +++ b/sensei_lesson_show_actions.html @@ -164,7 +164,7 @@
Parameters:
Since:
-
  • $$next-version$$
+
  • 4.24.4
diff --git a/sensei_lesson_slug.html b/sensei_lesson_slug.html index 3cba49794e..60bedc380c 100644 --- a/sensei_lesson_slug.html +++ b/sensei_lesson_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_lesson_tag_slug.html b/sensei_lesson_tag_slug.html index c5dcf7747b..093a1350c0 100644 --- a/sensei_lesson_tag_slug.html +++ b/sensei_lesson_tag_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_messages_slug.html b/sensei_messages_slug.html index 6b6863e1e4..5f264ee14c 100644 --- a/sensei_messages_slug.html +++ b/sensei_messages_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_multiple_question_slug.html b/sensei_multiple_question_slug.html index cc355b5ed8..20a654390b 100644 --- a/sensei_multiple_question_slug.html +++ b/sensei_multiple_question_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_pro_groups_menu_item.html b/sensei_pro_groups_menu_item.html index 60333890e4..4a1a61cc8d 100644 --- a/sensei_pro_groups_menu_item.html +++ b/sensei_pro_groups_menu_item.html @@ -95,7 +95,7 @@

do_action( 'sensei_pro_groups_
Source:
diff --git a/sensei_question_category_slug.html b/sensei_question_category_slug.html index 3176801c05..b276c74361 100644 --- a/sensei_question_category_slug.html +++ b/sensei_question_category_slug.html @@ -141,7 +141,7 @@

Parameters:
Source:
diff --git a/sensei_question_type_slug.html b/sensei_question_type_slug.html index db593d4575..dcd2cff5ba 100644 --- a/sensei_question_type_slug.html +++ b/sensei_question_type_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_quiz_slug.html b/sensei_quiz_slug.html index 3e4390f7ed..0bbe41561e 100644 --- a/sensei_quiz_slug.html +++ b/sensei_quiz_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_quiz_type_slug.html b/sensei_quiz_type_slug.html index 194e0d1c07..c07beb4394 100644 --- a/sensei_quiz_type_slug.html +++ b/sensei_quiz_type_slug.html @@ -141,7 +141,7 @@
Parameters:
Source:
diff --git a/sensei_register_post_type_course.html b/sensei_register_post_type_course.html index bd534c8e84..fe6d1bada3 100644 --- a/sensei_register_post_type_course.html +++ b/sensei_register_post_type_course.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_register_post_type_lesson.html b/sensei_register_post_type_lesson.html index afb0d546d5..ed08e4493d 100644 --- a/sensei_register_post_type_lesson.html +++ b/sensei_register_post_type_lesson.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_register_post_type_question.html b/sensei_register_post_type_question.html index 897117b530..352fc4dc36 100644 --- a/sensei_register_post_type_question.html +++ b/sensei_register_post_type_question.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_register_post_type_quiz.html b/sensei_register_post_type_quiz.html index 7eee57fb89..9721c981dd 100644 --- a/sensei_register_post_type_quiz.html +++ b/sensei_register_post_type_quiz.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_register_post_type_sensei_message.html b/sensei_register_post_type_sensei_message.html index dc417f65fc..a87ff9cec9 100644 --- a/sensei_register_post_type_sensei_message.html +++ b/sensei_register_post_type_sensei_message.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_student_groups_hide.html b/sensei_student_groups_hide.html index 9d5b413c5d..8cecaead2f 100644 --- a/sensei_student_groups_hide.html +++ b/sensei_student_groups_hide.html @@ -144,7 +144,7 @@
Parameters:
Source:
diff --git a/sensei_teacher_course_ids.html b/sensei_teacher_course_ids.html index 4d5681b2e6..b2f50ed8a9 100644 --- a/sensei_teacher_course_ids.html +++ b/sensei_teacher_course_ids.html @@ -141,7 +141,7 @@
Parameters:
Since:
-
  • $$next-version$$
+
  • 4.24.4