LLMS_Admin_Metabox::save( int $post_id )
Save field data.
Description Description
Loops through fields and saves the data to postmeta.
Called by $this->save_actions().
This function is dumb. If the fields need to output error messages or do validation override this method and create a custom save method to accommodate the validations or conditions.
Parameters Parameters
- $post_id
-
(Required) WP Post ID of the post being saved.
Return Return
(int) -1
When no user or user is missing required capabilities or when there's no or invalid nonce. 0
during inline saves or ajax requests or when no fields are found for the metabox. 1
if fields were found. This doesn't mean there weren't errors during saving.
Source Source
File: includes/abstracts/abstract.llms.admin.metabox.php
Changelog Changelog
Version | Description |
---|---|
3.37.12 | Move field sanitization and updates to the save_field() method. |
3.36.1 | Check metabox capability during saves. Return an int depending on return condition. Automatically add FILTER_REQUIRE_ARRAY flag when sanitizing a multi field. |
3.36.0 | Allow quotes when sanitizing some special fields that store a shortcode. |
3.35.0 | Added nonce verification before processing data; only access $_POST data via llms_filter_input() . |
3.14.1 | Unknown. |
3.0.0 | Introduced. |