Function fm_add_script
Enqueue a script with a closure, optionally localizing data to it.
Package: Fieldmanager
See: wp_enqueue_script() for detail about $handle, $deps, $ver, and $in_footer.
See: wp_localize_script() for detail about $data_object and $data.
See: FM_GLOBAL_ASSET_VERSION for detail about the fallback value of $ver.
See: fieldmanager_get_baseurl() for detail about the fallback value of $plugin_dir.
Located at fieldmanager.php
See: wp_enqueue_script() for detail about $handle, $deps, $ver, and $in_footer.
See: wp_localize_script() for detail about $data_object and $data.
See: FM_GLOBAL_ASSET_VERSION for detail about the fallback value of $ver.
See: fieldmanager_get_baseurl() for detail about the fallback value of $plugin_dir.
Located at fieldmanager.php
Parameters summary
string |
$handle |
Script name. |
string |
$path |
The path to the file inside $plugin_dir. |
array |
$deps = array() |
Script dependencies. Default empty array. |
string|boolean |
$ver = false |
Script version. Default none. |
boolean |
$in_footer = false |
Whether to render the script in the footer. Default false. |
string |
$data_object = '' |
The $object_name in wp_localize_script(). Default none. |
array |
$data = array() |
The $l10n in wp_localize_script(). Default empty array. |
string |
$plugin_dir = '' |
The base URL to the directory with the script. Default none. |
boolean |
$admin = true |
Unused. |