PHP Class MC4WP_Forms_Admin

Afficher le fichier Open project: dannyvankooten/mailchimp-for-wordpress Class Usage Examples

Protected Properties

Свойство Type Description
$mailchimp MC4WP_MailChimp
$messages MC4WP_Admin_Messages

Méthodes publiques

Méthode Description
__construct ( MC4WP_Admin_Messages $messages, MC4WP_MailChimp $mailchimp )
add_hooks ( ) Add hooks
add_menu_item ( $items ) : mixed
enqueue_assets ( string $suffix, string $page = '' )
prepare_form_preview ( ) Prepares a Form Preview
process_add_form ( ) Act on the "add form" form
process_save_form ( ) Saves a form
redirect_to_form_action ( ) Redirect to correct form action
register_shortcake_ui ( ) Registers UI for when shortcake is activated
sanitize_form_data ( array $data ) : array
save_form ( array $data ) : integer Saves a form to the database
show_add_page ( ) Shows the "Add Form" page
show_edit_page ( ) Show the "Edit Form" page
show_forms_page ( ) Show the Forms Settings page
tab_url ( $tab ) : string Get URL for a tab on the current page.
update_form_stylesheets ( ) Goes through each form and aggregates array of stylesheet slugs to load.

Private Methods

Méthode Description
set_default_form_id ( integer $form_id )

Method Details

__construct() public méthode

public __construct ( MC4WP_Admin_Messages $messages, MC4WP_MailChimp $mailchimp )
$messages MC4WP_Admin_Messages
$mailchimp MC4WP_MailChimp

add_hooks() public méthode

Add hooks
public add_hooks ( )

add_menu_item() public méthode

public add_menu_item ( $items ) : mixed
$items
Résultat mixed

enqueue_assets() public méthode

public enqueue_assets ( string $suffix, string $page = '' )
$suffix string
$page string

prepare_form_preview() public méthode

Prepares a Form Preview

process_add_form() public méthode

Act on the "add form" form
public process_add_form ( )

process_save_form() public méthode

Saves a form
public process_save_form ( )

redirect_to_form_action() public méthode

Redirect to correct form action

register_shortcake_ui() public méthode

Registers UI for when shortcake is activated

sanitize_form_data() public méthode

public sanitize_form_data ( array $data ) : array
$data array
Résultat array

save_form() public méthode

Saves a form to the database
public save_form ( array $data ) : integer
$data array
Résultat integer

show_add_page() public méthode

Shows the "Add Form" page
public show_add_page ( )

show_edit_page() public méthode

Show the "Edit Form" page
public show_edit_page ( )

show_forms_page() public méthode

Show the Forms Settings page
public show_forms_page ( )

tab_url() public méthode

Get URL for a tab on the current page.
Since: 3.0
public tab_url ( $tab ) : string
$tab
Résultat string

update_form_stylesheets() public méthode

Goes through each form and aggregates array of stylesheet slugs to load.

Property Details

$mailchimp protected_oe property

protected MC4WP_MailChimp $mailchimp
Résultat MC4WP_MailChimp

$messages protected_oe property

protected MC4WP_Admin_Messages $messages
Résultat MC4WP_Admin_Messages