Properties

$id_sources

$id_sources : array

Possible comment form sources

Type

array

$signed_url

$signed_url : string

URL

Type

string

$default_color_scheme

$default_color_scheme : string

The default comment form color scheme

Type

string

Methods

init()

init()

Methods **************************************************************

__construct()

__construct()

set_default_color_theme_based_on_theme_settings()

set_default_color_theme_based_on_theme_settings()

get_avatar()

get_avatar(string $avatar, string $comment, int $size, string $default) : string

Get the comment avatar from Gravatar, Twitter, or Facebook

Parameters

string $avatar

Current avatar URL

string $comment

Comment for the avatar

int $size

Size of the avatar

string $default

Not used

Returns

string —

New avatar

comment_form_before()

comment_form_before()

Start capturing the core comment_form() output

comment_form_after()

comment_form_after()

Noop teh default comment form output, get some options, and output our tricked out totally radical comment form.

watch_comment_parent()

watch_comment_parent()

Add some JS to wp_footer to watch for hierarchical reply parent change

pre_comment_on_post()

pre_comment_on_post(\type $comment)

Verify the hash included in remote comments.

Parameters

\type $comment

Not used

add_comment_meta()

add_comment_meta(\type $comment_id)

Add some additional comment meta after comment is saved about what service the comment is from, the avatar, user_id, etc.

..

Parameters

\type $comment_id

capture_comment_post_redirect_to_reload_parent_frame()

capture_comment_post_redirect_to_reload_parent_frame( $url)

Parameters

$url

is_highlander_comment_post()

is_highlander_comment_post() : false|string

Is this a Highlander POST request? Optionally restrict to one or more credentials slug (facebook, twitter, .

..)

Returns

false|string —

false if it's not a Highlander POST request. The matching credentials slug if it is.

sign_remote_comment_parameters()

sign_remote_comment_parameters(array $parameters, string $key) : string

Signs an array of scalars with the self-hosted blog's Jetpack Token

Parameters

array $parameters
string $key

Returns

string —

HMAC

comments_array()

comments_array( $comments)

Parameters

$comments

sort_comments_by_comment_date_gmt()

sort_comments_by_comment_date_gmt(object $a, object $b) : int

Comment sort comparator: comment_date_gmt

Parameters

object $a
object $b

Returns

int

allow_logged_out_user_to_comment_as_external()

allow_logged_out_user_to_comment_as_external() : \If

Allows a logged out user to leave a comment as a facebook or twitter credentialed user.

Overrides WordPress' core comment_registration option to treat these commenters as "registered" (verified) users.

Returns

\If —

no

allow_logged_in_user_to_comment_as_guest()

allow_logged_in_user_to_comment_as_guest(array $comment_data) : int

Allow a logged in user to post as a guest, FB, or twitter credentialed request.

Bypasses WordPress' core overrides that force a logged in user to comment as that user. Respects comment_registration option.

Parameters

array $comment_data

Returns

int

set_comment_cookies()

set_comment_cookies(\type $comment_id) : \If

Set the comment cookies or bail if comment is invalid

Parameters

\type $comment_id

Returns

\If —

comment is invalid

setup_globals()

setup_globals()

Set any global variables or class variables

setup_actions()

setup_actions()

Setup actions for methods in this class

setup_filters()

setup_filters()

Setup filters for methods in this class

get_current_commenter()

get_current_commenter() : array

Get the current commenter's information from their cookie

Returns

array —

Commenters information from cookie

photon_avatar()

photon_avatar(string $url, int $size) : string

Get an avatar from Photon

Parameters

string $url
int $size

Returns

string