Advertisement
Guest User

Untitled

a guest
Sep 5th, 2012
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. if ( is_feed() ) {
  2.     add_filter( 'post_gallery', 'wpse63980_gallery_shortcode', 99999, 2 );
  3.     function wpse63980_gallery_shortcode( $html, $attr )
  4.     {
  5.  
  6.          extract( shortcode_atts( array(
  7.               'order'      => 'ASC',
  8.               'orderby'    => 'menu_order ID',
  9.               'id'         => $post->ID,
  10.               'itemtag'    => 'dl',
  11.               'icontag'    => 'dt',
  12.               'captiontag' => 'dd',
  13.               'columns'    => 3,
  14.               'size'       => 'thumbnail',
  15.               'include'    => '',
  16.               'exclude'    => ''
  17.          ), $attr ) );
  18.  
  19.          // get_posts(), get_attachments(), etc. here
  20.  
  21.          return $html;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement