• Resolved fancyfiber

    (@fancyfiber)


    Turning on WP_DEBUG gives these errors and troubleshooting down, discovered the error is in this plug-in.

    Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /www/smenet.cloudapp.net/wp-includes/functions.php on line 2959 Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /www/smenet.cloudapp.net/wp-includes/functions.php on line 2959

    The issue comes from lines 122 and 123 in start.php

    One possible solution (not FULLY tested, but should work):

    register_activation_hook( __FILE__, 'plugin_create_table_user_control' );
          add_action('wp_enqueue_scripts', 'usm_wp_enqueue_scripts');
    
    	/******************************* End Of Code To Create Table When Plugin Is Activated ****************************************************/
    
       function usm_wp_enqueue_scripts() {
    		wp_enqueue_script(array('jquery-ui-datepicker','jquery'));
    		wp_enqueue_style( 'jquery-style',plugin_dir_url(__FILE__).'css/jquery-ui.css');
       }
    	function add_user_USM($user_id) {

    Thanks.

    https://www.ads-software.com/extend/plugins/user-status-manager/

Viewing 1 replies (of 1 total)
  • Plugin Author Rahul Balakrishna

    (@rahulbalakrishna)

    Hello fancyfiber,

    Thank you for your concern, but FYI every plugin is reviewed and the approved and if there is any mistake then we get a reply from them as i got for my first plugin.

    And regarding warning, i am keeping this plug-in update on regular basis as you can see the change log, so if new version of wordpress is released then I personally check if everything is working. So don’t worry about the functionality or performance point as I am working hard on it, to provide the best from my side.

    And again I would thank you for showing interest in the plug-in and for appreciate for the concerns raised. Will test the above code then will add it to my next version.

    Regards,
    Rahul

Viewing 1 replies (of 1 total)
  • The topic ‘wp_enqueue_script and wp_enqueue_style used incorrectly’ is closed to new replies.