Advertisement
eventsmanager

styles add-on correction

Sep 18th, 2013
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. function my_em_style_conditions($conditions, $args){
  2.     global $wpdb;
  3.     if( !empty($args['style']) ){
  4.         $conditions['style'] = $wpdb->prepare("(event_id IN (SELECT object_id FROM ".EM_META_TABLE." WHERE meta_key='event-style' AND meta_value='%s'))", $args['style']);
  5.     }
  6.     return $conditions;
  7. }
  8. add_filter( 'em_events_build_sql_conditions', 'my_em_style_conditions',1,2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement