Skip to content
This repository
Browse code

WP_DEBUG notices cleaned.

  • Loading branch information...
commit 93d347fb73a73c953dfe86e31379dfc451ecfa12 1 parent 3cfde9f
Justin Tadlock authored

Showing 1 changed file with 11 additions and 4 deletions. Show diff stats Hide diff stats

  1. +11 4 classes/widget-bookmarks.php
15 classes/widget-bookmarks.php
@@ -66,10 +66,17 @@ function widget( $sidebar, $instance ) {
66 66 $args = $instance;
67 67
68 68 /* wp_list_bookmarks() hasn't been updated in WP to use wp_parse_id_list(), so we have to pass strings for includes/excludes. */
69   - $args['category'] = is_array( $args['category'] ) ? join( ', ', $instance['category'] ) : $args['category'];
70   - $args['exclude_category'] = is_array( $args['exclude_category'] ) ? join( ', ', $instance['exclude_category'] ) : $args['exclude_category'];
71   - $args['include'] = is_array( $args['include'] ) ? join( ', ', $instance['include'] ) : $args['include'];
72   - $args['exclude'] = is_array( $args['exclude'] ) ? join( ', ', $instance['exclude'] ) : $args['exclude'];
  69 + if ( !empty( $args['category'] ) && is_array( $args['category'] ) )
  70 + $args['category'] = join( ', ', $args['category'] );
  71 +
  72 + if ( !empty( $args['exclude_category'] ) && is_array( $args['exclude_category'] ) )
  73 + $args['exclude_category'] = join( ', ', $args['exclude_category'] );
  74 +
  75 + if ( !empty( $args['include'] ) && is_array( $args['include'] ) )
  76 + $args['include'] = join( ',', $args['include'] );
  77 +
  78 + if ( !empty( $args['exclude'] ) && is_array( $args['exclude'] ) )
  79 + $args['exclude'] = join( ',', $args['exclude'] );
73 80
74 81 /* If no limit is given, set it to -1. */
75 82 $args['limit'] = empty( $args['limit'] ) ? -1 : $args['limit'];

0 comments on commit 93d347f

Please sign in to comment.
Something went wrong with that request. Please try again.