Support » Developing with WordPress » 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

    • This topic was modified 3 weeks, 4 days ago by  cheater111.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.