Action
rpress_pre_update_log
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#
| Parameter | Type | Description |
|---|---|---|
$log_data | array | Log entry data passed to update_log(). It should include the ID of the entry to update. |
$log_meta | array | Log 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), inRPRESS_Logging::update_log()
See also#
Was this page helpful?
