[wp-meta] [Making WordPress.org] #7981: Fix category ID selector in WordPress.tv editor
Making WordPress.org
noreply at wordpress.org
Sat May 24 14:48:28 UTC 2025
#7981: Fix category ID selector in WordPress.tv editor
--------------------------+---------------------
Reporter: nilovelez | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: WordPress.tv | Resolution:
Keywords: has-patch |
--------------------------+---------------------
Comment (by nilovelez):
I can't find the changeset, but the HTML of the elements in the categories
metabox is now like this:
{{{
<li id="in-category-2757063-1">
<label class="selectit">
<input value="2757063" type="checkbox" name="post_category[]" id
="in-category-2757063-2" checked="checked"> 2025
</label>
</li>
}}}
The <li> tag has now a -1 and the checkbox a -2 to prevent duplicate ids
The javascript from the editor uses that id to query the element, grab the
title and check it when clicked.
There's a hundred better ways of doing this, but for now it's just a
hotfix until we have a new version.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7981#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list