Changeset 627800
- Timestamp:
- 11/20/2012 05:34:31 PM (13 years ago)
- File:
-
- 1 edited
-
jetpack/trunk/modules/notes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jetpack/trunk/modules/notes.php
r621844 r627800 74 74 return; 75 75 add_action( 'admin_bar_menu', array( &$this, 'admin_bar_menu'), 120 ); 76 add_action( 'wp_head', array( &$this, 'styles_and_scripts') );76 add_action( 'wp_head', array( &$this, 'styles_and_scripts'), 120 ); 77 77 add_action( 'admin_head', array( &$this, 'styles_and_scripts') ); 78 78 } … … 83 83 84 84 $this->print_js(); 85 86 // attempt to use core or plugin libraries if registered 87 if ( wp_script_is( 'mustache', 'registered' ) ) { 88 if ( !wp_script_is( 'mustache', 'queue' ) ) { 89 wp_enqueue_script( 'mustache' ); 90 } 91 } 92 else { 93 wp_enqueue_script( 'mustache', $this->wpcom_static_url( '/wp-content/js/mustache.js' ), null, JETPACK_NOTES__CACHE_BUSTER ); 94 } 95 96 if ( wp_script_is( 'underscore', 'registered' ) ) { 97 if ( !wp_script_is( 'underscore', 'queue' ) ) { 98 wp_enqueue_script( 'underscore' ); 99 } 100 } 101 else { 102 wp_enqueue_script( 'underscore', $this->wpcom_static_url( '/wp-content/js/underscore.js' ), null, JETPACK_NOTES__CACHE_BUSTER ); 103 } 104 if ( wp_script_is( 'backbone', 'registered' ) ) { 105 if ( !wp_script_is( 'backbone', 'queue' ) ) { 106 wp_enqueue_script( 'backbone' ); 107 } 108 } 109 else { 110 wp_enqueue_script( 'backbone', $this->wpcom_static_url( '/wp-content/js/backbone.js' ), array( 'jquery', 'underscore' ), JETPACK_NOTES__CACHE_BUSTER ); 111 } 112 85 113 wp_enqueue_script( 'notes-postmessage', $this->wpcom_static_url( '/wp-content/js/postmessage.js' ), array(), JETPACK_NOTES__CACHE_BUSTER ); 86 wp_enqueue_script( 'mustache', $this->wpcom_static_url( '/wp-content/js/mustache.js' ), null, JETPACK_NOTES__CACHE_BUSTER );87 wp_enqueue_script( 'underscore', $this->wpcom_static_url( '/wp-content/js/underscore.js' ), null, JETPACK_NOTES__CACHE_BUSTER );88 wp_enqueue_script( 'backbone', $this->wpcom_static_url( '/wp-content/js/backbone.js' ), array( 'jquery', 'underscore' ), JETPACK_NOTES__CACHE_BUSTER );89 114 wp_enqueue_script( 'notes-rest-common', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/notes-rest-common.js' ), array( 'backbone', 'mustache', 'jquery.spin' ), JETPACK_NOTES__CACHE_BUSTER ); 90 115 wp_enqueue_script( 'notes-admin-bar-rest', $this->wpcom_static_url( '/wp-content/mu-plugins/notes/admin-bar-rest.js' ), array( 'jquery', 'underscore', 'backbone', 'jquery.spin' ), JETPACK_NOTES__CACHE_BUSTER );
Note: See TracChangeset
for help on using the changeset viewer.