Hooks and filters
Licence: updates need a licence key, entered in Reign Settings > License. Every feature works without it.
| Name | Type | What it does |
|---|---|---|
reign_sn_before_{part} |
action | Runs before a template. {part} is the path without .php, for example course/reviews. Receives the template variables. |
reign_sn_after_{part} |
action | Runs after a template, same arguments. |
reign_sn_cover_url |
filter | Changes the cover picture URL. Arguments: $url, $course_id. |
reign_sn_card_price |
filter | Supplies the price HTML for a course card. Arguments: $html, $course_id. Return an empty string for no chip. |
reign_sensei_courses_tab_visible |
filter | Whether a member’s Courses tab shows to a viewer; false hides the menu item and the page. Arguments: $visible, $profile_user_id, $viewer_id. |
reign_sensei_community_profile_courses_data |
filter | Changes the values the Courses tab template receives. Arguments: $data, $user_id. |
reign_sensei_activity_text |
filter | Changes the activity sentence; return an empty string to post nothing. Arguments: $html, $type, $user_id, $course_id. |
The add-on also uses these Reign theme filters to place its parts: reign_course_layout_sections, reign_course_rating, reign_course_reviews_html and reign_course_media_html (it drops the enrol-card photo in Cover). The last three are built by the theme as reign_course_{method}, so searching the theme for the literal names finds nothing.
The theme filter reign_course_layout_enabled (return false to skip the Reign course layout for a course) decides whether any of the layouts apply.
Hooks the add-on uses
Section titled “Hooks the add-on uses”reign_licensed_products (the licence row), alter_reign_admin_tabs and render_theme_options_page_for_sensei (the settings tab, shown only while Sensei LMS is active), comments_open (off on courses), comments_template (empty on courses: reviews print in the Reviews section), body_class (adds reign-sn-cover), render_block (Sensei Course List cards), and the admin_post actions reign_sn_review, reign_sn_review_delete and their nopriv twin. These are the only endpoints; the add-on registers no REST routes, shortcodes, AJAX handlers or blocks. Saving settings needs manage_options and the Reign options nonce.
Example
Section titled “Example”add_filter( 'reign_sn_card_price', function ( $html, $course_id ) { return get_post_meta( $course_id, 'my_price', true ) ?: $html;}, 10, 2 );Add a line after a template part
Section titled “Add a line after a template part”The before and after actions receive the template variables, so you can add markup without a copy. This adds a note under the card parts of every course in the “design” category. The / stays in the hook name.
add_action( 'reign_sn_after_card/course-card-parts', function ( $args ) { if ( has_term( 'design', 'course-category', $args['course_id'] ) ) { echo '<p class="my-card-note">' . esc_html__( 'Part of the design track', 'reign-child' ) . '</p>'; }} );Course List block cards for design courses then show “Part of the design track”.
More task-based snippets, and one full template override, are in Common changes with a few lines of code.

