* $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(
$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'],
$r['category_before']
);
/**
- * Filter the bookmarks category name.
+ * Filters the bookmarks category name.
*
* @since 2.2.0
*
}
/**
- * Filter the bookmarks list before it is echoed or returned.
+ * Filters the bookmarks list before it is echoed or returned.
*
* @since 2.5.0
*