PHP Class Falcon_Connector_WordPress, Falcon

Inheritance: extends Falcon_Connector
Afficher le fichier Open project: rmccue/Falcon

Protected Properties

Свойство Type Description
$handler Falcon_Handler Sending handler

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode 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 méthode

public __construct ( $handler )

get_available_settings() public méthode

Get available settings for notifications
public get_available_settings ( ) : array
Résultat array

get_available_settings_short() public méthode

get_comment_content_as_html() protected méthode

protected get_comment_content_as_html ( $comment )

get_comment_content_as_text() protected méthode

protected get_comment_content_as_text ( $comment )

get_comment_subscribers() public méthode

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

get_default_settings() protected méthode

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

get_message_id_for_comment() protected méthode

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

get_message_id_for_post() protected méthode

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

get_name() public static méthode

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

get_post_content_as_html() protected méthode

protected get_post_content_as_html ( $post )

get_post_content_as_text() protected méthode

protected get_post_content_as_text ( $post )

get_post_subscribers() protected méthode

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

get_references_for_comment() protected méthode

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

get_settings_for_user() protected méthode

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
Résultat array Map of type => pref value

get_thread_subscribers() protected méthode

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
Résultat array

handle_insert() public méthode

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

is_allowed_type() public static méthode

public static is_allowed_type ( $type )

key_for_setting() protected méthode

protected key_for_setting ( $key, $site_id = null )

network_notification_settings() public méthode

public network_notification_settings ( $user = null, $sites )

notify_on_publish() public méthode

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

notify_on_reply() public méthode

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

output_settings() public méthode

public output_settings ( $user = null )

print_field() protected méthode

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

save_profile_settings() public méthode

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

Property Details

$handler protected_oe property

Sending handler
protected Falcon_Handler $handler
Résultat Falcon_Handler