Skip to content

Every action and filter the add-on fires. Tutor LMS’s own hooks (tutor_course/loop/*, tutor_course/single/*) keep firing as Tutor ships them; the add-on adds to them and never removes one.

Action Arguments When
reign_tutor_loaded none Tutor LMS 3.0 and Reign 8.1.0 are present and the add-on has started.
reign_tutor_before_{part} array $data Before a template part prints.
reign_tutor_after_{part} array $data After a template part prints.

Parts: card_meta, course_related, categories_categories.

Filter Arguments Returns
reign_tutor_default_settings array $defaults Defaults for every setting, keyed by setting name.
reign_tutor_course_template string $template, int $course_id reign, spotlight or academy.
reign_tutor_course_sections array $sections, string $template, Reign_Course_Adapter $adapter Course page sections after the template arrangement. Same shape as the theme’s reign_course_layout_sections.
reign_tutor_related_query_args array $args, int $course_id WP_Query arguments for related courses.
reign_tutor_card_style string $style classic, soft or list.
reign_tutor_card_parts string[] $parts Card parts that show: instructor, category, duration, progress.
reign_tutor_card_students bool $show false hides the enrolled student count on cards.
reign_tutor_profile_sections array $sections, int $user_id Profile course lists, label keyed by enrolled and teaching.
reign_tutor_courses_tab_visible bool $visible, int $profile_user_id, int $viewer_id false hides a member’s Courses tab (menu item and page) from that viewer.
reign_tutor_member_id int $user_id Whose courses my_courses="yes" shows when no user is given and the page is not a profile.
reign_course_categories_max int $max Most categories [reign_course_categories count="0"] shows. Default 100.
reign_tutor_{part}_data array $data Values a template part receives.
reign_tutor_locate_template string $path, string $part Full path of the template file.

Give one course the Academy template:

add_filter( 'reign_tutor_course_template', function ( $template, $course_id ) {
return 42 === $course_id ? 'academy' : $template;
}, 10, 2 );

Move the instructor section into the side column:

add_filter( 'reign_tutor_course_sections', function ( $sections ) {
if ( isset( $sections['instructor'] ) ) {
$sections['instructor']['area'] = 'card';
}
return $sections;
} );

Show related courses from the same instructor instead of the same category:

add_filter( 'reign_tutor_related_query_args', function ( $args, $course_id ) {
unset( $args['post__in'] );
$args['author'] = (int) get_post_field( 'post_author', $course_id );
$args['post__not_in'] = array( $course_id );
$args['orderby'] = 'date';
return $args;
}, 10, 2 );

Hide the Teaching list on profiles:

add_filter( 'reign_tutor_profile_sections', function ( $sections ) {
unset( $sections['teaching'] );
return $sections;
} );

Change the related courses default heading for the whole site:

add_filter( 'reign_tutor_default_settings', function ( $defaults ) {
$defaults['related_title'] = 'You might also like';
return $defaults;
} );

More task-based snippets, and one full template override, are in Common changes with a few lines of code.