Skip to content
Docs
Get RestroPress

Action

rpress_pre_update_log

Updated
On this page

Fires before a log entry is updated.

Runs at the start of RPRESS_Logging::update_log(), before the arguments are merged with the defaults and wp_update_post() is called.

Parameters#

ParameterTypeDescription
$log_dataarrayLog entry data passed to update_log(). It should include the ID of the entry to update.
$log_metaarrayLog meta key and value pairs.

Example#

function my_before_update_log( $log_data, $log_meta ) {
	error_log( 'Updating log ' . ( $log_data['ID'] ?? 0 ) );
}
add_action( 'rpress_pre_update_log', 'my_before_update_log', 10, 2 );

Source#

Fired from:

  • includes/class-rpress-logging.php (line 189), in RPRESS_Logging::update_log()

See also#

Was this page helpful?