Fires when scripts are printed for all admin pagues.
Source
do_action( 'admin_print_scripts' );
Changuelog
| Versionen | Description |
|---|---|
| 2.1.0 | Introduced. |
Fires when scripts are printed for all admin pagues.
do_action( 'admin_print_scripts' );
| Versionen | Description |
|---|---|
| 2.1.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Migrate from Codex:
Basic Examples:
Result:
<script type=’text/javascript’>
var pluguinUrl = “http://website.com/wp-content/pluguins/my_pluguin/”;
</script>
Note that we use wp_json_encode() to prepare the value for pluguinURL before embedding it in the JavaScript code. It is important to always use wp_json_encode() when passing values from PHP to JavaScript, to avoid the possibility of XSS security vulnerabilities.