llms_filter_input( int $type, string $variable_name, int $filter = FILTER_DEFAULT, mixed $options = array() )
Gets a specific external variable by name and optionally filters it
Description #Description
This is a pluggable wrapper around native filter_input
which is plugged in the testing framework to allow easy mocking of form variables when testing form controller functions and methods.
Parameters #Parameters
- $type
-
(int) (Required) One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV.
- $variable_name
-
(string) (Required) Name of a variable to get.
- $filter
-
(int) (Optional) The ID of the filter to apply. Default is
FILTER_DEFAULT
.Default value: FILTER_DEFAULT
- $options
-
(mixed) (Optional) Associative array of options or bitwise disjunction of flags. Default is empty array. If filter accepts options, flags can be provided in "flags" field of array.
Default value: array()
Return #Return
(mixed) Value of the requested variable on success, FALSE if the filter fails, or NULL if the variable_name variable is not set. If the flag FILTER_NULL_ON_FAILURE is used, it returns FALSE if the variable is not set and NULL if the filter fails.
Source #Source
File: includes/functions/llms-functions-wrappers.php
function llms_filter_input( $type, $variable_name, $filter = FILTER_DEFAULT, $options = array() ) { return filter_input( $type, $variable_name, $filter, $options ); }
Expand full source code Collapse full source code View on GitHub
Related #Related
Used By #Used By
Used By | Description |
---|---|
includes/class-llms-block-library.php: LLMS_Block_Library::should_register() |
Determines whether or not the block should be registered. |
includes/functions/llms-functions-template-view-order.php: _llms_template_view_order_get_transactions() |
Loads transactions for the given order. |
includes/admin/post-types/post-tables/class-llms-admin-post-table-certificates.php: LLMS_Admin_Post_Table_Certificates::__construct() |
Constructor |
includes/admin/post-types/meta-boxes/class.llms.meta.box.award.engagement.submit.php: LLMS_Meta_Box_Award_Engagement_Submit::current_student_id() |
Retrieve the current student id. |
includes/llms.functions.core.php: llms_filter_input_sanitize_string() |
Function used to sanitize user input in a manner similar to the (deprecated) FILTER_SANITIZE_STRING. |
includes/abstracts/llms.abstract.post.data.php: LLMS_Abstract_Post_Data::parse_period() |
Retrieves the selected period from |
includes/class.llms.ajax.handler.php: LLMS_AJAX_Handler::check_voucher_duplicate() |
Determines if voucher codes already exist. |
includes/admin/post-types/meta-boxes/class.llms.meta.box.order.details.php: LLMS_Meta_Box_Order_Details::save_remaining_payments() |
Save remaining payment date for expiring recurring orders |
includes/forms/class-llms-forms-admin-bar.php: LLMS_Forms_Admin_Bar::get_current_location() |
Retrieve the form location for the current screen |
includes/forms/class-llms-forms-admin-bar.php: LLMS_Forms_Admin_Bar::add_menu_items() |
Add view links to the admin menu bar for qualifying users. |
includes/forms/controllers/class.llms.controller.account.php: LLMS_Controller_Account::reset_password_handler() |
Handle the submission of the password reset form. |
libraries/lifterlms-blocks/includes/class-llms-blocks-visibility.php: LLMS_Blocks_Visibility::should_filter_block() |
Determine whether or not a block’s rendering should be modified by block-level visibility settings |
libraries/lifterlms-helper/includes/class-llms-helper-admin-add-ons.php: LLMS_Helper_Admin_Add_Ons::handle_activations() |
Activate license keys with LifterLMS.com api |
libraries/lifterlms-helper/includes/class-llms-helper-admin-add-ons.php: LLMS_Helper_Admin_Add_Ons::handle_deactivations() |
Deactivate license keys with LifterLMS.com api |
libraries/lifterlms-helper/includes/class-llms-helper-betas.php: LLMS_Helper_Betas::handle_form_submit() |
Handle channel subscription saves |
includes/admin/class.llms.admin.setup.wizard.php: LLMS_Admin_Setup_Wizard::save_finish() |
Save the “Finish” step. |
includes/admin/class.llms.admin.import.php: LLMS_Admin_Import::cloud_import() |
Handle form submission of a cloud import file |
includes/admin/class.llms.admin.assets.php: LLMS_Admin_Assets::maybe_enqueue_reporting() |
Register and enqueue scripts used on and related-to reporting and analytics |
includes/class-llms-loader.php: LLMS_Loader::includes_admin() |
Includes that are required only on the admin panel |
includes/abstracts/llms-abstract-email-provider.php: LLMS_Abstract_Email_Provider::should_output_inline() |
Determine if inline scripts and styles should be output. |
includes/controllers/class.llms.controller.quizzes.php: LLMS_Controller_Quizzes::maybe_handle_reporting_actions() |
Handle quiz reporting screen actions buttons |
includes/controllers/class.llms.controller.certificates.php: LLMS_Controller_Certificates::maybe_allow_public_query() |
Modify certificate post type registration data during a certificate template export. |
includes/class.llms.template.loader.php: LLMS_Template_Loader::maybe_print_notices_on_sales_page_redirect() |
Maybe print notices after redirection. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-settings-webhooks.php: LLMS_Rest_Admin_Settings_Webhooks::get_fields() |
Get settings fields for the Keys tab. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-settings-api-keys.php: LLMS_Rest_Admin_Settings_API_Keys::get_fields() |
Get settings fields for the Keys tab. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-settings-api-keys.php: LLMS_Rest_Admin_Settings_API_Keys::save() |
Form handler to save Create / Update an API key. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-settings-api-keys.php: LLMS_Rest_Admin_Settings_API_Keys::save_create() |
Form handler to create a new API key. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-settings-api-keys.php: LLMS_Rest_Admin_Settings_API_Keys::save_update() |
Form handler to save an API key. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-form-controller.php: LLMS_REST_Admin_Form_Controller::handle_webhook_upsert() |
Handle creating/updating a webhook via admin interfaces |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-form-controller.php: LLMS_REST_Admin_Form_Controller::handle_events() |
Handles submission of admin forms & nonce links. |
libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-form-controller.php: LLMS_REST_Admin_Form_Controller::prepare_key_download() |
Validates |
includes/admin/reporting/tabs/class.llms.admin.reporting.tab.memberships.php: LLMS_Admin_Reporting_Tab_Memberships::output() |
Output tab content. |
includes/class-llms-staging.php: LLMS_Staging::handle_staging_notice_actions() |
Handle the action buttons present in the recurring payments staging notice. |
includes/models/model.llms.access.plan.php: LLMS_Access_Plan::get_redirection_url() |
Retrieve the full URL to redirect to after successful checkout. |
includes/abstracts/abstract.llms.payment.gateway.php: LLMS_Payment_Gateway::get_complete_transaction_redirect_url() |
Calculates the url to redirect to on transaction completion. |
includes/class.llms.ajax.php: LLMS_AJAX::query_quiz_questions() |
Retrieve Quiz Questions |
includes/abstracts/abstract.llms.analytics.widget.php: LLMS_Analytics_Widget::get_posted_courses() | |
includes/abstracts/abstract.llms.analytics.widget.php: LLMS_Analytics_Widget::get_posted_memberships() | |
includes/abstracts/abstract.llms.analytics.widget.php: LLMS_Analytics_Widget::get_posted_students() | |
includes/functions/llms.functions.templates.dashboard.php: lifterlms_template_student_dashboard_my_notifications() |
Template for My Notifications student dashboard endpoint |
includes/functions/llms.functions.templates.dashboard.php: lifterlms_student_dashboard() |
Output the LifterLMS Student Dashboard |
includes/functions/llms.functions.page.php: llms_confirm_payment_url() |
Get url for redirect when user confirms payment. |
includes/class.llms.ajax.handler.php: LLMS_AJAX_Handler::query_students() |
Retrieve Students. |
includes/class.llms.ajax.handler.php: LLMS_AJAX_Handler::select2_query_posts() |
Handle Select2 Search boxes for WordPress Posts by Post Type and Post Status. |
includes/controllers/class.llms.controller.achievements.php: LLMS_Controller_Achievements::maybe_handle_reporting_actions() |
Handle achievement form actions to download (for students and admins) and to delete (admins only) |
includes/controllers/class.llms.controller.certificates.php: LLMS_Controller_Certificates::maybe_handle_reporting_actions() |
Handle certificate form actions |
includes/controllers/class.llms.controller.admin.quiz.attempts.php: LLMS_Controller_Admin_Quiz_Attempts::maybe_run_actions() |
Run actions on form submission |
includes/controllers/class.llms.controller.lesson.progression.php: LLMS_Controller_Lesson_Progression::handle_admin_managment_forms() |
Handle form submission from the Student -> Courses -> Course table where admins can toggle completion of lessons for a student. |
includes/controllers/class.llms.controller.lesson.progression.php: LLMS_Controller_Lesson_Progression::get_lesson_id_from_form_data() |
Retrieve a lesson ID from form data for the mark complete / incomplete forms |
includes/forms/controllers/class.llms.controller.account.php: LLMS_Controller_Account::cancel_subscription() |
Lets student cancel recurring access plan subscriptions from the student dashboard view order screen |
includes/forms/controllers/class.llms.controller.login.php: LLMS_Controller_Login::login() |
Handle Login Form Submission |
includes/shortcodes/class.llms.shortcode.checkout.php: LLMS_Shortcode_Checkout::output() |
Gather a bunch of information and output the actual content for the shortcode. |
includes/class.llms.view.manager.php: LLMS_View_Manager::get_view() |
Get the current view role/type. |
includes/integrations/class.llms.integration.bbpress.php: LLMS_Integration_BBPress::save_course_settings() |
Save course metabox custom fields |
includes/admin/class.llms.admin.post-types.php: LLMS_Admin_Post_Types::llms_post_updated_messages() |
Customize post type messages. |
includes/admin/class.llms.admin.menus.php: LLMS_Admin_Menus::reporting_page_init() |
Output the HTML for the reporting screens |
includes/admin/class.llms.admin.setup.wizard.php: LLMS_Admin_Setup_Wizard::save() |
Handle saving data during setup |
includes/admin/class-llms-admin-review.php: LLMS_Admin_Review::dismiss() |
AJAX callback for dismissing the notice |
includes/admin/class.llms.admin.settings.php: LLMS_Admin_Settings::save_fields() |
Save admin fields. |
includes/admin/reporting/tables/llms.table.achievements.php: LLMS_Table_Achievements::set_args() |
Define the structure of arguments used to pass to the get_results method |
includes/admin/reporting/tables/llms.table.certificates.php: LLMS_Table_Student_Certificates::set_args() |
Define the structure of arguments used to pass to the get_results method |
includes/admin/reporting/tables/llms.table.student.course.php: LLMS_Table_Student_Course::set_args() |
Define the structure of arguments used to pass to the get_results method |
includes/admin/reporting/tables/llms.table.student.courses.php: LLMS_Table_Student_Courses::set_args() |
Define the structure of arguments used to pass to the get_results method |
includes/admin/reporting/tables/llms.table.student.memberships.php: LLMS_Table_Student_Memberships::set_args() |
Define the structure of arguments used to pass to the get_results method |
includes/admin/reporting/class.llms.admin.reporting.php: LLMS_Admin_Reporting::get_stab_url() |
Get the full URL to a sub-tab within a reporting screen. |
includes/admin/reporting/class.llms.admin.reporting.php: LLMS_Admin_Reporting::get_current_memberships() |
Get array of membership IDs selected according to applied filters. |
includes/admin/reporting/class.llms.admin.reporting.php: LLMS_Admin_Reporting::get_current_students() |
Get array of student IDs according to current filters. |
includes/admin/reporting/class.llms.admin.reporting.php: LLMS_Admin_Reporting::get_current_courses() |
Get array of course IDs selected according to applied filters. |
includes/admin/reporting/tabs/class.llms.admin.reporting.tab.students.php: LLMS_Admin_Reporting_Tab_Students::output() |
Output HTML for the current view within the students tab |
includes/admin/reporting/tabs/class.llms.admin.reporting.tab.students.php: LLMS_Admin_Reporting_Tab_Students::breadcrumbs() |
Add breadcrumb links to the tab depending on current view |
includes/admin/reporting/tabs/class.llms.admin.reporting.tab.courses.php: LLMS_Admin_Reporting_Tab_Courses::output() |
Output tab content |
includes/admin/reporting/tabs/class.llms.admin.reporting.tab.quizzes.php: LLMS_Admin_Reporting_Tab_Quizzes::output() |
Output tab content |
includes/admin/post-types/meta-boxes/class.llms.meta.box.engagement.php: LLMS_Meta_Box_Engagement::save() |
Custom save method. |
includes/admin/post-types/meta-boxes/class.llms.meta.box.order.enrollment.php: LLMS_Meta_Box_Order_Enrollment::save() |
Save method |
includes/admin/post-types/meta-boxes/class.llms.meta.box.voucher.php: LLMS_Meta_Box_Voucher::save() |
Save method |
includes/admin/post-types/meta-boxes/class.llms.meta.box.order.transactions.php: LLMS_Meta_Box_Order_Transactions::resend_receipt() |
Resend a receipt for a transaction |
includes/admin/post-types/meta-boxes/class.llms.meta.box.order.transactions.php: LLMS_Meta_Box_Order_Transactions::save() |
Save method, processes refunds / records manual txns |
includes/admin/post-types/meta-boxes/class.llms.meta.box.order.transactions.php: LLMS_Meta_Box_Order_Transactions::save_refund() |
Save method, processes refunds |
includes/admin/post-types/meta-boxes/class.llms.meta.box.voucher.export.php: LLMS_Meta_Box_Voucher_Export::export() |
Export vouchers. |
includes/admin/post-types/meta-boxes/class.llms.meta.box.coupon.php: LLMS_Meta_Box_Coupon::save() |
Save all metadata |
includes/admin/post-types/class.llms.post.tables.php: LLMS_Admin_Post_Tables::handle_link_actions() |
Handle events for our custom postrow actions |
includes/admin/class.llms.admin.addons.php: LLMS_Admin_AddOns::handle_manage_addons() |
Handle activation and deactivation of addons |
includes/admin/class.llms.admin.user.custom.fields.php: LLMS_Admin_User_Custom_Fields::save() |
Save custom field data for a user |
includes/admin/class.llms.admin.reviews.php: LLMS_Admin_Reviews::save_review_meta_boxes() |
Save metabox fields. |
includes/admin/class.llms.admin.assets.php: LLMS_Admin_Assets::admin_scripts() |
Enqueue scripts |
includes/admin/class-llms-admin-export-download.php: LLMS_Admin_Export_Download::maybe_serve_export() |
Serve an export file as a download |
libraries/lifterlms-blocks/includes/class-llms-blocks-migrate.php: LLMS_Blocks_Migrate::migrate_post() |
Migrate posts created prior to the block editor to have default LifterLMS templates |
Changelog #Changelog
Version | Description |
---|---|
5.3.0 | Moved location from includes/llms.functions.core.php . |
3.29.0 | Introduced. |