WordPress.org

WordPRess GSoC Trac

Changeset 2343


Ignore:
Timestamp:
09/21/13 09:31:02 (7 months ago)
Author:
rmccue
Message:

Register the correct URL for the JS library

Fixes #376

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/rmccue/trunk/plugin.php

    r2341 r2343  
    109109 */ 
    110110function json_register_scripts() { 
    111     wp_register_script( 'wp-api', plugins_url( dirname( __FILE__ ) . '/wp-api.js' ), array( 'jquery', 'backbone', 'underscore' ), '0.5', true ); 
     111    wp_register_script( 'wp-api', plugins_url( '/wp-api.js', __FILE__ ), array( 'jquery', 'backbone', 'underscore' ), '0.5', true ); 
    112112    wp_localize_script( 'wp-api', 'wpApiOptions', array( 'base' => json_url() ) ); 
    113113} 
Note: See TracChangeset for help on using the changeset viewer.