PHP Class MC4WP_Admin

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

Protected Properties

Свойство Type Description
$ads MC4WP_Admin_Ads
$mailchimp MC4WP_MailChimp
$messages MC4WP_Admin_Messages
$plugin_file The relative path to the main plugin file from the plugins dir
$tools MC4WP_Admin_Tools

Méthodes publiques

Méthode Description
__construct ( MC4WP_Admin_Tools $tools, MC4WP_Admin_Messages $messages, MC4WP_MailChimp $mailchimp ) Constructor
add_hooks ( ) Registers all hooks
add_menu_item ( array $item )
build_menu ( ) Register the setting pages and their menu items
customize_admin_texts ( ) Customize texts throughout WP Admin
dismiss_api_key_notice ( ) Dismisses the API key notice for 1 week
empty_debug_log ( ) Empties the log file
enqueue_assets ( ) : boolean Load scripts and stylesheet on MailChimp for WP Admin pages
initialize ( ) Initializes various stuff used in WP Admin
listen_for_actions ( ) Listen for _mc4wp_action requests
register_dashboard_widgets ( ) Register dashboard widgets
renew_lists_cache ( ) Renew MailChimp lists cache
save_general_settings ( array $settings ) : array Validates the General settings
show_api_key_notice ( ) Shows a notice when API key is not set.
show_generals_setting_page ( ) Show the API Settings page
show_other_setting_page ( ) Show the Other Settings page
sort_menu_items_by_position ( $a, $b ) : integer

Méthodes protégées

Méthode Description
get_api ( ) : MC4WP_API_v3
get_log ( ) : MC4WP_Debug_Log

Private Methods

Méthode Description
init_upgrade_routines ( ) Upgrade routine
load_translations ( ) Load the plugin translations

Method Details

__construct() public méthode

Constructor
public __construct ( MC4WP_Admin_Tools $tools, MC4WP_Admin_Messages $messages, MC4WP_MailChimp $mailchimp )
$tools MC4WP_Admin_Tools
$messages MC4WP_Admin_Messages
$mailchimp MC4WP_MailChimp

add_hooks() public méthode

Registers all hooks
public add_hooks ( )

add_menu_item() public méthode

public add_menu_item ( array $item )
$item array

build_menu() public méthode

Register the setting pages and their menu items
public build_menu ( )

customize_admin_texts() public méthode

Customize texts throughout WP Admin

dismiss_api_key_notice() public méthode

Dismisses the API key notice for 1 week

empty_debug_log() public méthode

Empties the log file
public empty_debug_log ( )

enqueue_assets() public méthode

Load scripts and stylesheet on MailChimp for WP Admin pages
public enqueue_assets ( ) : boolean
Résultat boolean

get_api() protected méthode

protected get_api ( ) : MC4WP_API_v3
Résultat MC4WP_API_v3

get_log() protected méthode

protected get_log ( ) : MC4WP_Debug_Log
Résultat MC4WP_Debug_Log

initialize() public méthode

- Registers settings
public initialize ( )

listen_for_actions() public méthode

Listen for _mc4wp_action requests
public listen_for_actions ( )

register_dashboard_widgets() public méthode

Register dashboard widgets

renew_lists_cache() public méthode

Renew MailChimp lists cache
public renew_lists_cache ( )

save_general_settings() public méthode

Validates the General settings
public save_general_settings ( array $settings ) : array
$settings array
Résultat array

show_api_key_notice() public méthode

Shows a notice when API key is not set.
public show_api_key_notice ( )

show_generals_setting_page() public méthode

Show the API Settings page

show_other_setting_page() public méthode

Show the Other Settings page

sort_menu_items_by_position() public méthode

public sort_menu_items_by_position ( $a, $b ) : integer
$a
$b
Résultat integer

Property Details

$ads protected_oe property

protected MC4WP_Admin_Ads $ads
Résultat MC4WP_Admin_Ads

$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

$plugin_file protected_oe property

The relative path to the main plugin file from the plugins dir
protected $plugin_file

$tools protected_oe property

protected MC4WP_Admin_Tools $tools
Résultat MC4WP_Admin_Tools