PHP Interface Inpsyde\MultilingualPress\Asset\Script

Since: 3.0.0
Inheritance: extends Inpsyde\MultilingualPress\Asset\Asset
Datei anzeigen Open project: inpsyde/multilingual-press

Public Methods

Method Description
add_data ( string $object_name, array $data ) : static Makes the given data available for the script.
clear_data ( ) : static Clears the data so it won't be output another time.
data ( ) : array[] Returns all data to be made available for the script.

Method Details

add_data() public method

Makes the given data available for the script.
Since: 3.0.0
public add_data ( string $object_name, array $data ) : static
$object_name string The name of the JavaScript variable holding the data.
$data array The data to be made available for the script.
return static Script instance.

clear_data() public method

Clears the data so it won't be output another time.
Since: 3.0.0
public clear_data ( ) : static
return static Script instance.

data() public method

Returns all data to be made available for the script.
Since: 3.0.0
public data ( ) : array[]
return array[] Data to be made available for the script.