Advertisement
Guest User

Untitled

a guest
Sep 29th, 2015
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. if( ! function_exists( 'sweethome_custom_property_slider' ) ){
  2.     function sweethome_custom_property_slider( $args ) {
  3.         /**
  4.          * Property IDs string, Separated by commas.
  5.          * Example: $post__in = '3,6,8,9,20,100';
  6.          */
  7.         $post__in = '';
  8.        
  9.         if( !empty( $post__in ) ){
  10.             $post__in = explode( "," , $post__in);
  11.             if( !empty( $post__in ) && is_array( $post__in ) ){
  12.                 $args['post__in'] = $post__in;
  13.             }
  14.         }
  15.         return $args;
  16.     }
  17.     add_filter( 'swh-propertslider-widget/args' , 'sweethome_custom_property_slider', 10, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement