LifterLMS Filters

Filter Overview

# Top

If you’re not sure what a filter is and want to get started, take a look at the WordPress Codex reference on filters and the core function, add_filter().

Filters can be added to your theme’s or child theme’s functions.php file or to a site-specific plugin. We’ve created a very basic site specific for this purpose, you can get it for free here.

NOTE: This is a largely incomplete list of filters available with LifterLMS. We’re in the process of migrating our filter documentation from our old documentation hub.

If you’re a developer and you’re looking to filter something, you probably can. If it’s not listed here please check the codebase first and then submit a support ticket if you need help locating a filter.

lifterlms_admin_menu_access

# Top

Customize the WordPress capability required to access LifterLMS settings menu and pages.

lifterlms_admin_{$post_type}_access

# Top

Customize the WordPress capability which a user requires in order to see the various LifterLMS memberships  screen on the main LifterLMS menu.

The following post types can be managed with this filter:

  • Achievements (lifterlms_admin_achievements_access)
  • Certificates (lifterlms_admin_certificates_access)
  • Coupons (lifterlms_admin_coupons_access)
  • Courses (lifterlms_admin_courses_access)
  • Emails (lifterlms_admin_emails_access)
  • Engagements (lifterlms_admin_engagements_access)
  • Memberships (lifterlms_admin_membership_access)
  • Order (lifterlms_admin_order_access)
  • Reviews (lifterlms_admin_reviews_access)
  • Vouchers (lifterlms_admin_vouchers_access)

lifterlms_admin_{$settings}_access

# Top

Modify the WordPress capability which a user requires in order to see the LifterLMS settings screen on the main LifterLMS menu.

The following settings screens can be managed with this filter:

  • General Settings (lifterlms_admin_settings_access)
  • Reporting (lifterlms_admin_reporting_access)
  • System Report (lifterlms_admin_system_report_access)
  • Import / Export (lifterlms_admin_import_access)

lifterlms_checkout_buy_button_text

# Top

Customize the “Buy Now” text on the purchase button of the LifterLMS Checkout screen.

lifterlms_completed_transaction_message

# Top

Customize the success message displayed after a user successfully completes a LifterLMS purchase.

lifterlms_currencies

# Top

Add a custom currency to LifterLMS currencies list.

Ensure that your payment gateway(s) support the currency!

lifterlms_recurring_price_html

# Top

This filter allows you to modify the text of recurring payment pricing descriptions.

lifterlms_completed_transaction_redirect

# Top

Redirect students to a custom URL after a successful purchase.

lifterlms_get_single_price_html

# Top

This filter allows you to modify the text of single payment pricing descriptions.

llms_dashboard_recent_courses_count

# Top

Use this filter to customize the number of recent courses displayed on the main page of the LifterLMS Student Dashboard.

llms_dashboard_courses_per_page

# Top

Use this filter to customize the default number of courses displayed on each page when a student visits the “View All Courses” page on the student dashboard.

Added in version 3.5.4

lifterlms_sitewide_restriction_bypass_ids

# Top

Add additional pages to the list of pages shown to non-enrolled visitors when sitewide membership restrictions are in effect

llms_student_dashboard_default_tab

# Top

Customize the default tab displayed when student’s visit the LifterLMS Student Dashboard.

llms_get_student_dashboard_tabs

# Top

Use this filter to remove tabs from the LifterLMS Student Dashboard.

llms_gradebook_students_per_page

# Top

Customize the number of students displayed per page on the admin reporting table for “Students”.

Note that setting this number too high could result in PHP timeouts due to exhausted memory!

llms_gradebook_student-courses_per_page

# Top

Customize the number of courses per page on the admin reporting table for a student’s course list.

Note that setting this number too high could result in PHP timeouts due to exhausted memory!

llms_has_free_checkout

# Top

This filter allows you to disable quick enrollment and free checkout for free access plans. For more information see Checkout for Free Access Plans.

llms_lesson_complete_redirect

# Top

Use this filter to redirect a student to a custom url upon marking a lesson complete.

llms_membership_restricted_post_types

# Top

Use this filter to add or remove the ability for a post type to be restricted to a LifterLMS membership

llms_is_post_restricted_by_membership_skip_post_types

# Top

LifterLMS automatically skips membership restrictions checks on certain LifterLMS core post types which, by default, cannot be restricted to a membership.

You can use this filter to add or remove custom post types to or from this list.

To remove:

To add:

llms_show_preview_excerpt

# Top

Use this filter to hide the display of the Lesson short description on lesson preview tiles.

llms_student_dashboard_login_redirect

# Top

Use this filter to redirect users to a different place when they login using the Student Dashboard login form.

Admin Panel User Custom Fields

# Top

These filters allow you to add, display, save, and validate custom user meta fields as they are displayed and edited on the WordPress Admin Panel User Profile Screen.

These filters are located in “includes/admin/class.llms.admin.user.custom.fields.php”.

 

lifterlms_get_user_custom_fields #

Use this filter to add custom fields to the user’s profile on the WordPress admin panel

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

 

lifterlms_get_user_custom_field_value_{$field_id} #

Use this filter the customize the output of user field data when it is displayed on the admin panel.

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

 

lifterlms_validate_custom_user_field_{$field_id} #

Use this filter to validate custom user field data before it is saved to the database and output error messages specific to your custom field.

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

 

lifterlms_save_custom_user_field_{$field_id} #

Use this filter to filter the user submitted before it is stored in the database (after validation).

Added in LifterLMS 2.7.0, last updated LifterLMS 2.7.0

Become a Documentation Contributor

# Top

If you’re reading this you might be so passionate about LifterLMS that you want to help us document every single filter in the codebase (and more) please contact us and let us know

We’re looking for both programmers and non-programmers.

Last Updated on
Was this article helpful?