WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/03/2017 04:12:25 PM (2 years ago)
Author:
johnbillion
Message:

General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs.

See #38462, #41017

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r41033 r41221  
    387387         * @see wp_dropdown_categories()
    388388         *
    389          * @param string $element Taxonomy element to list.
     389         * @param string       $element  Category name.
     390         * @param WP_Term|null $category The category object, or null if there's no corresponding category.
    390391         */
    391         $show_option_none = apply_filters( 'list_cats', $r['show_option_none'] );
     392        $show_option_none = apply_filters( 'list_cats', $r['show_option_none'], null );
    392393        $output .= "\t<option value='" . esc_attr( $option_none_value ) . "' selected='selected'>$show_option_none</option>\n";
    393394    }
     
    398399
    399400            /** This filter is documented in wp-includes/category-template.php */
    400             $show_option_all = apply_filters( 'list_cats', $r['show_option_all'] );
     401            $show_option_all = apply_filters( 'list_cats', $r['show_option_all'], null );
    401402            $selected = ( '0' === strval($r['selected']) ) ? " selected='selected'" : '';
    402403            $output .= "\t<option value='0'$selected>$show_option_all</option>\n";
     
    406407
    407408            /** This filter is documented in wp-includes/category-template.php */
    408             $show_option_none = apply_filters( 'list_cats', $r['show_option_none'] );
     409            $show_option_none = apply_filters( 'list_cats', $r['show_option_none'], null );
    409410            $selected = selected( $option_none_value, $r['selected'], false );
    410411            $output .= "\t<option value='" . esc_attr( $option_none_value ) . "'$selected>$show_option_none</option>\n";
Note: See TracChangeset for help on using the changeset viewer.