X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f..53f4633144ed68c8b8fb5861f992b5489894a940:/wp-includes/bookmark-template.php
diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php
index a4561900..47bfb4a1 100644
--- a/wp-includes/bookmark-template.php
+++ b/wp-includes/bookmark-template.php
@@ -34,8 +34,8 @@
* or 0|false. Default 1|true.
* @type int|bool $show_name Whether to show link name if available. Accepts 1|true or
* 0|false. Default 0|false.
- * @type string $before The HTML or text to prepend to each bookmark. Default '
'.
- * @type string $after The HTML or text to append to each bookmark. Default ''.
+ * @type string $before The HTML or text to prepend to each bookmark. Default ``.
+ * @type string $after The HTML or text to append to each bookmark. Default ``.
* @type string $link_before The HTML or text to prepend to each bookmark inside the anchor
* tags. Default empty.
* @type string $link_after The HTML or text to append to each bookmark inside the anchor
@@ -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'],