PHP Class SimplePostLogger

Inheritance: extends SimpleLogger
Afficher le fichier Open project: bonny/wordpress-simple-history

Méthodes publiques

Свойство Type Description
$slug The logger slug. Defaulting to the class name is nice and logical I think

Méthodes publiques

Méthode Description
add_diff ( $post_data_diff, $key, $old_value, $new_value ) Add diff to array if old and new values are different
add_post_data_diff_to_context ( $context, $old_post_data, $new_post_data ) * Adds diff data to the context array. Is called just before the event is logged.
add_xml_rpc_hooks ( ) Filters to XML RPC calls needs to be added early, admin_init is to late
adminCSS ( )
filter_rss_item_link ( string $link, array $row ) Modify RSS links to they go directly to the correct post in wp admin
getInfo ( ) : array Get array with information about this logger
getLogRowDetailsOutput ( $row )
getLogRowPlainTextOutput ( $row ) Modify plain output to inlcude link to post
get_theme_templates ( ) Return the current theme templates.
loaded ( )
on_admin_action_editpost ( ) Get and store old info about a post that is being edited.
on_delete_post ( $post_id ) Called when a post is deleted from the trash
on_transition_post_status ( $new_status, $old_status, $post ) Fired when a post has changed status Only run in certain cases, because when always enabled it catches a lots of edits made by plugins during cron jobs etc, which by definition is not wrong, but perhaps not wanted/annoying
on_untrash_post ( $post_id ) Called when a post is restored from the trash
on_xmlrpc_call ( $method )
on_xmlrpc_deletePost ( integer $post_ID, array $args ) Fires after a post has been successfully deleted via the XML-RPC Blogger API.
on_xmlrpc_editPost ( integer $post_ID, array $args ) Fires after a post has been successfully updated via the XML-RPC API.
on_xmlrpc_newPost ( integer $post_ID, array $args ) Fires after a new post has been successfully created via the XML-RPC API.

Method Details

add_diff() public méthode

Since 2.0.29
public add_diff ( $post_data_diff, $key, $old_value, $new_value )

add_post_data_diff_to_context() public méthode

Since 2.0.29 To detect - post thumb (part of custom fields) - categories - tags
public add_post_data_diff_to_context ( $context, $old_post_data, $new_post_data )

add_xml_rpc_hooks() public méthode

Filters to XML RPC calls needs to be added early, admin_init is to late
public add_xml_rpc_hooks ( )

adminCSS() public méthode

public adminCSS ( )

getInfo() public méthode

Get array with information about this logger
public getInfo ( ) : array
Résultat array

getLogRowDetailsOutput() public méthode

public getLogRowDetailsOutput ( $row )

getLogRowPlainTextOutput() public méthode

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

get_theme_templates() public méthode

Template will return untranslated. Uses the same approach as in class-wp-theme.php to get templates.
Since: 2.0.29
public get_theme_templates ( )

loaded() public méthode

public loaded ( )

on_admin_action_editpost() public méthode

Needed to later compare old data with new data, to detect differences. This function is called on edit screen, but before post edits are saved Can't use the regular filters like "pre_post_update" because custom fields are already written by then.
Since: 2.0.29

on_delete_post() public méthode

Called when a post is deleted from the trash
public on_delete_post ( $post_id )

on_transition_post_status() public méthode

Fired when a post has changed status Only run in certain cases, because when always enabled it catches a lots of edits made by plugins during cron jobs etc, which by definition is not wrong, but perhaps not wanted/annoying
public on_transition_post_status ( $new_status, $old_status, $post )

on_untrash_post() public méthode

Called when a post is restored from the trash
public on_untrash_post ( $post_id )

on_xmlrpc_call() public méthode

public on_xmlrpc_call ( $method )

on_xmlrpc_deletePost() public méthode

Fires after a post has been successfully deleted via the XML-RPC Blogger API.
Since: 2.0.21
public on_xmlrpc_deletePost ( integer $post_ID, array $args )
$post_ID integer ID of the deleted post.
$args array An array of arguments to delete the post.

on_xmlrpc_editPost() public méthode

Fires after a post has been successfully updated via the XML-RPC API.
Since: 2.0.21
public on_xmlrpc_editPost ( integer $post_ID, array $args )
$post_ID integer ID of the updated post.
$args array An array of arguments for the post to edit.

on_xmlrpc_newPost() public méthode

Fires after a new post has been successfully created via the XML-RPC API.
Since: 2.0.21
public on_xmlrpc_newPost ( integer $post_ID, array $args )
$post_ID integer ID of the new post.
$args array An array of new post arguments.

Property Details

$slug public_oe property

The logger slug. Defaulting to the class name is nice and logical I think
public $slug