PHP Class MC4WP_Form_Asset_Manager

Show file Open project: dannyvankooten/mailchimp-for-wordpress Class Usage Examples

Protected Properties

Property Type Description
$dummy_printed boolean
$filename_suffix string
$load_scripts boolean

Public Methods

Method Description
__construct ( ) MC4WP_Form_Asset_Manager constructor.
before_output_form ( ) Load JavaScript files
get_active_stylesheets ( ) : array Get array of stylesheet handles which should be enqueued.
get_javascript_config ( ) : array Get configuration object for client-side use.
get_registered_stylesheets ( ) : array
get_stylesheet_url ( string $stylesheet ) : string
hook ( ) Add hooks
is_registered_stylesheet ( string $stylesheet ) : boolean
load_scripts ( ) Outputs the inline JavaScript that is used to enhance forms
load_stylesheets ( ) Load the various stylesheets
print_dummy_javascript ( ) Prints dummy JavaScript which allows people to call mc4wp.forms.on() before the JS is loaded.
register_assets ( ) Register the various JS files used by the plugin

Method Details

__construct() public method

MC4WP_Form_Asset_Manager constructor.
public __construct ( )

before_output_form() public method

Load JavaScript files
public before_output_form ( )

get_active_stylesheets() public method

Get array of stylesheet handles which should be enqueued.
public get_active_stylesheets ( ) : array
return array

get_javascript_config() public method

Get configuration object for client-side use.
public get_javascript_config ( ) : array
return array

get_registered_stylesheets() public method

public get_registered_stylesheets ( ) : array
return array

get_stylesheet_url() public method

public get_stylesheet_url ( string $stylesheet ) : string
$stylesheet string
return string

hook() public method

Add hooks
public hook ( )

is_registered_stylesheet() public method

public is_registered_stylesheet ( string $stylesheet ) : boolean
$stylesheet string
return boolean

load_scripts() public method

Outputs the inline JavaScript that is used to enhance forms
public load_scripts ( )

load_stylesheets() public method

Load the various stylesheets
public load_stylesheets ( )

print_dummy_javascript() public method

Prints dummy JavaScript which allows people to call mc4wp.forms.on() before the JS is loaded.

register_assets() public method

Register the various JS files used by the plugin
Deprecation: 3.1.9
public register_assets ( )

Property Details

$dummy_printed protected property

protected bool $dummy_printed
return boolean

$filename_suffix protected property

protected string $filename_suffix
return string

$load_scripts protected property

protected bool $load_scripts
return boolean