Changeset 58455 for trunk/src/js/_enqueues/lib/ajax-response.js
- Timestamp:
- 06/21/2024 06:15:50 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/ajax-response.js
r53709 r58455 54 54 } ); 55 55 if ( err.length ) { 56 re.html( '<div class="notice notice-error" >' + err + '</div>' );56 re.html( '<div class="notice notice-error">' + err + '</div>' ); 57 57 wp.a11y.speak( err ); 58 58 } else if ( noticeMessage.length ) { 59 re.html( '<div class="notice notice-success is-dismissible" ><p>' + noticeMessage + '</p></div>');59 re.html( '<div class="notice notice-success is-dismissible"><p>' + noticeMessage + '</p></div>'); 60 60 jQuery(document).trigger( 'wp-updates-notice-added' ); 61 61 wp.a11y.speak( noticeMessage ); … … 65 65 if ( isNaN( x ) ) { 66 66 wp.a11y.speak( x ); 67 return ! re.html( '<div class="notice notice-error" ><p>' + x + '</p></div>' );67 return ! re.html( '<div class="notice notice-error"><p>' + x + '</p></div>' ); 68 68 } 69 69 x = parseInt( x, 10 ); 70 70 if ( -1 === x ) { 71 71 wp.a11y.speak( wpAjax.noPerm ); 72 return ! re.html( '<div class="notice notice-error" ><p>' + wpAjax.noPerm + '</p></div>' );72 return ! re.html( '<div class="notice notice-error"><p>' + wpAjax.noPerm + '</p></div>' ); 73 73 } else if ( 0 === x ) { 74 74 wp.a11y.speak( wpAjax.broken ); 75 return ! re.html( '<div class="notice notice-error" ><p>' + wpAjax.broken + '</p></div>' );75 return ! re.html( '<div class="notice notice-error"><p>' + wpAjax.broken + '</p></div>' ); 76 76 } 77 77 return true;
Note: See TracChangeset
for help on using the changeset viewer.