PHP Class Falcon_Connector_WordPress, Falcon

Inheritance: extends Falcon_Connector
Datei anzeigen Open project: rmccue/Falcon

Protected Properties

Property Type Description
$handler Falcon_Handler Sending handler

Public Methods

Method Description
__construct ( $handler )
get_available_settings ( ) : array Get available settings for notifications
get_available_settings_short ( )
get_comment_subscribers ( stdClass $comment ) : WP_User[] Get all subscribers for comment notifications
get_name ( ) : string Get a human-readable name for the handler
handle_insert ( $value, Falcon_Reply $reply )
is_allowed_type ( $type )
network_notification_settings ( $user = null, $sites )
notify_on_publish ( $id, $post = null ) Notify user roles on new topic
notify_on_reply ( $id, $comment = null ) Send a notification to subscribers
output_settings ( $user = null )
save_profile_settings ( $user_id, $args = [], $sites = null )

Protected Methods

Method Description
get_comment_content_as_html ( $comment )
get_comment_content_as_text ( $comment )
get_default_settings ( ) : array Get default notification settings
get_html_footer ( $url )
get_message_id_for_comment ( stdClass $comment ) : string Get the Message ID for a comment
get_message_id_for_post ( WP_Post $post ) : string Get the Message ID for a post
get_post_content_as_html ( $post )
get_post_content_as_text ( $post )
get_post_subscribers ( WP_Post $post ) : WP_User[] Get all subscribers for post notifications
get_references_for_comment ( stdClass $comment ) : string Get the References for a comment
get_settings_for_user ( integer $user_id, $site_id = null ) : array Get notification settings for the current user
get_text_footer ( $url )
get_thread_subscribers ( stdClass $comment ) : array Get subscribers for the thread that a comment is in
key_for_setting ( $key, $site_id = null )
print_field ( $field, $settings, $is_defaults_screen = false )

Method Details

__construct() public method

public __construct ( $handler )

get_available_settings() public method

Get available settings for notifications
public get_available_settings ( ) : array
return array

get_available_settings_short() public method

get_comment_content_as_html() protected method

protected get_comment_content_as_html ( $comment )

get_comment_content_as_text() protected method

protected get_comment_content_as_text ( $comment )

get_comment_subscribers() public method

Get all subscribers for comment notifications
public get_comment_subscribers ( stdClass $comment ) : WP_User[]
$comment stdClass Comment being checked
return WP_User[]

get_default_settings() protected method

Get default notification settings
protected get_default_settings ( ) : array
return array Map of type => pref value

get_message_id_for_comment() protected method

Get the Message ID for a comment
protected get_message_id_for_comment ( stdClass $comment ) : string
$comment stdClass Comment object
return string Message ID

get_message_id_for_post() protected method

Get the Message ID for a post
protected get_message_id_for_post ( WP_Post $post ) : string
$post WP_Post Post object
return string Message ID

get_name() public static method

This is used for the handler selector and is shown to the user.
public static get_name ( ) : string
return string

get_post_content_as_html() protected method

protected get_post_content_as_html ( $post )

get_post_content_as_text() protected method

protected get_post_content_as_text ( $post )

get_post_subscribers() protected method

Get all subscribers for post notifications
protected get_post_subscribers ( WP_Post $post ) : WP_User[]
$post WP_Post Post being checked
return WP_User[]

get_references_for_comment() protected method

Get the References for a comment
protected get_references_for_comment ( stdClass $comment ) : string
$comment stdClass Comment object
return string Message ID

get_settings_for_user() protected method

Get notification settings for the current user
protected get_settings_for_user ( integer $user_id, $site_id = null ) : array
$user_id integer User to get settings for
return array Map of type => pref value

get_thread_subscribers() protected method

Gets subscribers to the thread (i.e. parent comment authors who are subscribed) as well as subscribers to all threads (i.e. comment authors who are subscribed to all comments on the post)
protected get_thread_subscribers ( stdClass $comment ) : array
$comment stdClass Comment being checked
return array

handle_insert() public method

public handle_insert ( $value, Falcon_Reply $reply )
$reply Falcon_Reply

is_allowed_type() public static method

public static is_allowed_type ( $type )

key_for_setting() protected method

protected key_for_setting ( $key, $site_id = null )

network_notification_settings() public method

public network_notification_settings ( $user = null, $sites )

notify_on_publish() public method

Notify user roles on new topic
public notify_on_publish ( $id, $post = null )

notify_on_reply() public method

Send a notification to subscribers
public notify_on_reply ( $id, $comment = null )

output_settings() public method

public output_settings ( $user = null )

print_field() protected method

protected print_field ( $field, $settings, $is_defaults_screen = false )

save_profile_settings() public method

public save_profile_settings ( $user_id, $args = [], $sites = null )

Property Details

$handler protected_oe property

Sending handler
protected Falcon_Handler $handler
return Falcon_Handler