PHP Class SimpleCommentsLogger

Inheritance: extends SimpleLogger
ファイルを表示 Open project: bonny/wordpress-simple-history

Public Properties

Property Type Description
$slug

Public Methods

Method Description
__construct ( $sh )
adminCSS ( )
getInfo ( ) : array Get array with information about this logger
getLogRowDetailsOutput ( $row ) Get output for detailed log section
getLogRowPlainTextOutput ( $row ) Modify plain output to inlcude link to post and link to comment
get_context_for_comment ( integer $comment_ID ) : mixed Get comments context
loaded ( )
maybe_modify_log_query_sql_where ( string $where ) Modify sql query to exclude comments of type spam
on_comment_post ( $comment_ID, $comment_approved ) Fires immediately after a comment is inserted into the database.
on_delete_comment ( $comment_ID )
on_edit_comment ( $comment_ID )
on_untrashed_comment ( $comment_ID )
on_wp_set_comment_status ( $comment_ID, string | boolean $comment_status ) Fires after a comment status has been updated in the database.

Method Details

__construct() public method

public __construct ( $sh )

adminCSS() public method

public adminCSS ( )

getInfo() public method

Get array with information about this logger
public getInfo ( ) : array
return array

getLogRowDetailsOutput() public method

Get output for detailed log section
public getLogRowDetailsOutput ( $row )

getLogRowPlainTextOutput() public method

Modify plain output to inlcude link to post and link to comment
public getLogRowPlainTextOutput ( $row )

get_context_for_comment() public method

Get comments context
public get_context_for_comment ( integer $comment_ID ) : mixed
$comment_ID integer
return mixed array with context if comment found, false if comment not found

loaded() public method

public loaded ( )

maybe_modify_log_query_sql_where() public method

Modify sql query to exclude comments of type spam
public maybe_modify_log_query_sql_where ( string $where )
$where string sql query where

on_comment_post() public method

Fires immediately after a comment is inserted into the database.
public on_comment_post ( $comment_ID, $comment_approved )

on_delete_comment() public method

public on_delete_comment ( $comment_ID )

on_edit_comment() public method

public on_edit_comment ( $comment_ID )

on_untrashed_comment() public method

public on_untrashed_comment ( $comment_ID )

on_wp_set_comment_status() public method

The hook also fires immediately before comment status transition hooks are fired.
public on_wp_set_comment_status ( $comment_ID, string | boolean $comment_status )
$comment_status string | boolean The comment status. Possible values include 'hold', 'approve', 'spam', 'trash', or false. do_action( 'wp_set_comment_status', $comment_id, $comment_status );

Property Details

$slug public_oe property

public $slug