PHP Class SimpleThemeLogger

Inheritance: extends SimpleLogger
Datei anzeigen Open project: bonny/wordpress-simple-history

Public Properties

Property Type Description
$slug

Public Methods

Method Description
getInfo ( ) : array Get array with information about this logger
getLogRowDetailsOutput ( $row )
getLogRowPlainTextOutput ( $row ) Add widget name and sidebar name to output
getSidebarById ( string $sidebar_id ) : sidebar Get a sidebar by id
getWidgetByIdBase ( $widget_id_base ) : wp_widget Get an widget by id's id_base
loaded ( )
on_action_customize_save ( $customize_manager ) * WP_Customize_Manager $this WP_Customize_Manager instance.
on_action_sidebar_admin_setup__detect_widget_add ( ) Widget added
on_action_sidebar_admin_setup__detect_widget_delete ( ) * widget deleted
on_deleted_site_transient_theme_deleted ( $transient = null ) * Fires after a transient is deleted.
on_page_load_custom_background ( )
on_page_load_themes ( ) When a new theme is about to get switched to we save info about the old one
on_switch_theme ( $new_name, $new_theme )
on_upgrader_process_complete_theme_install ( $upgrader_instance = null, $arr_data = null )
on_upgrader_process_complete_theme_update ( $upgrader_instance = null, $arr_data = null )
on_widget_update_callback ( $instance, $new_instance, $old_instance, $widget_instance ) A widget is changed, i.e. new values are saved

Method Details

getInfo() public method

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

getLogRowDetailsOutput() public method

public getLogRowDetailsOutput ( $row )

getLogRowPlainTextOutput() public method

Add widget name and sidebar name to output
public getLogRowPlainTextOutput ( $row )

getSidebarById() public method

Get a sidebar by id
public getSidebarById ( string $sidebar_id ) : sidebar
$sidebar_id string
return sidebar info or false on failure

getWidgetByIdBase() public method

Get an widget by id's id_base
public getWidgetByIdBase ( $widget_id_base ) : wp_widget
return wp_widget object or false on failure

loaded() public method

public loaded ( )

on_action_customize_save() public method

* WP_Customize_Manager $this WP_Customize_Manager instance.
public on_action_customize_save ( $customize_manager )

on_action_sidebar_admin_setup__detect_widget_add() public method

Widget added

on_action_sidebar_admin_setup__detect_widget_delete() public method

* widget deleted

on_deleted_site_transient_theme_deleted() public method

WP function delete_theme() does not have any actions or filters we can use to detect a theme deletion, but the last thing that is done in delete_theme() is that the "update_themes" transient is deleted. So use that info to catch theme deletions.
public on_deleted_site_transient_theme_deleted ( $transient = null )
$transient Deleted transient name.

on_page_load_custom_background() public method

on_page_load_themes() public method

When a new theme is about to get switched to we save info about the old one
public on_page_load_themes ( )

on_switch_theme() public method

public on_switch_theme ( $new_name, $new_theme )

on_upgrader_process_complete_theme_install() public method

public on_upgrader_process_complete_theme_install ( $upgrader_instance = null, $arr_data = null )

on_upgrader_process_complete_theme_update() public method

public on_upgrader_process_complete_theme_update ( $upgrader_instance = null, $arr_data = null )

on_widget_update_callback() public method

A widget is changed, i.e. new values are saved
public on_widget_update_callback ( $instance, $new_instance, $old_instance, $widget_instance )

Property Details

$slug public_oe property

public $slug