Amplification requests, wrong enqueing of scripts
-
buddypress-compliments/bp-compliments.php: define( ‘BP_COMPLIMENTS_URL’, plugin_dir_url( __FILE__ ) );
buddypress-compliments/bp-compliments-core.php: wp_enqueue_script( ‘bp-compliments-js’, constant( ‘BP_COMPLIMENTS_URL’ ) . ‘js/bp-compliments.js’, array( ‘jquery’ ) );
buddypress-compliments/bp-compliments-core.php: wp_register_style( ‘bp-compliments-css’, constant( ‘BP_COMPLIMENTS_URL’ ) . ‘css/bp-compliments.css’ );
buddypress-compliments/includes/bp-compliments-taxonomies.php: wp_enqueue_script( ‘compliments-adminjs’, constant( ‘BP_COMPLIMENTS_URL’ ) . ‘js/admin.js’, array(), false, true );You must not enqueue scripts and css using the URL – plugin_dir_url(), but rather the plugin path. Currently, this makes WordPress request these files over http from itself.
- The topic ‘Amplification requests, wrong enqueing of scripts’ is closed to new replies.