*
* Also note that parameters will be in the context of the main admin controller constructor.
*/
+
+// check the options for urls and setup admin urls for them in wordpress admin.
+$starlineOptions = unserialize( get_option( GLM_MEMBERS_APIS_STARLINE_OPTION_NAME ) );
+if ( isset( $starlineOptions ) && $starlineOptions ) {
+ $starlineUrl = ( isset( $starlineOptions['ticketUrl'] ) ) ? $starlineOptions['ticketUrl'] : '';
+ if ( $starlineUrl != '' ) {
+ add_action( 'admin_bar_menu', function( $wp_admin_bar ) use ( $starlineUrl ) {
+ $args = array(
+ 'id' => 'eventmanagement-starline',
+ 'title' => 'Starline Ticketing System',
+ 'href' => $starlineUrl . 'admin/',
+ 'meta' => array(
+ 'class' => 'eventmanagement',
+ 'title' => 'Ticketing System',
+ 'target' => '_blank'
+ )
+ );
+ $wp_admin_bar->add_node( $args );
+ }, 999 );
+ }
+}
+
+$bibcoOptions = unserialize( get_option( GLM_MEMBERS_APIS_BIBCO_OPTION_NAME ) );
+if ( isset( $bibcoOptions ) && $bibcoOptions ) {
+ $calendarUrl = ( isset( $bibcoOptions['calendarUrl'] ) ) ? $bibcoOptions['calendarUrl'] : '';
+ if ( $calendarUrl != '' ) {
+ add_action( 'admin_bar_menu', function( $wp_admin_bar ) use ( $calendarUrl ) {
+ if ( $calendarUrl != '' ) {
+ $args = array(
+ 'id' => 'eventmanagement-bibco',
+ 'title' => 'Bibco Calendar Schedule',
+ 'href' => $calendarUrl . 'admin/',
+ 'meta' => array(
+ 'class' => 'eventmanagement',
+ 'title' => 'Ticketing System',
+ 'target' => '_blank'
+ )
+ );
+ }
+ $wp_admin_bar->add_node( $args );
+ }, 999 );
+ }
+}