PHP Class MC4WP_Form_Tags

显示文件 Open project: dannyvankooten/mailchimp-for-wordpress Class Usage Examples

Protected Properties

Property Type Description
$form MC4WP_Form
$form_element MC4WP_Form_Element
$tags MC4WP_Dynamic_Content_Tags

Public Methods

Method Description
__construct ( ) Constructor
add_hooks ( )
get ( ) : array
get_cookie ( array $args = [] ) : string Gets data variable from cookie.
get_data ( $args = [] ) : string Gets data value from GET or POST variables.
get_email ( ) : string
get_form_response ( ) : string Returns the form response
get_post_property ( $args = [] ) * Get property of viewed post
get_subscriber_count ( ) : integer Returns the number of subscribers on the selected lists (for the form context)
get_user_property ( $args = [] ) * Get property of currently logged-in user
register ( array $tags ) : array
replace ( string $string, MC4WP_Form $form, MC4WP_Form_Element $element = null ) : string Replaces the registered tags in the given string
replace_in_url ( $string, MC4WP_Form $form ) : string

Method Details

__construct() public method

Constructor
public __construct ( )

add_hooks() public method

public add_hooks ( )

get() public method

public get ( ) : array
return array

get_data() public method

Gets data value from GET or POST variables.
public get_data ( $args = [] ) : string
$args
return string

get_email() public method

public get_email ( ) : string
return string

get_form_response() public method

Returns the form response
public get_form_response ( ) : string
return string

get_post_property() public method

* Get property of viewed post
public get_post_property ( $args = [] )
$args

get_subscriber_count() public method

Returns the number of subscribers on the selected lists (for the form context)
public get_subscriber_count ( ) : integer
return integer

get_user_property() public method

* Get property of currently logged-in user
public get_user_property ( $args = [] )
$args

register() public method

public register ( array $tags ) : array
$tags array
return array

replace() public method

Replaces the registered tags in the given string
public replace ( string $string, MC4WP_Form $form, MC4WP_Form_Element $element = null ) : string
$string string
$form MC4WP_Form
$element MC4WP_Form_Element
return string

replace_in_url() public method

public replace_in_url ( $string, MC4WP_Form $form ) : string
$string
$form MC4WP_Form
return string

Property Details

$form protected_oe property

protected MC4WP_Form $form
return MC4WP_Form

$form_element protected_oe property

protected MC4WP_Form_Element $form_element
return MC4WP_Form_Element

$tags protected_oe property

protected MC4WP_Dynamic_Content_Tags $tags
return MC4WP_Dynamic_Content_Tags