styles add-on correction

Sep 18th, 2013
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.