LLMS_Meta_Box_Achievement::save_field_db( int $post_id, int $field_id, mixed $val )
Save field in the db.
Description Description
Expects an already sanitized value.
Stores the achievement_content field as post_content in favor of storing it in the postmeta table.
Parameters Parameters
- $post_id
-
(int) (Required) The WP Post ID.
- $field_id
-
(int) (Required) The field identifier.
- $val
-
(mixed) (Required) Value to save.
Return Return
(bool)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.achievement.php
protected function save_field_db( $post_id, $field_id, $val ) {
// Save to the post content field.
if ( $this->prefix . 'achievement_content' === $field_id && $this->post->ID === $post_id ) {
return wp_update_post(
array(
'ID' => $post_id,
'post_content' => $val,
)
) ? true : false;
}
return parent::save_field_db( $post_id, $field_id, $val );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |