Properties

$jetpack

$jetpack

$hash

$hash

Methods

init()

init()

Singleton

Jetpack_Subscriptions()

Jetpack_Subscriptions()

post_is_public()

post_is_public( $the_post)

Parameters

$the_post

xmlrpc_methods()

xmlrpc_methods(array $methods)

Jetpack_Subscriptions::xmlrpc_methods()

Register subscriptions methods with the Jetpack XML-RPC server.

Parameters

array $methods

configure()

configure()

Jetpack_Subscriptions::configure()

Jetpack Subscriptions configuration screen.

subscriptions_settings_section()

subscriptions_settings_section()

Discussions setting section blurb

subscription_post_subscribe_setting()

subscription_post_subscribe_setting()

Post Subscriptions Toggle

subscription_comment_subscribe_setting()

subscription_comment_subscribe_setting()

Comments Subscriptions Toggle

validate_settings()

validate_settings( $settings)

Parameters

$settings

reading_section()

reading_section()

setting_invitation()

setting_invitation()

setting_comment_follow()

setting_comment_follow()

get_default_settings()

get_default_settings()

get_settings()

get_settings()

subscribe()

subscribe(string $email, array $post_ids, bool $async,  $extra_data) : true|\Jetpack_Error

Jetpack_Subscriptions::subscribe()

Send a synchronous XML-RPC subscribe to blog posts or subscribe to post comments request.

Parameters

string $email
array $post_ids

(optional) defaults to 0 for blog posts only: array of post IDs to subscribe to blog's posts

bool $async

(optional) Should the subscription be performed asynchronously? Defaults to true.

$extra_data

Returns

true|\Jetpack_Error

true on success invalid_email : not a valid email address invalid_post_id : not a valid post ID unknown_post_id : unknown post not_subscribed : strange error. Jetpack servers at WordPress.com could subscribe the email. disabled : Site owner has disabled subscriptions. active : Already subscribed. unknown : strange error. Jetpack servers at WordPress.com returned something malformed. unknown_status : strange error. Jetpack servers at WordPress.com returned something I didn't understand.

widget_init()

widget_init()

Jetpack_Subscriptions::widget_init()

Initialize and register the Jetpack Subscriptions widget.

widget_submit()

widget_submit()

Jetpack_Subscriptions::widget_submit()

When a user submits their email via the blog subscription widget, check the details and call the subsribe() method.

comment_subscribe_init()

comment_subscribe_init()

Jetpack_Subscriptions::comment_subscribe_init()

Set up and add the comment subscription checkbox to the comment form.

comment_subscribe_submit()

comment_subscribe_submit( $comment_id,  $approved)

Jetpack_Subscriptions::comment_subscribe_init()

When a user checks the comment subscribe box and submits a comment, subscribe them to the comment thread.

Parameters

$comment_id
$approved

set_cookies()

set_cookies( $comments,  $posts)

Jetpack_Subscriptions::set_cookies()

Set a cookie to save state on the comment and post subscription checkboxes.

Parameters

$comments
$posts