My plugin isn’t working
-
I’m creating a plugin to modify another plugin, but when I activate it, it doesn’t work. I checked the code and saw that the scripts I call are commented out. Is there a reason why the scripts are being commented out? The main plugin code is below:
<?php /* Plugin Name: Divi Staff Extras Plugin URI: https://just-us.agency/ Description: An update to Divi staff to override the tabs at the top of the team page Version: 1.0 Author: Charlie Evans Author URI: https://just-us.agency License: GPL */ if ( ! defined( 'ABSPATH' ) ) exit; function dropdown_enqueue() { wp_register_script( 'staff_dropdown', plugin_dir_url(__FILE__) . 'dropdown.js', array( 'jquery' ), TRUE); wp_register_script( 'switcheroo', plugin_dir_url(__FILE__) . 'switcheroo.js', array( 'jquery'), TRUE); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'staff_dropdown' ); wp_enqueue_script( 'switcheroo' ); } add_action( 'init', 'dropdown_enqueue' );
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘My plugin isn’t working’ is closed to new replies.