Changeset 10446 for trunk/src/bp-core/deprecated/2.1.php
- Timestamp:
- 01/12/2016 04:04:52 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/deprecated/2.1.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/deprecated/2.1.php
r10108 r10446 17 17 */ 18 18 function bp_core_register_deprecated_scripts() { 19 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 20 $url = buddypress()->plugin_url . 'bp-core/deprecated/js/'; 21 22 $scripts = apply_filters( 'bp_core_register_deprecated_scripts', array( 23 24 // Messages 25 'bp-jquery-autocomplete' => array( 26 'file' => "{$url}autocomplete/jquery.autocomplete{$min}.js", 27 'dependencies' => array( 'jquery' ), 28 ), 29 30 'bp-jquery-autocomplete-fb' => array( 31 'file' => "{$url}autocomplete/jquery.autocompletefb{$min}.js", 32 'dependencies' => array( 'jquery' ), 33 ), 34 35 'bp-jquery-bgiframe' => array( 36 'file' => "{$url}autocomplete/jquery.bgiframe{$min}.js", 37 'dependencies' => array( 'jquery' ), 38 ), 39 40 'bp-jquery-dimensions' => array( 41 'file' => "{$url}autocomplete/jquery.dimensions{$min}.js", 42 'dependencies' => array( 'jquery' ), 43 ), 44 ) ); 45 46 foreach ( $scripts as $id => $script ) { 47 wp_register_script( $id, $script['file'], $script['dependencies'], bp_get_version(), true ); 48 } 49 } 50 add_action( 'bp_enqueue_scripts', 'bp_core_register_deprecated_scripts', 1 ); 19 // Scripts undeprecated as of 2.5.0. 20 } 51 21 52 22 /** … … 56 26 */ 57 27 function bp_core_register_deprecated_styles() { 58 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 59 $url = buddypress()->plugin_url . 'bp-core/deprecated/css/'; 60 61 $styles = apply_filters( 'bp_core_register_deprecated_styles', array( 62 // Messages 63 'bp-messages-autocomplete' => array( 64 'file' => "{$url}autocomplete/jquery.autocompletefb{$min}.css", 65 'dependencies' => array(), 66 ) 67 ) ); 68 69 foreach ( $styles as $id => $style ) { 70 wp_register_style( $id, $style['file'], $style['dependencies'], bp_get_version() ); 71 72 wp_style_add_data( $id, 'rtl', true ); 73 if ( $min ) { 74 wp_style_add_data( $id, 'suffix', $min ); 75 } 76 } 77 } 78 add_action( 'bp_enqueue_scripts', 'bp_core_register_deprecated_styles', 1 ); 28 // Scripts undeprecated as of 2.5.0. 29 } 79 30 80 31 /** BuddyBar *****************************************************************/
Note: See TracChangeset
for help on using the changeset viewer.