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.


Top ↑

Parameters Parameters

$post_id

(int) (Required) The WP Post ID.

$field_id

(int) (Required) The field identifier.

$val

(mixed) (Required) Value to save.


Top ↑

Return Return

(bool)


Top ↑

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 );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.