X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f5fcdc7994bb67cce809bc4777944ae8b7fad4a4..refs/tags/wordpress-4.3:/wp-includes/bookmark-template.php diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 54ad5c99..47bfb4a1 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -195,7 +195,7 @@ function _walk_bookmarks( $bookmarks, $args = '' ) { * $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 @@ function wp_list_bookmarks( $args = '' ) { $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'],