PHP 클래스 Jetpack_Subscriptions, jetpack

파일 보기 프로젝트 열기: automattic/jetpack 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$hash
$jetpack

공개 메소드들

메소드 설명
__construct ( )
comment_subscribe_init ( ) Jetpack_Subscriptions::comment_subscribe_init()
comment_subscribe_submit ( $comment_id, $approved ) Jetpack_Subscriptions::comment_subscribe_init()
configure ( ) Jetpack_Subscriptions::configure()
get_default_settings ( )
get_settings ( )
init ( ) Singleton
maybe_send_subscription_email ( $new_status, $old_status, $post ) Checks whether or not the post should be emailed to subscribers
reading_section ( )
set_cookies ( boolean $subscribe_to_post = false, integer $post_id = null, boolean $subscribe_to_blog = false ) Jetpack_Subscriptions::set_cookies()
set_post_flags ( $flags, $post )
setting_comment_follow ( )
setting_invitation ( )
should_email_post_to_subscribers ( $post )
subscribe ( string $email, array $post_ids, boolean $async = true, $extra_data = [] ) : true | Jetpack_Error Jetpack_Subscriptions::subscribe()
subscription_comment_subscribe_setting ( ) Comments Subscriptions Toggle
subscription_post_page_metabox ( ) * Disable Subscribe on Single Post Register post meta
subscription_post_subscribe_setting ( ) Post Subscriptions Toggle
subscriptions_settings_section ( ) Discussions setting section blurb
validate_settings ( $settings )
widget_init ( ) Jetpack_Subscriptions::widget_init()
widget_submit ( ) Jetpack_Subscriptions::widget_submit()
xmlrpc_methods ( array $methods ) Jetpack_Subscriptions::xmlrpc_methods()

메소드 상세

__construct() 공개 메소드

public __construct ( )

comment_subscribe_init() 공개 메소드

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

comment_subscribe_submit() 공개 메소드

When a user checks the comment subscribe box and submits a comment, subscribe them to the comment thread.
public comment_subscribe_submit ( $comment_id, $approved )

configure() 공개 메소드

Jetpack Subscriptions configuration screen.
public configure ( )

get_default_settings() 공개 메소드

get_settings() 공개 메소드

public get_settings ( )

init() 정적인 공개 메소드

Singleton
static public init ( )

maybe_send_subscription_email() 공개 메소드

It checks for the following things in order: - Usage of filter jetpack_subscriptions_exclude_these_categories - Usage of filter jetpack_subscriptions_include_only_these_categories - Existence of the per-post checkbox option Only one of these can be used at any given time.
public maybe_send_subscription_email ( $new_status, $old_status, $post )
$new_status string - the "new" post status of the transition when saved
$old_status string - the "old" post status of the transition when saved
$post obj - The post object

reading_section() 공개 메소드

public reading_section ( )

set_cookies() 공개 메소드

Set a cookie to save state on the comment and post subscription checkboxes.
public set_cookies ( boolean $subscribe_to_post = false, integer $post_id = null, boolean $subscribe_to_blog = false )
$subscribe_to_post boolean Whether the user chose to subscribe to subsequent comments on this post.
$post_id integer If $subscribe_to_post is true, the post ID they've subscribed to.
$subscribe_to_blog boolean Whether the user chose to subscribe to all new posts on the blog.

set_post_flags() 공개 메소드

public set_post_flags ( $flags, $post )

setting_comment_follow() 공개 메소드

setting_invitation() 공개 메소드

public setting_invitation ( )

should_email_post_to_subscribers() 공개 메소드

subscribe() 공개 메소드

Send a synchronous XML-RPC subscribe to blog posts or subscribe to post comments request.
public subscribe ( string $email, array $post_ids, boolean $async = true, $extra_data = [] ) : true | Jetpack_Error
$email string
$post_ids array (optional) defaults to 0 for blog posts only: array of post IDs to subscribe to blog's posts
$async boolean (optional) Should the subscription be performed asynchronously? Defaults to true.
리턴 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.

subscription_comment_subscribe_setting() 공개 메소드

Comments Subscriptions Toggle

subscription_post_page_metabox() 공개 메소드

* Disable Subscribe on Single Post Register post meta

subscription_post_subscribe_setting() 공개 메소드

Post Subscriptions Toggle

subscriptions_settings_section() 공개 메소드

Discussions setting section blurb

validate_settings() 공개 메소드

public validate_settings ( $settings )

widget_init() 공개 메소드

Initialize and register the Jetpack Subscriptions widget.
public widget_init ( )

widget_submit() 공개 메소드

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

xmlrpc_methods() 공개 메소드

Register subscriptions methods with the Jetpack XML-RPC server.
public xmlrpc_methods ( array $methods )
$methods array

프로퍼티 상세

$hash 공개적으로 정적으로 프로퍼티

public static $hash

$jetpack 공개적으로 프로퍼티

public $jetpack