Changeset 8772
- Timestamp:
- 08/09/2014 04:22:03 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
-
bp-core/bp-core-cssjs.php (modified) (2 diffs)
-
bp-core/deprecated/2.1.php (modified) (1 diff)
-
bp-templates/bp-legacy/buddypress-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-cssjs.php
r8770 r8772 16 16 */ 17 17 function bp_core_register_common_scripts() { 18 $ ext = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js';18 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 19 19 $url = buddypress()->plugin_url . 'bp-core/js/'; 20 20 … … 22 22 23 23 // Legacy 24 'bp-confirm' => array( 'file' => "{$url}confirm{$ ext}", 'dependencies' => array( 'jquery' ) ),25 'bp-widget-members' => array( 'file' => "{$url}widget-members{$ ext}", 'dependencies' => array( 'jquery' ) ),26 'bp-jquery-query' => array( 'file' => "{$url}jquery-query{$ ext}", 'dependencies' => array( 'jquery' ) ),27 'bp-jquery-cookie' => array( 'file' => "{$url}jquery-cookie{$ ext}", 'dependencies' => array( 'jquery' ) ),24 'bp-confirm' => array( 'file' => "{$url}confirm{$min}.js", 'dependencies' => array( 'jquery' ) ), 25 'bp-widget-members' => array( 'file' => "{$url}widget-members{$min}.js", 'dependencies' => array( 'jquery' ) ), 26 'bp-jquery-query' => array( 'file' => "{$url}jquery-query{$min}.js", 'dependencies' => array( 'jquery' ) ), 27 'bp-jquery-cookie' => array( 'file' => "{$url}jquery-cookie{$min}.js", 'dependencies' => array( 'jquery' ) ), 28 28 29 29 // 2.1 30 'jquery-caret' => array( 'file' => "{$url}jquery.caret{$ ext}", 'dependencies' => array( 'jquery' ) ),31 'jquery-atwho' => array( 'file' => "{$url}jquery.atwho{$ ext}", 'dependencies' => array( 'jquery', 'jquery-caret' ) ),30 'jquery-caret' => array( 'file' => "{$url}jquery.caret{$min}.js", 'dependencies' => array( 'jquery' ) ), 31 'jquery-atwho' => array( 'file' => "{$url}jquery.atwho{$min}.js", 'dependencies' => array( 'jquery', 'jquery-caret' ) ), 32 32 ) ); 33 33 -
trunk/src/bp-core/deprecated/2.1.php
r8770 r8772 17 17 */ 18 18 function bp_core_register_deprecated_scripts() { 19 $ ext = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js';19 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 20 20 $url = buddypress()->plugin_url . 'bp-core/deprecated/js/'; 21 21 22 22 $scripts = apply_filters( 'bp_core_register_deprecated_scripts', array( 23 23 24 // Core 24 'bp-jquery-scroll-to' => 'jquery-scroll-to', 25 'bp-jquery-scroll-to' => array( 26 'file' => "{$url}jquery-scroll-to{$min}.js", 27 'dependencies' => array( 'jquery' ), 28 ), 25 29 26 30 // Messages 27 'bp-jquery-autocomplete' => 'autocomplete/jquery.autocomplete', 28 'bp-jquery-autocomplete-fb' => 'autocomplete/jquery.autocompletefb', 29 'bp-jquery-bgiframe' => 'autocomplete/jquery.bgiframe', 30 'bp-jquery-dimensions' => 'autocomplete/jquery.dimensions', 31 'bp-jquery-autocomplete' => array( 32 'file' => "{$url}autocomplete/jquery.autocomplete{$min}.js", 33 'dependencies' => array( 'jquery' ), 34 ), 35 36 'bp-jquery-autocomplete-fb' => array( 37 'file' => "{$url}autocomplete/jquery.autocompletefb{$min}.js", 38 'dependencies' => array( 'jquery' ), 39 ), 40 41 'bp-jquery-bgiframe' => array( 42 'file' => "{$url}autocomplete/jquery.bgiframe{$min}.js", 43 'dependencies' => array( 'jquery' ), 44 ), 45 46 'bp-jquery-dimensions' => array( 47 'file' => "{$url}autocomplete/jquery.dimensions{$min}.js", 48 'dependencies' => array( 'jquery' ), 49 ), 31 50 ) ); 32 51 33 foreach ( $scripts as $id => $ file) {34 wp_register_script( $id, $ url . $file . $ext, array( 'jquery' ), bp_get_version(), true );52 foreach ( $scripts as $id => $script ) { 53 wp_register_script( $id, $script['file'], $script['dependencies'], bp_get_version(), true ); 35 54 } 36 55 } -
trunk/src/bp-templates/bp-legacy/buddypress-functions.php
r8770 r8772 203 203 204 204 // Locate the BP stylesheet 205 $asset = $this->locate_asset_in_stack( 'buddypress.css', 'css' );205 $asset = $this->locate_asset_in_stack( "buddypress{$min}.css", 'css' ); 206 206 207 207 // Enqueue BuddyPress-specific styling, if found … … 222 222 */ 223 223 public function enqueue_scripts() { 224 225 $file = 'buddypress.js'; 224 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 226 225 227 226 // Locate the BP JS file 228 $asset = $this->locate_asset_in_stack( $file, 'js' );227 $asset = $this->locate_asset_in_stack( "buddypress{$min}.js", 'js' ); 229 228 230 229 // Enqueue the global JS, if found - AJAX will not work … … 260 259 // Maybe enqueue password verify JS (register page or user settings page) 261 260 if ( bp_is_register_page() || ( function_exists( 'bp_is_user_settings_general' ) && bp_is_user_settings_general() ) ) { 262 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';263 $filename = "password-verify{$min}.js";264 261 265 262 // Locate the Register Page JS file 266 $asset = $this->locate_asset_in_stack( $filename, 'js' ); 267 268 // Enqueue script 263 $asset = $this->locate_asset_in_stack( "password-verify{$min}.js", 'js' ); 264 269 265 $dependencies = array_merge( bp_core_get_js_dependencies(), array( 270 266 'password-strength-meter', 271 267 ) ); 268 269 // Enqueue script 272 270 wp_enqueue_script( $asset['handle'] . '-password-verify', $asset['location'], $dependencies, $this->version); 273 271 }
Note: See TracChangeset
for help on using the changeset viewer.