[wp-trac] [WordPress Trac] #62360: Child category lost indention (margin-left) when it's checked but its parent not checked

WordPress Trac noreply at wordpress.org
Wed Nov 13 06:56:10 UTC 2024


#62360: Child category lost indention (margin-left) when it's checked but its
parent not checked
--------------------------+------------------------------
 Reporter:  unicornboat   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  6.6.2
 Severity:  trivial       |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by ankitkumarshah):

 Hi @unicornboat,

 Thank you so much for providing the additional details. I was able to
 successfully reproduce the issue you described.

 https://postimg.cc/t1KC5fdJ

 After conducting some research and reviewing the core code, I discovered
 that this behavior is intentional. If you’d like the indentation to remain
 persistent, you might consider using the `wp_terms_checklist_args filter`.

 Here is a code snippet that demonstrates how you can achieve this:


 {{{
 add_filter('wp_terms_checklist_args', 'modify_category');

 function modify_category($args) {
     $args['checked_ontop'] = false;
     return $args;
 }
 }}}

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


More information about the wp-trac mailing list