You appear to be a bot. Output may be restricted
Description
Update and existing log item
Usage
$bool = EDD_Logging::update_log( $log_data, $log_meta );
Parameters
- $log_data
- ( array ) optional – Log entry data
- $log_meta
- ( array ) optional – Log entry meta
Returns
bool True if successful, false otherwise
Source
File name: easy-digital-downloads/includes/class-edd-logging.php
Lines:
1 to 24 of 24
public function update_log( $log_data = array(), $log_meta = array() ) { do_action( 'edd_pre_update_log', $log_data, $log_meta ); $defaults = array( 'post_type' => 'edd_log', 'post_status' => 'publish', 'post_parent' => 0, ); $args = wp_parse_args( $log_data, $defaults ); // Store the log entry $log_id = wp_update_post( $args ); if ( $log_id && ! empty( $log_meta ) ) { foreach ( (array) $log_meta as $key => $meta ) { if ( ! empty( $meta ) ) update_post_meta( $log_id, '_edd_log_' . sanitize_key( $key ), $meta ); } } do_action( 'edd_post_update_log', $log_id, $log_data, $log_meta ); }