WordPress.org

Ready to get started?Download WordPress

Forums

Inline Upload
wp_enqueue_style was called incorrectly (4 posts)

  1. shparekh
    Member
    Posted 1 year ago #

    Hi,

    I am new to wordpress. Wondering if I should bother with proceeding with this plugin in my 3.4.1 WordPress Install. I'd really like the promise of this plugin.

    I get following error -

    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 /hermes/bosweb/web269/b2693/ipg.orangeflutecom/betasite/wp-includes/functions.php on line 2748

    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 /hermes/bosweb/web269/b2693/ipg.orangeflutecom/betasite/wp-includes/functions.php on line 2748

    http://wordpress.org/extend/plugins/inline-upload/

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    They're only notices (ie "warnings") so your site should be fine for now but, unless the plugin is updated, you might run into problems later on.

  3. shparekh
    Member
    Posted 1 year ago #

    K. Thanks. I shall stay away from it until updated.

  4. Jonas Lundman
    Member
    Posted 1 year ago #

    Just wrap the problem in a function, located in inline_upload.php until author fixes an update.

    function inline_upload_enquene(){
    	wp_enqueue_style('inline-upload-style', '/'.PLUGINDIR .'/'.dirname(plugin_basename (__FILE__)).'/css/inline_upload_style.css',false,'1.0','all');
    	wp_enqueue_script('json_class', WP_CONTENT_URL.'/plugins/'.dirname(plugin_basename (__FILE__)).'/include/json2.js');
    	wp_enqueue_script('inline_upload_script', WP_CONTENT_URL.'/plugins/'.dirname(plugin_basename (__FILE__)).'/include/inline_upload_functions.js');
    }
    add_action( 'init', 'inline_upload_enquene' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic