Changeset 12053
- Timestamp:
- 05/03/2018 07:56:54 PM (7 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php
r12027 r12053 108 108 function bp_nouveau_ajax_messages_send_reply() { 109 109 $response = array( 110 'feedback' => __( 'There was a problem sending your reply. Please try again.', 'buddypress' ),110 'feedback' => '<div class="bp-feedback error"><span class="bp-icon" aria-hidden="true"></span><p>' . __( 'There was a problem sending your reply. Please try again.', 'buddypress' ) . '</p></div>', 111 111 'type' => 'error', 112 112 ); … … 198 198 global $messages_template; 199 199 200 if ( empty( $_POST['nonce'] ) || !wp_verify_nonce( $_POST['nonce'], 'bp_nouveau_messages' ) ) {200 if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'bp_nouveau_messages' ) ) { 201 201 wp_send_json_error( array( 202 202 'feedback' => '<div class="bp-feedback error"><span class="bp-icon" aria-hidden="true"></span><p>' . __( 'Unauthorized request.', 'buddypress' ) . '</p></div>', -
trunk/src/bp-templates/bp-nouveau/js/buddypress-messages.js
r12052 r12053 1210 1210 }, 1211 1211 1212 messagesFetchError: function( collection ) { 1213 console.log( collection ); 1212 messagesFetchError: function( collection, response ) { 1213 if ( response.feedback && response.type ) { 1214 bp.Nouveau.Messages.displayFeedback( response.feedback, response.type ); 1215 } 1214 1216 }, 1215 1217 … … 1253 1255 1254 1256 replyError: function( response ) { 1255 console.log( response ); 1257 if ( response.feedback && response.type ) { 1258 bp.Nouveau.Messages.displayFeedback( response.feedback, response.type ); 1259 } 1256 1260 } 1257 1261 } );
Note: See TracChangeset
for help on using the changeset viewer.