WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

Yoast\WP\Lib

ORM::save() public Yoast 1.0

Saves any fields which have been modified on this object to the database.

{} Это метод класса: ORM{}

Хуков нет.

Возвращает

true/false. True on success.

Использование

$ORM = new ORM();
$ORM->save();

Код ORM::save() Yoast 15.1.1

<?php
public function save() {
	global $wpdb;

	// Remove any expression fields as they are already baked into the query.
	$values = \array_values( \array_diff_key( $this->_dirty_fields, $this->_expr_fields ) );
	if ( ! $this->_is_new ) {
		// UPDATE.
		// If there are no dirty values, do nothing.
		if ( empty( $values ) && empty( $this->_expr_fields ) ) {
			return true;
		}
		$query = \join( ' ', [ $this->build_update(), $this->add_id_column_conditions() ] );

		$id = $this->id( true );
		if ( \is_array( $id ) ) {
			$values = \array_merge( $values, \array_values( $id ) );
		}
		else {
			$values[] = $id;
		}
	}
	else {
		// INSERT.
		$query = $this->build_insert();
	}
	$success = self::execute( $query, $values );
	// If we've just inserted a new record, set the ID of this object.
	if ( $this->_is_new ) {
		$this->_is_new = false;
		if ( $this->count_null_id_columns() !== 0 ) {
			$column = $this->get_id_column_name();
			// If the primary key is compound, assign the last inserted id to the first column.
			if ( \is_array( $column ) ) {
				$column = \reset( $column );
			}
			// Explicitly cast to int to make dealing with Id's simpler.
			$this->_data[ $column ] = (int) $wpdb->insert_id;
		}
	}
	$this->_dirty_fields = [];
	$this->_expr_fields  = [];

	return $success;
}