WordPress.org

Make WordPress Core

Ticket #20054: 20054.diff

File 20054.diff, 652 bytes (added by scribu, 4 years ago)
  • wp-admin/includes/template.php

    diff --git wp-admin/includes/template.php wp-admin/includes/template.php
    index b3bdb9d..3eb3ea3 100644
    function wp_terms_checklist($post_id = 0, $args = array()) { 
    121121                $categories = (array) get_terms($taxonomy, array('get' => 'all')); 
    122122        } 
    123123 
    124         if ( $checked_ontop ) { 
     124        if ( apply_filters( 'show_checked_terms_on_top', $checked_ontop ) ) { 
    125125                // Post process $categories rather than adding an exclude to the get_terms() query to keep the query the same across all posts (for any query cache) 
    126126                $checked_categories = array(); 
    127127                $keys = array_keys( $categories );