diff -r 490d5cc509ed -r cf61fcea0001 wp/wp-includes/bookmark-template.php --- a/wp/wp-includes/bookmark-template.php Tue Jun 09 11:14:17 2015 +0000 +++ b/wp/wp-includes/bookmark-template.php Mon Oct 14 17:39:30 2019 +0200 @@ -195,7 +195,7 @@ * $categorize is true. Accepts 'ASC' (ascending) or 'DESC' (descending). * Default 'ASC'. * } - * @return string|null Will only return if echo option is set to not echo. Default is not return anything. + * @return string|void Will only return if echo option is set to not echo. Default is not return anything. */ function wp_list_bookmarks( $args = '' ) { $defaults = array( @@ -214,6 +214,12 @@ $output = ''; + if ( ! is_array( $r['class'] ) ) { + $r['class'] = explode( ' ', $r['class'] ); + } + $r['class'] = array_map( 'sanitize_html_class', $r['class'] ); + $r['class'] = trim( join( ' ', $r['class'] ) ); + if ( $r['categorize'] ) { $cats = get_terms( 'link_category', array( 'name__like' => $r['category_name'], @@ -242,7 +248,7 @@ $r['category_before'] ); /** - * Filter the bookmarks category name. + * Filters the bookmarks category name. * * @since 2.2.0 * @@ -283,7 +289,7 @@ } /** - * Filter the bookmarks list before it is echoed or returned. + * Filters the bookmarks list before it is echoed or returned. * * @since 2.5.0 *