wp_enqueue_script was called incorrectly
-
I’m getting this warning when WP_DEBUG is on:
wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the
wp_enqueue_scripts
,admin_enqueue_scripts
, orinit
hooks. Please see Debugging in WordPress for more information.The error is in reference to line 601 of the
rssimport.php
file.Basically the stuff in this block
if ( is_admin() && FB_RSSI_QUICKTAG ) { if ( version_compare( $GLOBALS['wp_version'], '3.3alpha', '>=' ) ) { $post_page_pages = array('post-new.php', 'post.php', 'page-new.php', 'page.php'); if ( in_array( $pagenow, $post_page_pages ) ) { wp_enqueue_script( 'rssimport_insert_button', plugin_dir_url( __FILE__) . '/js/quicktag.js', array( 'quicktags' ) ); add_action( 'admin_print_scripts', 'rssimport_insert_button' ); } } else { add_action( 'admin_footer', 'RSSImport_insert_button' ); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_enqueue_script was called incorrectly’ is closed to new replies.