PHP 클래스 MC4WP_Integration

파일 보기 프로젝트 열기: dannyvankooten/mailchimp-for-wordpress 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$description Description
$name Name of this integration.
$options Array of settings
$slug Slug, used as an unique identifier for this integration.

보호된 프로퍼티들

프로퍼티 타입 설명
$checkbox_name Name attribute for the checkbox element. Will be created from slug if empty.

공개 메소드들

메소드 설명
__construct ( string $slug, array $options ) Constructor
checkbox_was_checked ( ) : boolean Was the integration checkbox checked?
get_checkbox_html ( ) : string Get HTML for the checkbox
get_data ( ) : array Get the data for this integration request
get_label_text ( ) : string Get the text for the label element
get_lists ( ) : array Get the selected MailChimp lists
get_object_link ( integer $object_id ) : string Return a string to the admin settings page for this object (if any)
get_ui_elements ( ) : array Which UI elements should we show on the settings page for this integration?
has_ui_element ( $element ) : boolean Does integration have the given UI element?
initialize ( ) Initialize the integration
is_installed ( ) : boolean Are the required dependencies for this integration installed?
output_checkbox ( ) Outputs a checkbox
print_css_reset ( ) Print CSS reset
triggered ( integer $object_id = null ) : boolean Was integration triggered?

보호된 메소드들

메소드 설명
add_hooks ( ) Adds the hooks which are specific to this integration
add_required_hooks ( ) Adds the required hooks for core functionality, like adding checkbox reset CSS.
get_api ( ) : MC4WP_API_v3
get_checkbox_attributes ( ) : string Get a string of attributes for the checkbox element.
get_default_options ( ) : array Return array of default options
get_log ( ) : MC4WP_Debug_Log
get_request ( ) : MC4WP_Request
parse_options ( array $options ) : array
subscribe ( array $data, integer $related_object_id ) : boolean Makes a subscription request

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $slug, array $options )
$slug string
$options array

add_hooks() 추상적인 보호된 메소드

Adds the hooks which are specific to this integration
abstract protected add_hooks ( )

add_required_hooks() 보호된 메소드

Adds the required hooks for core functionality, like adding checkbox reset CSS.
protected add_required_hooks ( )

checkbox_was_checked() 공개 메소드

Was the integration checkbox checked?
public checkbox_was_checked ( ) : boolean
리턴 boolean

get_api() 보호된 메소드

protected get_api ( ) : MC4WP_API_v3
리턴 MC4WP_API_v3

get_checkbox_attributes() 보호된 메소드

Get a string of attributes for the checkbox element.
protected get_checkbox_attributes ( ) : string
리턴 string

get_checkbox_html() 공개 메소드

Get HTML for the checkbox
public get_checkbox_html ( ) : string
리턴 string

get_data() 공개 메소드

By default, this will return a combination of all $_GET and $_POST parameters. Override this method if you need data from somewhere else. This data should contain the value of the checkbox (required) and the lists to which should be subscribed (optional)
또한 보기: MC4WP_Integration::$checkbox_name
또한 보기: MC4WP_Integration::get_lists
또한 보기: MC4WP_Integration::checkbox_was_checked
public get_data ( ) : array
리턴 array

get_default_options() 보호된 메소드

Return array of default options
protected get_default_options ( ) : array
리턴 array

get_label_text() 공개 메소드

Get the text for the label element
public get_label_text ( ) : string
리턴 string

get_lists() 공개 메소드

Get the selected MailChimp lists
public get_lists ( ) : array
리턴 array Array of List ID's

get_log() 보호된 메소드

protected get_log ( ) : MC4WP_Debug_Log
리턴 MC4WP_Debug_Log

get_request() 보호된 메소드

protected get_request ( ) : MC4WP_Request
리턴 MC4WP_Request

get_ui_elements() 공개 메소드

Which UI elements should we show on the settings page for this integration?
public get_ui_elements ( ) : array
리턴 array

has_ui_element() 공개 메소드

Does integration have the given UI element?
public has_ui_element ( $element ) : boolean
$element
리턴 boolean

initialize() 공개 메소드

Initialize the integration
public initialize ( )

is_installed() 공개 메소드

Are the required dependencies for this integration installed?
public is_installed ( ) : boolean
리턴 boolean

output_checkbox() 공개 메소드

Outputs a checkbox
public output_checkbox ( )

parse_options() 보호된 메소드

protected parse_options ( array $options ) : array
$options array
리턴 array

print_css_reset() 공개 메소드

Print CSS reset
public print_css_reset ( )

subscribe() 보호된 메소드

Makes a subscription request
protected subscribe ( array $data, integer $related_object_id ) : boolean
$data array
$related_object_id integer
리턴 boolean

triggered() 공개 메소드

Will always return true when integration is implicit. Otherwise, will check value of checkbox.
public triggered ( integer $object_id = null ) : boolean
$object_id integer Useful when overriding method. (optional)
리턴 boolean

프로퍼티 상세

$checkbox_name 보호되어 있는 프로퍼티

Name attribute for the checkbox element. Will be created from slug if empty.
protected $checkbox_name

$description 공개적으로 프로퍼티

Description
public $description

$name 공개적으로 프로퍼티

Name of this integration.
public $name

$options 공개적으로 프로퍼티

Array of settings
public $options

$slug 공개적으로 프로퍼티

Slug, used as an unique identifier for this integration.
public $slug