Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- display-posts-shortcode.orig.php 2012-12-22 04:03:38.000000000 +0000
- +++ display-posts-shortcode.php 2013-11-15 23:29:07.065103200 +0000
- @@ -72,6 +72,7 @@
- 'tax_term' => false,
- 'taxonomy' => false,
- 'wrapper' => 'ul',
- + 'wrapper_id' => '',
- ), $atts );
- $author = sanitize_text_field( $atts['author'] );
- @@ -97,6 +98,7 @@
- $tax_term = sanitize_text_field( $atts['tax_term'] );
- $taxonomy = sanitize_key( $atts['taxonomy'] );
- $wrapper = sanitize_text_field( $atts['wrapper'] );
- + $wrapper_id = sanitize_text_field( $atts['wrapper_id'] );
- // Set up initial query for post
- @@ -251,7 +253,10 @@
- endwhile; wp_reset_postdata();
- - $open = apply_filters( 'display_posts_shortcode_wrapper_open', '<' . $wrapper . ' class="display-posts-listing">', $original_atts );
- + if( !empty( $wrapper_id ) )
- + $wrapper_id = ' id="'.$wrapper_id.'"';
- +
- + $open = apply_filters( 'display_posts_shortcode_wrapper_open', '<' . $wrapper . ' class="display-posts-listing"' . $wrapper_id . '>', $original_atts );
- $close = apply_filters( 'display_posts_shortcode_wrapper_close', '</' . $wrapper . '>', $original_atts );
- $return = $open . $inner . $close;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement