Skip to content

Commit

Permalink
deploy: da146f4
Browse files Browse the repository at this point in the history
  • Loading branch information
donnapep committed Nov 12, 2024
1 parent 075ea46 commit 9cc4794
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 30 deletions.
4 changes: 2 additions & 2 deletions includes_admin_class-sensei-learner-management.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1 class="page-title">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.
*
Expand Down Expand Up @@ -755,7 +755,7 @@ <h1 class="page-title">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
*
Expand Down
2 changes: 1 addition & 1 deletion includes_class-sensei-analysis.php.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h1 class="page-title">Source: includes/class-sensei-analysis.php</h1>
/**
* 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.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h1 class="page-title">Source: includes/class-sensei-grading.php</h1>
/**
* 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.html
Original file line number Diff line number Diff line change
Expand Up @@ -5110,7 +5110,7 @@ <h1 class="page-title">Source: includes/class-sensei-lesson.php</h1>
/**
* 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.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ <h1 class="page-title">Source: includes/class-sensei-posttypes.php</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>&lt;?php

use Sensei\Internal\Emails\Email_Post_Type;

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
Expand Down Expand Up @@ -144,6 +147,7 @@ <h1 class="page-title">Source: includes/class-sensei-posttypes.php</h1>

// 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 @@ -161,7 +165,7 @@ <h1 class="page-title">Source: includes/class-sensei-posttypes.php</h1>
/**
* Graceful fallback for deprecated properties.
*
* @since $$next-version$$
* @since 4.24.4
*
* @param string $key The key to get.
*
Expand Down Expand Up @@ -210,6 +214,28 @@ <h1 class="page-title">Source: includes/class-sensei-posttypes.php</h1>
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.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h1 class="page-title">Source: includes/class-sensei-quiz.php</h1>
*
* @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.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h1 class="page-title">Source: includes/class-sensei-settings-api.php</h1>
/**
* 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.html
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ <h1 class="page-title">Source: includes/class-sensei-teacher.php</h1>
/**
* Filter the course IDs associated with a given teacher.
*
* @since $$next-version$$
* @since 4.24.4
*
* @hook sensei_teacher_course_ids
*
Expand Down
2 changes: 1 addition & 1 deletion sensei_%7B$post_type%7D_initial_publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line1339">line 1339</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line1365">line 1365</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_course_category_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line691">line 691</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line717">line 717</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_course_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line249">line 249</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line275">line 275</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_learners_allowed_user_ids.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h5>Parameters:</h5>


<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>$$next-version$$</li></ul></dd>
<dd class="tag-since"><ul class="dummy"><li>4.24.4</li></ul></dd>



Expand Down
2 changes: 1 addition & 1 deletion sensei_lesson_show_actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h5>Parameters:</h5>


<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>$$next-version$$</li></ul></dd>
<dd class="tag-since"><ul class="dummy"><li>4.24.4</li></ul></dd>



Expand Down
2 changes: 1 addition & 1 deletion sensei_lesson_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line393">line 393</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line419">line 419</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_lesson_tag_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line895">line 895</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line921">line 921</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_messages_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line596">line 596</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line622">line 622</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_multiple_question_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line552">line 552</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line578">line 578</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_pro_groups_menu_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h4 class="name" id="sensei_pro_groups_menu_item">do_action( 'sensei_pro_groups_

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line1213">line 1213</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line1239">line 1239</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_question_category_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line842">line 842</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line868">line 868</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_question_type_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line787">line 787</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line813">line 813</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_quiz_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line452">line 452</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line478">line 478</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_quiz_type_slug.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line738">line 738</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line764">line 764</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_register_post_type_course.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line273">line 273</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line299">line 299</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_register_post_type_lesson.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line417">line 417</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line443">line 443</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_register_post_type_question.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line521">line 521</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line547">line 547</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_register_post_type_quiz.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line476">line 476</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line502">line 502</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_register_post_type_sensei_message.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line621">line 621</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line647">line 647</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_student_groups_hide.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line1222">line 1222</a>
<a href="includes_class-sensei-posttypes.php.html">includes/class-sensei-posttypes.php</a>, <a href="includes_class-sensei-posttypes.php.html#line1248">line 1248</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion sensei_teacher_course_ids.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ <h5>Parameters:</h5>


<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li>$$next-version$$</li></ul></dd>
<dd class="tag-since"><ul class="dummy"><li>4.24.4</li></ul></dd>



Expand Down

0 comments on commit 9cc4794

Please sign in to comment.