/**
  * 	@deprecated
  * 	@since 4.4.0
  */
 public static function posts_orderby_sql($orderby_params = array(), $sort = 'ASC')
 {
     EE_Registry::instance()->load_helper('Event_Query');
     EED_Events_Archive::_doing_it_wrong_notice(__FUNCTION__);
     return EEH_Event_Query::posts_orderby_sql($orderby_params, $sort);
 }
 /**
  * EE_Event_List_Query Constructor	 *
  * sets up a WordPress query
  *
  * @param array $args
  * @return \EE_Event_List_Query
  */
 function __construct($args = array())
 {
     //		printr( $args, '$args  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
     // incoming args could be a mix of WP query args + EE shortcode args
     foreach ($args as $key => $value) {
         $property = '_' . $key;
         // if the arg is a property of this class, then it's an EE shortcode arg
         if (EEH_Class_Tools::has_property($this, $property)) {
             // set the property value
             $this->{$property} = $value;
             // then remove it from the array of args that will later be passed to WP_Query()
             unset($args[$key]);
         }
     }
     // setup the events list query
     EE_Registry::instance()->load_helper('Event_Query');
     EEH_Event_Query::filter_query_parts();
     EEH_Event_Query::set_query_params($this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort);
     // first off, let's remove any filters from previous queries
     remove_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'));
     remove_all_filters('FHEE__content_espresso_events__event_class');
     // Event List Title ?
     add_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'), 10, 1);
     // add the css class
     add_filter('FHEE__content_espresso_events__event_class', array($this, 'event_list_css'), 10, 1);
     // the current "page" we are viewing
     $paged = max(1, get_query_var('paged'));
     // Force these args
     $args = array_merge($args, array('post_type' => 'espresso_events', 'posts_per_page' => $this->_limit, 'update_post_term_cache' => FALSE, 'update_post_meta_cache' => FALSE, 'paged' => $paged, 'offset' => ($paged - 1) * $this->_limit));
     // run the query
     parent::__construct($args);
 }
 /**
  * @param array $args
  */
 function __construct($args = array())
 {
     // incoming args could be a mix of WP query args + EE shortcode args
     foreach ($args as $key => $value) {
         $property = '_' . $key;
         // if the arg is a property of this class, then it's an EE shortcode arg
         if (property_exists($this, $property)) {
             // set the property value
             $this->{$property} = $value;
             // then remove it from the array of args that will later be passed to WP_Query()
             unset($args[$key]);
         }
     }
     // parse orderby attribute
     if ($this->_order_by !== NULL) {
         $this->_order_by = explode(',', $this->_order_by);
         $this->_order_by = array_map('trim', $this->_order_by);
     }
     $this->_sort = in_array($this->_sort, array('ASC', 'asc', 'DESC', 'desc')) ? strtoupper($this->_sort) : 'ASC';
     // setup the events list query
     EE_Registry::instance()->load_helper('Event_Query');
     //add query filters
     EEH_Event_Query::add_query_filters();
     // set params that will get used by the filters
     EEH_Event_Query::set_query_params($this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort);
     // the current "page" we are viewing
     $paged = max(1, get_query_var('paged'));
     // Force these args
     $args = array_merge($args, array('post_type' => 'espresso_events', 'posts_per_page' => $this->_limit, 'update_post_term_cache' => FALSE, 'update_post_meta_cache' => FALSE, 'paged' => $paged, 'offset' => ($paged - 1) * $this->_limit));
     // run the query
     parent::__construct($args);
 }
 /**
  *    posts_orderby
  *
  * @access    public
  * @param string   $SQL
  * @param WP_Query $wp_query
  * @return    string
  */
 public static function posts_orderby($SQL = '', WP_Query $wp_query)
 {
     if (isset($wp_query->query) && isset($wp_query->query['post_type']) && $wp_query->query['post_type'] == 'espresso_events') {
         $SQL = EEH_Event_Query::posts_orderby_sql(EEH_Event_Query::$_event_query_orderby, EEH_Event_Query::$_event_query_sort);
         //			echo '<h5 style="color:#2EA2CC;">$SQL : <span style="color:#E76700">' . $SQL . '</span><br/><span style="font-size:9px;font-weight:normal;color:#666">' . __FILE__ . '</span>    <b style="font-size:10px;color:#333">  ' . __LINE__ . ' </b></h5>';
     }
     return $SQL;
 }
 /**
  *    posts_orderby
  *
  * @access    public
  * @param string   $SQL
  * @param WP_Query $wp_query
  * @return    string
  */
 public static function posts_orderby($SQL = '', WP_Query $wp_query)
 {
     if (EEH_Event_Query::apply_query_filters($wp_query)) {
         $SQL = EEH_Event_Query::posts_orderby_sql(EEH_Event_Query::$_event_query_orderby, EEH_Event_Query::$_event_query_sort);
     }
     return $SQL;
 }
 /**
  * 	@deprecated
  * 	@since 4.4.0
  */
 public static function posts_orderby_sql($orderby_params = array(), $sort = 'ASC')
 {
     EED_Events_Archive::_doing_it_wrong_notice(__FUNCTION__);
     return EEH_Event_Query::posts_orderby_sql($orderby_params, $sort);
 }