@@ 929-941 (lines=13) @@ | ||
926 | )); |
|
927 | ||
928 | //Events |
|
929 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events' ) ) { |
|
930 | $admin_bar->add_menu(array( |
|
931 | 'id' => 'espresso-toolbar-events', |
|
932 | 'parent' => 'espresso-toolbar', |
|
933 | 'title' => __( 'Events', 'event_espresso' ), |
|
934 | 'href' => $events_admin_url, |
|
935 | 'meta' => array( |
|
936 | 'title' => __('Events', 'event_espresso'), |
|
937 | 'target' => '', |
|
938 | 'class' => $menu_class |
|
939 | ), |
|
940 | )); |
|
941 | } |
|
942 | ||
943 | ||
944 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new' ) ) { |
|
@@ 944-957 (lines=14) @@ | ||
941 | } |
|
942 | ||
943 | ||
944 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new' ) ) { |
|
945 | //Events Add New |
|
946 | $admin_bar->add_menu(array( |
|
947 | 'id' => 'espresso-toolbar-events-new', |
|
948 | 'parent' => 'espresso-toolbar-events', |
|
949 | 'title' => __('Add New', 'event_espresso'), |
|
950 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'create_new' ), $events_admin_url ), |
|
951 | 'meta' => array( |
|
952 | 'title' => __('Add New', 'event_espresso'), |
|
953 | 'target' => '', |
|
954 | 'class' => $menu_class |
|
955 | ), |
|
956 | )); |
|
957 | } |
|
958 | ||
959 | if ( is_single() && ( get_post_type() == 'espresso_events' ) ) { |
|
960 | ||
@@ 982-994 (lines=13) @@ | ||
979 | } |
|
980 | ||
981 | //Events View |
|
982 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-view' ) ) { |
|
983 | $admin_bar->add_menu(array( |
|
984 | 'id' => 'espresso-toolbar-events-view', |
|
985 | 'parent' => 'espresso-toolbar-events', |
|
986 | 'title' => __( 'View', 'event_espresso' ), |
|
987 | 'href' => $events_admin_url, |
|
988 | 'meta' => array( |
|
989 | 'title' => __('View', 'event_espresso'), |
|
990 | 'target' => '', |
|
991 | 'class' => $menu_class |
|
992 | ), |
|
993 | )); |
|
994 | } |
|
995 | ||
996 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) { |
|
997 | //Events View All |
|
@@ 996-1009 (lines=14) @@ | ||
993 | )); |
|
994 | } |
|
995 | ||
996 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) { |
|
997 | //Events View All |
|
998 | $admin_bar->add_menu(array( |
|
999 | 'id' => 'espresso-toolbar-events-all', |
|
1000 | 'parent' => 'espresso-toolbar-events-view', |
|
1001 | 'title' => __( 'All', 'event_espresso' ), |
|
1002 | 'href' => $events_admin_url, |
|
1003 | 'meta' => array( |
|
1004 | 'title' => __('All', 'event_espresso'), |
|
1005 | 'target' => '', |
|
1006 | 'class' => $menu_class |
|
1007 | ), |
|
1008 | )); |
|
1009 | } |
|
1010 | ||
1011 | ||
1012 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-today' ) ) { |
|
@@ 1044-1056 (lines=13) @@ | ||
1041 | } |
|
1042 | ||
1043 | //Registration Overview |
|
1044 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations' ) ) { |
|
1045 | $admin_bar->add_menu(array( |
|
1046 | 'id' => 'espresso-toolbar-registrations', |
|
1047 | 'parent' => 'espresso-toolbar', |
|
1048 | 'title' => __( 'Registrations', 'event_espresso' ), |
|
1049 | 'href' => $reg_admin_url, |
|
1050 | 'meta' => array( |
|
1051 | 'title' => __('Registrations', 'event_espresso'), |
|
1052 | 'target' => '', |
|
1053 | 'class' => $menu_class |
|
1054 | ), |
|
1055 | )); |
|
1056 | } |
|
1057 | ||
1058 | //Registration Overview Today |
|
1059 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today' ) ) { |
|
@@ 1210-1222 (lines=13) @@ | ||
1207 | } |
|
1208 | ||
1209 | //Extensions & Services |
|
1210 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_ee', 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services' ) ) { |
|
1211 | $admin_bar->add_menu(array( |
|
1212 | 'id' => 'espresso-toolbar-extensions-and-services', |
|
1213 | 'parent' => 'espresso-toolbar', |
|
1214 | 'title' => __( 'Extensions & Services', 'event_espresso' ), |
|
1215 | 'href' => $extensions_admin_url, |
|
1216 | 'meta' => array( |
|
1217 | 'title' => __('Extensions & Services', 'event_espresso'), |
|
1218 | 'target' => '', |
|
1219 | 'class' => $menu_class |
|
1220 | ), |
|
1221 | )); |
|
1222 | } |
|
1223 | } |
|
1224 | ||
1225 |