LLMS_Blocks_Reusable::rest_callback_update( array $value, WP_Post $obj, string $key )

Rest field update callback

Parameters Parameters


(array) (Required) Post association array.


(WP_Post) (Required) Post object for the wp_block post.


(string) (Required) Field key.

Top ↑

Return Return

(WP_Error|boolean) Returns an error object when current user lacks permission to update the form or true on success.

Top ↑

Source Source

File: libraries/lifterlms-blocks/includes/class-llms-blocks-reusable.php

	public function rest_callback_update( $value, $obj, $key ) {
		$value = llms_parse_bool( $value ) ? 'yes' : 'no';
		return update_post_meta( $obj->ID, '_is_llms_field', $value ) ? true : false;

Top ↑

Changelog Changelog

Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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