Scripts in admin-panel
-
Hello everyone, I am writing a plugin that requires connecting a script, for which I am writing the following code
`
function oc_script_tax( $hook ) {if ( ‘edit-tags.php’ === $hook ) {
wp_enqueue_scripts( ‘oc-taxonomy’, plugin_dir_path(__FILE__) .’/js/taxonomy.js’, array(), ‘1.0’, true );
}
}
add_action( ‘admin_enqueue_scripts’, ‘oc_script_tax’ );`
but instead of the script all styles and scripts of the current theme are connected without my script. where is the mistake? thank you in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Scripts in admin-panel’ is closed to new replies.