Skip to content

Commit

Permalink
Editor: Fix the JS to select, save, and update categories on the old …
Browse files Browse the repository at this point in the history
…Edit Post screen.

Props: charleslf, im3dabasia1, desrosj, dhruvang21, Zargarov, sainathpoojary, azaozz
Fixes: #62440

git-svn-id: https://develop.svn.wordpress.org/trunk@59414 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
azaozz committed Nov 18, 2024
1 parent 0a6666b commit 2d5431d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/js/_enqueues/admin/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,10 @@ jQuery( function($) {
'li.popular-category > label input[type="checkbox"]',
function() {
var t = $(this), c = t.is(':checked'), id = t.val();
if ( id && t.parents('#taxonomy-'+taxonomy).length )
$('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c );
if ( id && t.parents('#taxonomy-'+taxonomy).length ) {
$('input[id^="in-' + taxonomy + '-' + id + '"]').prop('checked', c);
$('input#in-popular-' + taxonomy + '-' + id).prop('checked', c);
}
}
);

Expand Down

0 comments on commit 2d5431d

Please sign in to comment.