PHP Класс SimplePostLogger

Наследование: extends SimpleLogger
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$slug The logger slug. Defaulting to the class name is nice and logical I think

Открытые методы

Метод Описание
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.

Описание методов

add_diff() публичный Метод

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

add_post_data_diff_to_context() публичный Метод

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() публичный Метод

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

adminCSS() публичный Метод

public adminCSS ( )

getInfo() публичный Метод

Get array with information about this logger
public getInfo ( ) : array
Результат array

getLogRowDetailsOutput() публичный Метод

public getLogRowDetailsOutput ( $row )

getLogRowPlainTextOutput() публичный Метод

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

get_theme_templates() публичный Метод

Template will return untranslated. Uses the same approach as in class-wp-theme.php to get templates.
С версии: 2.0.29
public get_theme_templates ( )

loaded() публичный Метод

public loaded ( )

on_admin_action_editpost() публичный Метод

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.
С версии: 2.0.29

on_delete_post() публичный Метод

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

on_transition_post_status() публичный Метод

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() публичный Метод

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

on_xmlrpc_call() публичный Метод

public on_xmlrpc_call ( $method )

on_xmlrpc_deletePost() публичный Метод

Fires after a post has been successfully deleted via the XML-RPC Blogger API.
С версии: 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() публичный Метод

Fires after a post has been successfully updated via the XML-RPC API.
С версии: 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() публичный Метод

Fires after a new post has been successfully created via the XML-RPC API.
С версии: 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.

Описание свойств

$slug публичное свойство

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