Easy Digital Downloads
  • Package
  • Class
  • Tree

Packages

  • EDD
    • Admin
      • Actions
      • Add-ons
      • Dashboard
      • Discounts
      • Downloads
      • Export
      • Notices
      • Pages
      • Payments
      • Reports
      • Settings
      • System
      • Upgrades
      • Upload
      • Welcome
    • Cart
    • Checkout
    • Classes
      • API
      • Fees
      • HTML
      • Roles
      • Session
    • Emails
    • Functions
      • AJAX
      • Compatibility
      • Errors
      • Formatting
      • Install
      • Login
      • Taxes
      • Templates
    • Gateways
    • Logging
    • Payments
    • Shortcodes
    • Widgets

Classes

  • EDD_Logging

Functions

  • edd_record_log

Class EDD_Logging

EDD_Logging Class

A general use class for logging events and errors.

Package: EDD\Logging
Copyright: Copyright (c) 2013, Pippin Williamson
License: GNU Public License
Since: 1.3.1
Used by: edd_v131_upgrades()
Located at includes/class-edd-logging.php

Methods summary

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

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

EDD_Logging::valid_type()
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

EDD_Logging::log_types()

Used by

EDD_Logging::insert_log()
EDD_Logging::delete_logs()
public integer
# add( string $title = '', string $message = '', integer $parent = 0, string $type = null )

Create new log entry

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

EDD_Logging::insert_log()

Used by

edd_record_log()
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

EDD_Logging::get_connected_logs()
public integer
# insert_log( array $log_data = array(), array $log_meta = array() )

Stores a log entry

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

EDD_Logging::valid_type()

Used by

EDD_Logging::add()
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

EDD_Logging::get_logs()
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

edd_is_file_at_download_limit()
public
# delete_logs( integer $object_id = 0, string $type = null, array $meta_query = null )

Delete a log

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

EDD_Logging::valid_type()

Used by

edd_delete_purchase()

Magic methods summary

Easy Digital Downloads API documentation generated by ApiGen 2.8.0