From: Steve Sutton Date: Tue, 29 Jan 2019 21:36:27 +0000 (-0500) Subject: Update for adding link to directory url X-Git-Tag: v1.0.6^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=861978a0b8e5bea5c43f4348d0fb3fc9a7d7202b;p=WP-Plugins%2Fglm-member-db-apis.git Update for adding link to directory url For golf directory --- diff --git a/setup/adminHooks.php b/setup/adminHooks.php index b628398..52b4cb5 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -59,7 +59,29 @@ if ( isset( $bibcoOptions ) && $bibcoOptions ) { 'href' => $calendarUrl . 'admin/', 'meta' => array( 'class' => 'eventmanagement', - 'title' => 'Ticketing System', + 'title' => 'Schedule System', + 'target' => '_blank' + ) + ); + } + $wp_admin_bar->add_node( $args ); + }, 999 ); + } +} + +$golfClubOptions = unserialize( get_option( GLM_MEMBERS_APIS_GOLFCLUB_OPTION_NAME ) ); +if ( isset( $golfClubOptions ) && $golfClubOptions ) { + $golfUrl = ( isset( $golfClubOptions['directoryUrl'] ) ) ? $golfClubOptions['directoryUrl'] : ''; + if ( $golfUrl != '' ) { + add_action( 'admin_bar_menu', function( $wp_admin_bar ) use ( $golfUrl ) { + if ( $golfUrl != '' ) { + $args = array( + 'id' => 'eventmanagement-golf', + 'title' => 'Golf Directory', + 'href' => $golfUrl . 'admin/', + 'meta' => array( + 'class' => 'eventmanagement', + 'title' => 'Golf Directory', 'target' => '_blank' ) );