Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Abstract_Database_Store::update( array $data )
Update object data in the database
Parameters Parameters
- $data
-
(array) (Required) Data to update as key=>val.
Return Return
(boolean)
Source Source
File: includes/abstracts/llms.abstract.database.store.php
private function update( $data ) { global $wpdb; $format = array_map( array( $this, 'get_column_format' ), array_keys( $data ) ); $where = array_combine( array_keys( $this->primary_key ), array( $this->id ) ); $res = $wpdb->update( $this->get_table(), $data, $where, $format, array_values( $this->primary_key ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery if ( $res ) { /** * Fires when a new database record is updated. * * The dynamic portion of this hook, `$this->type`, refers to the record type. * * @since Unknown. * * @param int $id Record ID. * @param LLMS_Abstract_Database_Store $obj Instance of the record object. */ do_action( "llms_{$this->type}_updated", $this->id, $this ); return true; } return false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Removed deprecated llms__updated action hook. |
4.3.0 | Added deprecated hook call to llms__updated action to preserve backwards compatibility. |
3.24.0 | Unknown. |
3.14.0 | Introduced. |