WordPress.org

Make WordPress Core

Ticket #47678: 47678-wp_terms_checklist.patch

File 47678-wp_terms_checklist.patch, 1.0 KB (added by jrf, 11 months ago)

Simplify wp_terms_checklist()

  • src/wp-admin/includes/template.php

    From 0c1aa59ac502824f749e26e3888afaca5126f448 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Fri, 19 Jul 2019 16:12:18 +0200
    Subject: [PATCH] Simplify wp_terms_checklist()
    
    ---
     src/wp-admin/includes/template.php | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
    index 9c6a48d019..ca89f28907 100644
    a b function wp_terms_checklist( $post_id = 0, $args = array() ) { 
    169169                }
    170170
    171171                // Put checked cats on top
    172                 $output .= call_user_func_array( array( $walker, 'walk' ), array( $checked_categories, 0, $args ) );
     172                $output .= $walker->walk( $checked_categories, 0, $args );
    173173        }
    174174        // Then the rest of them
    175         $output .= call_user_func_array( array( $walker, 'walk' ), array( $categories, 0, $args ) );
     175        $output .= $walker->walk( $categories, 0, $args );
    176176
    177177        if ( $r['echo'] ) {
    178178                echo $output;