[wp-trac] [WordPress Trac] #55078: Remove hardcoded check for edit-tags.php from lib/ajax-response.js

WordPress Trac noreply at wordpress.org
Fri Feb 4 13:03:40 UTC 2022


#55078: Remove hardcoded check for edit-tags.php from lib/ajax-response.js
----------------------------+------------------------------
 Reporter:  SergeyBiryukov  |       Owner:  (none)
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  javascript
----------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> Background: #42937, #54955.
>
> As a result of [52170] and [52672], `_enqueues/lib/ajax-response.js` has
> a [source:trunk/src/js/_enqueues/lib/ajax-
> response.js?rev=52672&marks=30-32#L20 hardcoded check for edit-tags.php],
> which seems unnecessarily specific.
>
> We should find a better way to pass the success message in an Ajax
> response, that could also be reused in other places. Maybe passing it as
> part of the `supplemental` data would work?

New description:

 Background: #42937, #54955.

 As a result of [52170] and [52672], `_enqueues/lib/ajax-response.js` has a
 [source:trunk/src/js/_enqueues/lib/ajax-
 response.js?rev=52672&marks=30-32#L20 hardcoded check for edit-tags.php],
 which seems unnecessarily specific. As noted in comment:6:ticket:54955,
 this is less than ideal and was added as a temporary measure.

 We should find a better way to pass the success message in an Ajax
 response, that could also be reused in other places. Maybe passing it as
 part of the `supplemental` data would work?

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55078#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list