public
|
#
__construct( )
Set up the EDD Logging Class
Set up the EDD Logging Class
Since
1.3.1
|
public
|
#
register_post_type( )
Registers the edd_log Post Type
Registers the edd_log Post Type
Since
1.3.1
|
public
|
#
register_taxonomy( )
Registers the Type Taxonomy
Registers the Type Taxonomy
The "Type" taxonomy is used to determine the type of log entry
Since
1.3.1
|
public
array
|
#
log_types( )
Log types
Sets up the default log types and allows for new ones to be created
Returns
array $terms
Since
1.3.1
Used by
|
public
boolean
|
#
valid_type( string $type )
Check if a log type is valid
Check if a log type is valid
Checks to see if the specified type is in the registered list of types
Parameters
- $type
string $type Log type
Returns
boolean Whether log type is valid
Since
1.3.1
Uses
Used by
|
public
integer
|
#
add( string $title = '', string $message = '', integer $parent = 0, string $type = null )
Create new log entry
This is just a simple and fast way to log something. Use
$this->insert_log() if you need to store custom meta data
Parameters
- $title
string $title Log entry title
- $message
string $message Log entry message
- $parent
integer $parent Log entry parent
- $type
string $type Log type (default: null)
Returns
integer Log ID
Since
1.3.1
Uses
Used by
|
public
array
|
#
get_logs( integer $object_id = 0, string $type = null, integer $paged = null )
Easily retrieves log items for a particular object ID
Easily retrieves log items for a particular object ID
Parameters
- $object_id
integer $object_id (default: 0)
- $type
string $type Log type (default: null)
- $paged
integer $paged Page number (default: null)
Returns
array Array of the connected logs
Since
1.3.1
Uses
|
public
integer
|
#
insert_log( array $log_data = array(), array $log_meta = array() )
Stores a log entry
Parameters
- $log_data
array $log_data Log entry data
- $log_meta
array $log_meta Log entry meta
Returns
integer The ID of the newly created log item
Since
1.3.1
Uses
Used by
|
public
boolean
|
#
update_log( array $log_data = array(), array $log_meta = array() )
Update and existing log item
Update and existing log item
Parameters
- $log_data
array $log_data Log entry data
- $log_meta
array $log_meta Log entry meta
Returns
boolean True if successful, false otherwise
Since
1.3.1
|
public
mixed
|
#
get_connected_logs( array $args = array() )
Retrieve all connected logs
Retrieve all connected logs
Used for retrieving logs related to particular items, such as a specific
purchase.
Parameters
- $args
array $args Query arguments
Returns
mixed array if logs were found, false otherwise
Since
1.3.1
Used by
|
public
integer
|
#
get_log_count( integer $object_id = 0, string $type = null, array $meta_query = null )
Retrieves number of log entries connected to particular object ID
Retrieves number of log entries connected to particular object ID
Parameters
- $object_id
integer $object_id (default: 0)
- $type
string $type Log type (default: null)
- $meta_query
array $meta_query Log meta query (default: null)
Returns
integer Log count
Since
1.3.1
Used by
|
public
|
#
delete_logs( integer $object_id = 0, string $type = null, array $meta_query = null )
Delete a log
Parameters
- $object_id
integer $object_id (default: 0)
- $type
string $type Log type (default: null)
- $meta_query
array $meta_query Log meta query (default: null)
Since
1.3.1
Uses
Used by
|