LLMS_Integration_BBPress::save_course_settings( int $post_id )
Save course metabox custom fields
Parameters Parameters
- $post_id
-
(int) (Required) WP_Post ID of the course.
Return Return
(null|int[])
Source Source
File: includes/integrations/class.llms.integration.bbpress.php
public function save_course_settings( $post_id ) { // Return early on quick edits. $action = llms_filter_input( INPUT_POST, 'action' ); if ( 'inline-save' === $action ) { return null; } $ids = array(); if ( isset( $_POST['_llms_bbp_forum_ids'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing $ids = llms_filter_input( INPUT_POST, '_llms_bbp_forum_ids', FILTER_SANITIZE_NUMBER_INT, FILTER_REQUIRE_ARRAY ); } update_post_meta( $post_id, '_llms_bbp_forum_ids', $ids ); return $ids; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.9.0 | Stop using deprecated FILTER_SANITIZE_STRING . |
3.37.11 | Don't update saved forum values during course quick edits & remove redundant sanitization. |
3.35.0 | Sanitize input data. |
3.12.0 | Introduced. |