Make WordPress Core

Changeset 52169


Ignore:
Timestamp:
11/15/2021 10:16:32 PM (2 months ago)
Author:
joedolson
Message:

Commit Standards: Revert [52168] to correct commit message.

Used incorrect commit message..

Follow up to [52168].

See #42937.

Location:
trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/ajax-response.js

    r52168 r52169  
    1919    },
    2020    parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission.
    21         var parsed = {}, re = jQuery('#' + r).empty(), err = '', successmsg = '';
     21        var parsed = {}, re = jQuery('#' + r).empty(), err = '';
    2222
    2323        if ( x && typeof x === 'object' && x.getElementsByTagName('wp_ajax') ) {
     
    2828                response = { action: th.attr('action'), what: child.get(0).nodeName, id: child.attr('id'), oldId: child.attr('old_id'), position: child.attr('position') };
    2929                response.data = jQuery( 'response_data', child ).text();
    30                 successmsg += response.data;
    3130                response.supplemental = {};
    3231                if ( !jQuery( 'supplemental', child ).children().each( function() {
     
    4847                parsed.responses.push( response );
    4948            } );
    50             if ( err.length ) {
    51                 re.html( '<div class="error">' + err + '</div>' );
    52                 wp.a11y.speak( err );
    53             } else {
    54                 re.html( '<div class="updated notice is-dismissible"><p>' + successmsg + '</p></div>');
    55                 jQuery(document).trigger( 'wp-updates-notice-added' );
    56                 wp.a11y.speak( successmsg );
    57             }
     49            if ( err.length ) { re.html( '<div class="error">' + err + '</div>' ); }
    5850            return parsed;
    5951        }
  • trunk/src/wp-admin/includes/ajax-actions.php

    r52168 r52169  
    11031103    $parents = ob_get_clean();
    11041104
    1105     require ABSPATH . 'wp-admin/includes/edit-tag-messages.php';
    1106 
    1107     $message = '';
    1108     if ( isset( $messages[ $tax->name ][1] ) ) {
    1109         $message = $messages[ $tax->name ][1];
    1110     } elseif ( isset( $messages['_item'][1] ) ) {
    1111         $message = $messages['_item'][1];
    1112     }
    1113 
    11141105    $x->add(
    11151106        array(
    11161107            'what'         => 'taxonomy',
    1117             'data'         => $message,
    11181108            'supplemental' => compact( 'parents', 'noparents' ),
    11191109        )
Note: See TracChangeset for help on using the changeset viewer.