Adding our list of events into the block admin to link our events into
the glm Blocks.
*
* Also note that parameters will be in the context of the main admin controller constructor.
*/
+add_filter( 'glm-member-db-events-get-events', function( $output ){
+ $events = $this->wpdb->get_results(
+ "SELECT E.id,E.name,T1.start_time as start
+ FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "events E,
+ " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times T1
+ WHERE E.status = 10
+ AND T1.event = E.id AND T1.start_time IN (SELECT MIN(start_time)
+ FROM " . GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . "times
+ WHERE event = E.id)
+ ORDER BY start DESC",
+ ARRAY_A
+ );
+ return $events;
+} );
);
}
+
+add_filter( 'glm-member-db-events-get-event-data', function( $event_id ){
+ require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH . '/data/dataEvents.php';
+ $eventData = new GlmDataEvents( $this->wpdb, $this->config );
+ $events = $eventData->getEntry( $event_id );
+ return $events;
+} );
+