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
Built from https://develop.svn.wordpress.org/trunk@59414


git-svn-id: https://core.svn.wordpress.org/trunk@58800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
azaozz committed Nov 18, 2024
1 parent 6b93ef7 commit 5041af9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions wp-admin/js/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
Loading

0 comments on commit 5041af9

Please sign in to comment.