Update WP and plugins

This commit is contained in:
Oliver Davies 2019-04-16 20:56:22 +01:00
parent 10a4713229
commit 1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions

View file

@ -35,7 +35,10 @@ class Walker_CategoryDropdown extends Walker {
*
* @see Walker::$db_fields
*/
public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
public $db_fields = array(
'parent' => 'parent',
'id' => 'term_id',
);
/**
* Starts the element output.
@ -52,7 +55,7 @@ class Walker_CategoryDropdown extends Walker {
* @param int $id Optional. ID of the current category. Default 0 (unused).
*/
public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
$pad = str_repeat(' ', $depth * 3);
$pad = str_repeat( ' ', $depth * 3 );
/** This filter is documented in wp-includes/category-template.php */
$cat_name = apply_filters( 'list_cats', $category->name, $category );
@ -63,15 +66,17 @@ class Walker_CategoryDropdown extends Walker {
$value_field = 'term_id';
}
$output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . "\"";
$output .= "\t<option class=\"level-$depth\" value=\"" . esc_attr( $category->{$value_field} ) . '"';
// Type-juggling causes false matches, so we force everything to a string.
if ( (string) $category->{$value_field} === (string) $args['selected'] )
if ( (string) $category->{$value_field} === (string) $args['selected'] ) {
$output .= ' selected="selected"';
}
$output .= '>';
$output .= $pad.$cat_name;
if ( $args['show_count'] )
$output .= '&nbsp;&nbsp;('. number_format_i18n( $category->count ) .')';
$output .= $pad . $cat_name;
if ( $args['show_count'] ) {
$output .= '&nbsp;&nbsp;(' . number_format_i18n( $category->count ) . ')';
}
$output .= "</option>\n";
}
}