I've made a Wordpress plugin, and I'm trying to add javascript to the admin head. I've tried but couldn't managed to do it, could anyone help? Bellow is what I was going with:
function __construct() {
add_action('wp_head', 'wpb_hook_javascript');
}
function wpb_hook_javascript() {
?>
<script>
// javscript code
</script>
<?php
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…