Make WordPress Core


Ignore:
Timestamp:
12/23/2008 12:52:25 PM (15 years ago)
Author:
ryan
Message:

Allow overriding cat walker. Props AaronCampbell. fixes #8682 for 2.7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-admin/includes/template.php

    r10182 r10245  
    440440 * @param unknown_type $popular_cats
    441441 */
    442 function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false ) {
    443     $walker = new Walker_Category_Checklist;
     442function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null ) {
     443    if ( empty($walker) || !is_a($walker, 'Walker') )
     444        $walker = new Walker_Category_Checklist;
     445
    444446    $descendants_and_self = (int) $descendants_and_self;
    445447
Note: See TracChangeset for help on using the changeset viewer.