public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/logs.php
/**
	 * Add Log Entry to File.
	 *
	 * @since 4.3.0
	 *
	 * @param array $data The log entry data.
	 *
	 * @return string|bool Number of bytes if inserted or false on failure.
	 */
Add Log Entry to File.

@param array $data The log entry data.

@return string|bool Number of bytes if inserted or false on failure.
Add Log Entry to File . @param array $data The log entry data . @return string|bool Number of bytes if inserted or false on failure .
public function add_log_entry_to_file( $data = array() ) {
		$defaults = array(
			'date_created' => date_i18n( 'm-d-Y @ H:i:s' ),
			'message'      => '',
			'type'         => 'debug',
		);
		$data = wp_parse_args( $data, $defaults );
		if ( empty( $data['message'] ) ) {
			return;
		}
		if ( is_array( $data['message'] ) ) {
			$data['message'] = wpcw_print_r( $data['message'], true );
		}
		$message = '[' . esc_attr( $data['date_created'] ) . '] ' . $data['message'] . "\r\n";
		$log_file_contents = $this->get_log_file_contents();
		$log_file_contents .= $message;
		return @file_put_contents( $this->file, $log_file_contents );
	}
public function add_log_entry_to_file ( $ data = array ( ) ) { $ defaults = array ( 'date_created' => date_i18n ( 'm-d-Y @ H:i:s' ) , 'message' => '' , 'type' => 'debug' , ) ; $ data = wp_parse_args ( $ data , $ defaults ) ; if ( empty ( $ data [ 'message' ] ) ) { return ; } if ( is_array ( $ data [ 'message' ] ) ) { $ data [ 'message' ] = wpcw_print_r ( $ data [ 'message' ] , true ) ; } $ message = '[' . esc_attr ( $ data [ 'date_created' ] ) . '] ' . $ data [ 'message' ] . " \r \n " ; $ log_file_contents = $ this -> get_log_file_contents ( ) ; $ log_file_contents .= $ message ; return @ file_put_contents ( $ this -> file , $ log_file_contents ) ; }
Add Log Entry to File.
Add Log Entry to File .