LLMS_REST_Database_Resource::update_prepare( array $data )

Prepare data for an update.

Parameters Parameters


(array) (Required) Associative array of data to set to a resources properties.

Top ↑

Return Return


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-database-resource.php

	protected function update_prepare( $data ) {

		// Filter out write-protected keys.
		$data = array_diff_key(
			array_fill_keys( $this->read_only_columns, false )

		$err = $this->is_data_valid( $data );
		if ( is_wp_error( $err ) ) {
			return $err;

		return $data;


Top ↑

Changelog Changelog

Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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