diff --git bp-core/bp-core-cssjs.php bp-core/bp-core-cssjs.php
index b1ddb2c..cc62c4f 100644
|
|
function bp_core_confirmation_js() { |
14 | 14 | if ( !wp_script_is( 'jquery', 'done' ) ) |
15 | 15 | wp_print_scripts( 'jquery' ); ?> |
16 | 16 | |
17 | | <script type="text/javascript"> jQuery(document).ready( function() { jQuery("a.confirm").click( function() { if ( confirm( '<?php _e( 'Are you sure?', 'buddypress' ) ?>' ) ) return true; else return false; }); });</script> |
| 17 | <script type="text/javascript"> jQuery(document).ready( function() { |
| 18 | jQuery("body").click( function(e) { |
| 19 | if ( 'a' == e.target.nodeName.toLowerCase() && jQuery(e.target).hasClass( 'confirm' ) ) { |
| 20 | if ( confirm( '<?php _e( 'Are you sure?', 'buddypress' ) ?>' ) ) |
| 21 | return true; else return false; |
| 22 | } else { |
| 23 | return true; |
| 24 | } |
| 25 | }); });</script> |
18 | 26 | |
19 | 27 | <?php |
20 | 28 | } |
21 | | add_action( 'wp_head', 'bp_core_confirmation_js', 100 ); |
| 29 | add_action( 'wp_head', 'bp_core_confirmation_js', 1 ); |
22 | 30 | |
23 | 31 | /** |
24 | 32 | * bp_core_add_jquery_cropper() |
… |
… |
function bp_core_add_ajax_url_js() { |
140 | 148 | } |
141 | 149 | add_action( 'wp_head', 'bp_core_add_ajax_url_js' ); |
142 | 150 | |
143 | | ?> |
144 | | No newline at end of file |
| 151 | ?> |