PHP Class SimpleHistoryRSSDropin

Datei anzeigen Open project: bonny/wordpress-simple-history

Public Methods

Method Description
__construct ( $sh )
add_settings ( ) Add settings for the RSS feed + also regenerates the secret if requested
check_for_rss_feed_request ( ) Check if current request is a request for the RSS feed
get_rss_address ( ) : string Get the URL to the RSS feed
is_rss_enabled ( ) Check if RSS feed is enabled or disabled
on_can_read_single_logger ( $user_can_read_logger, $logger_instance, $user_id ) Modify capability check so all users reading rss feed (logged in or not) can read all loggers
output_rss ( ) Output RSS
settings_field_rss ( ) Output for settings field that show current RSS address
settings_field_rss_enable ( ) Output for settings field that show current RSS address
settings_field_rss_regenerate ( ) Output for settings field that regenerates the RSS adress/secret
settings_section_output ( ) Content for section intro. Leave it be, even if empty.
update_rss_secret ( ) : string Create a new RSS secret
update_rss_status ( $field ) Sanitize RSS enabled/disabled status on update settings

Method Details

__construct() public method

public __construct ( $sh )

add_settings() public method

Add settings for the RSS feed + also regenerates the secret if requested
public add_settings ( )

check_for_rss_feed_request() public method

Check if current request is a request for the RSS feed

get_rss_address() public method

Get the URL to the RSS feed
public get_rss_address ( ) : string
return string URL

is_rss_enabled() public method

Check if RSS feed is enabled or disabled
public is_rss_enabled ( )

on_can_read_single_logger() public method

Modify capability check so all users reading rss feed (logged in or not) can read all loggers
public on_can_read_single_logger ( $user_can_read_logger, $logger_instance, $user_id )

output_rss() public method

Output RSS
public output_rss ( )

settings_field_rss() public method

Output for settings field that show current RSS address
public settings_field_rss ( )

settings_field_rss_enable() public method

Output for settings field that show current RSS address

settings_field_rss_regenerate() public method

Output for settings field that regenerates the RSS adress/secret

settings_section_output() public method

Called from add_sections_setting.

update_rss_secret() public method

Create a new RSS secret
public update_rss_secret ( ) : string
return string new secret

update_rss_status() public method

Sanitize RSS enabled/disabled status on update settings
public update_rss_status ( $field )