Skip to content

Hooks and Filters

These are the filters and actions defined in LMS Notes. Use them from a child theme or a small custom plugin.

Filter Purpose Default
lcn_add_post_type Modify the list of public post types offered under “Enable notes for additional post types”. All public, publicly-queryable post types
lcn_exclude_post_type Adjust the array of post-type slugs excluded from that list. Built-in LMS/system slugs
lcn_enable_tags_display Show or hide the labels field in the note editor. true
Filter Purpose Default
lms_notes_per_page Number of notes per page in all note lists and searches. 20
lcn_bulk_notes_query_args WP_Query args used when bulk-downloading notes. Query for selected note IDs
Filter Purpose
lcn_notes_labels Filter the rendered <option> list of note labels.
lcn_note_tags Filter the rendered labels HTML shown with a note.
lcn_notes_tag Filter the term IDs matched when resolving a search term to a label.
Filter Purpose Default
lcn_get_students Filter the student list returned for an instructor. Resolved students
lcn_course_query_chunk_size Batch size for course queries (large-site tuning). 500
lcn_user_meta_query_chunk_size Batch size for student/user-meta queries. 500
Filter Purpose
lcn_template_path Base template folder looked up in the theme. Default notes/.
lcn_locate_template Filter the resolved template path.
lcn_get_template Filter the template used by lcn_get_template().
Filter Purpose
ld_notes_print_posts_title Filter the note title used in exports.
ld_notes_print_posts_before_blocks_html Prepend HTML before the exported note body.
ld_notes_print_posts_html Filter the full HTML of a printed note.
ld_notes_print_posts_header_footer_html Provide custom header/footer HTML for exports.
Action Fires
lcn_before_template_part Before a plugin template is included via lcn_get_template().
lcn_after_template_part After a plugin template is included.

Both pass $template_name, $template_path, $located, and $args.

Change how many notes appear per page:

add_filter( 'lms_notes_per_page', function () {
return 50;
} );