PHP 클래스 SimplePostLogger

상속: extends SimpleLogger
파일 보기 프로젝트 열기: bonny/wordpress-simple-history

공개 프로퍼티들

프로퍼티 타입 설명
$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