@@ 926-938 (lines=13) @@ | ||
923 | )); |
|
924 | ||
925 | //Events |
|
926 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events' ) ) { |
|
927 | $admin_bar->add_menu(array( |
|
928 | 'id' => 'espresso-toolbar-events', |
|
929 | 'parent' => 'espresso-toolbar', |
|
930 | 'title' => __( 'Events', 'event_espresso' ), |
|
931 | 'href' => $events_admin_url, |
|
932 | 'meta' => array( |
|
933 | 'title' => __('Events', 'event_espresso'), |
|
934 | 'target' => '', |
|
935 | 'class' => $menu_class |
|
936 | ), |
|
937 | )); |
|
938 | } |
|
939 | ||
940 | ||
941 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new' ) ) { |
|
@@ 941-954 (lines=14) @@ | ||
938 | } |
|
939 | ||
940 | ||
941 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new' ) ) { |
|
942 | //Events Add New |
|
943 | $admin_bar->add_menu(array( |
|
944 | 'id' => 'espresso-toolbar-events-new', |
|
945 | 'parent' => 'espresso-toolbar-events', |
|
946 | 'title' => __('Add New', 'event_espresso'), |
|
947 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'create_new' ), $events_admin_url ), |
|
948 | 'meta' => array( |
|
949 | 'title' => __('Add New', 'event_espresso'), |
|
950 | 'target' => '', |
|
951 | 'class' => $menu_class |
|
952 | ), |
|
953 | )); |
|
954 | } |
|
955 | ||
956 | if ( is_single() && ( get_post_type() == 'espresso_events' ) ) { |
|
957 | ||
@@ 961-974 (lines=14) @@ | ||
958 | //Current post |
|
959 | global $post; |
|
960 | ||
961 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'ee_admin_bar_menu_espresso-toolbar-events-edit', $post->ID ) ) { |
|
962 | //Events Edit Current Event |
|
963 | $admin_bar->add_menu(array( |
|
964 | 'id' => 'espresso-toolbar-events-edit', |
|
965 | 'parent' => 'espresso-toolbar-events', |
|
966 | 'title' => __('Edit Event', 'event_espresso'), |
|
967 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'edit', 'post'=>$post->ID ), $events_admin_url ), |
|
968 | 'meta' => array( |
|
969 | 'title' => __('Edit Event', 'event_espresso'), |
|
970 | 'target' => '', |
|
971 | 'class' => $menu_class |
|
972 | ), |
|
973 | )); |
|
974 | } |
|
975 | ||
976 | } |
|
977 | ||
@@ 979-991 (lines=13) @@ | ||
976 | } |
|
977 | ||
978 | //Events View |
|
979 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-view' ) ) { |
|
980 | $admin_bar->add_menu(array( |
|
981 | 'id' => 'espresso-toolbar-events-view', |
|
982 | 'parent' => 'espresso-toolbar-events', |
|
983 | 'title' => __( 'View', 'event_espresso' ), |
|
984 | 'href' => $events_admin_url, |
|
985 | 'meta' => array( |
|
986 | 'title' => __('View', 'event_espresso'), |
|
987 | 'target' => '', |
|
988 | 'class' => $menu_class |
|
989 | ), |
|
990 | )); |
|
991 | } |
|
992 | ||
993 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) { |
|
994 | //Events View All |
|
@@ 993-1006 (lines=14) @@ | ||
990 | )); |
|
991 | } |
|
992 | ||
993 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) { |
|
994 | //Events View All |
|
995 | $admin_bar->add_menu(array( |
|
996 | 'id' => 'espresso-toolbar-events-all', |
|
997 | 'parent' => 'espresso-toolbar-events-view', |
|
998 | 'title' => __( 'All', 'event_espresso' ), |
|
999 | 'href' => $events_admin_url, |
|
1000 | 'meta' => array( |
|
1001 | 'title' => __('All', 'event_espresso'), |
|
1002 | 'target' => '', |
|
1003 | 'class' => $menu_class |
|
1004 | ), |
|
1005 | )); |
|
1006 | } |
|
1007 | ||
1008 | ||
1009 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-today' ) ) { |
|
@@ 1009-1022 (lines=14) @@ | ||
1006 | } |
|
1007 | ||
1008 | ||
1009 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-today' ) ) { |
|
1010 | //Events View Today |
|
1011 | $admin_bar->add_menu(array( |
|
1012 | 'id' => 'espresso-toolbar-events-today', |
|
1013 | 'parent' => 'espresso-toolbar-events-view', |
|
1014 | 'title' => __('Today', 'event_espresso'), |
|
1015 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today' ), $events_admin_url ), |
|
1016 | 'meta' => array( |
|
1017 | 'title' => __('Today', 'event_espresso'), |
|
1018 | 'target' => '', |
|
1019 | 'class' => $menu_class |
|
1020 | ), |
|
1021 | )); |
|
1022 | } |
|
1023 | ||
1024 | ||
1025 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-month' ) ) { |
|
@@ 1025-1038 (lines=14) @@ | ||
1022 | } |
|
1023 | ||
1024 | ||
1025 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-month' ) ) { |
|
1026 | //Events View This Month |
|
1027 | $admin_bar->add_menu(array( |
|
1028 | 'id' => 'espresso-toolbar-events-month', |
|
1029 | 'parent' => 'espresso-toolbar-events-view', |
|
1030 | 'title' => __( 'This Month', 'event_espresso'), |
|
1031 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month' ), $events_admin_url ), |
|
1032 | 'meta' => array( |
|
1033 | 'title' => __('This Month', 'event_espresso'), |
|
1034 | 'target' => '', |
|
1035 | 'class' => $menu_class |
|
1036 | ), |
|
1037 | )); |
|
1038 | } |
|
1039 | ||
1040 | //Registration Overview |
|
1041 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations' ) ) { |
|
@@ 1041-1053 (lines=13) @@ | ||
1038 | } |
|
1039 | ||
1040 | //Registration Overview |
|
1041 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations' ) ) { |
|
1042 | $admin_bar->add_menu(array( |
|
1043 | 'id' => 'espresso-toolbar-registrations', |
|
1044 | 'parent' => 'espresso-toolbar', |
|
1045 | 'title' => __( 'Registrations', 'event_espresso' ), |
|
1046 | 'href' => $reg_admin_url, |
|
1047 | 'meta' => array( |
|
1048 | 'title' => __('Registrations', 'event_espresso'), |
|
1049 | 'target' => '', |
|
1050 | 'class' => $menu_class |
|
1051 | ), |
|
1052 | )); |
|
1053 | } |
|
1054 | ||
1055 | //Registration Overview Today |
|
1056 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today' ) ) { |
|
@@ 1056-1068 (lines=13) @@ | ||
1053 | } |
|
1054 | ||
1055 | //Registration Overview Today |
|
1056 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today' ) ) { |
|
1057 | $admin_bar->add_menu(array( |
|
1058 | 'id' => 'espresso-toolbar-registrations-today', |
|
1059 | 'parent' => 'espresso-toolbar-registrations', |
|
1060 | 'title' => __( 'Today', 'event_espresso'), |
|
1061 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today' ), $reg_admin_url ), |
|
1062 | 'meta' => array( |
|
1063 | 'title' => __('Today', 'event_espresso'), |
|
1064 | 'target' => '', |
|
1065 | 'class' => $menu_class |
|
1066 | ), |
|
1067 | )); |
|
1068 | } |
|
1069 | ||
1070 | //Registration Overview Today Completed |
|
1071 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-approved' ) ) { |
|
@@ 1071-1083 (lines=13) @@ | ||
1068 | } |
|
1069 | ||
1070 | //Registration Overview Today Completed |
|
1071 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-approved' ) ) { |
|
1072 | $admin_bar->add_menu(array( |
|
1073 | 'id' => 'espresso-toolbar-registrations-today-approved', |
|
1074 | 'parent' => 'espresso-toolbar-registrations-today', |
|
1075 | 'title' => __( 'Approved', 'event_espresso' ), |
|
1076 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_approved ), $reg_admin_url ), |
|
1077 | 'meta' => array( |
|
1078 | 'title' => __('Approved', 'event_espresso' ), |
|
1079 | 'target' => '', |
|
1080 | 'class' => $menu_class |
|
1081 | ), |
|
1082 | )); |
|
1083 | } |
|
1084 | ||
1085 | //Registration Overview Today Pending\ |
|
1086 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-pending' ) ) { |
|
@@ 1086-1098 (lines=13) @@ | ||
1083 | } |
|
1084 | ||
1085 | //Registration Overview Today Pending\ |
|
1086 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-pending' ) ) { |
|
1087 | $admin_bar->add_menu(array( |
|
1088 | 'id' => 'espresso-toolbar-registrations-today-pending', |
|
1089 | 'parent' => 'espresso-toolbar-registrations-today', |
|
1090 | 'title' => __( 'Pending', 'event_espresso' ), |
|
1091 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', 'reg_status'=>EEM_Registration::status_id_pending_payment ), $reg_admin_url ), |
|
1092 | 'meta' => array( |
|
1093 | 'title' => __('Pending Payment', 'event_espresso' ), |
|
1094 | 'target' => '', |
|
1095 | 'class' => $menu_class |
|
1096 | ), |
|
1097 | )); |
|
1098 | } |
|
1099 | ||
1100 | //Registration Overview Today Incomplete |
|
1101 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-not-approved' ) ) { |
|
@@ 1101-1113 (lines=13) @@ | ||
1098 | } |
|
1099 | ||
1100 | //Registration Overview Today Incomplete |
|
1101 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-not-approved' ) ) { |
|
1102 | $admin_bar->add_menu(array( |
|
1103 | 'id' => 'espresso-toolbar-registrations-today-not-approved', |
|
1104 | 'parent' => 'espresso-toolbar-registrations-today', |
|
1105 | 'title' => __( 'Not Approved', 'event_espresso' ), |
|
1106 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_not_approved ), $reg_admin_url ), |
|
1107 | 'meta' => array( |
|
1108 | 'title' => __('Not Approved', 'event_espresso' ), |
|
1109 | 'target' => '', |
|
1110 | 'class' => $menu_class |
|
1111 | ), |
|
1112 | )); |
|
1113 | } |
|
1114 | ||
1115 | //Registration Overview Today Incomplete |
|
1116 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-cancelled' ) ) { |
|
@@ 1116-1128 (lines=13) @@ | ||
1113 | } |
|
1114 | ||
1115 | //Registration Overview Today Incomplete |
|
1116 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today-cancelled' ) ) { |
|
1117 | $admin_bar->add_menu(array( |
|
1118 | 'id' => 'espresso-toolbar-registrations-today-cancelled', |
|
1119 | 'parent' => 'espresso-toolbar-registrations-today', |
|
1120 | 'title' => __( 'Cancelled', 'event_espresso'), |
|
1121 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'today', '_reg_status'=>EEM_Registration::status_id_cancelled ), $reg_admin_url ), |
|
1122 | 'meta' => array( |
|
1123 | 'title' => __('Cancelled', 'event_espresso'), |
|
1124 | 'target' => '', |
|
1125 | 'class' => $menu_class |
|
1126 | ), |
|
1127 | )); |
|
1128 | } |
|
1129 | ||
1130 | //Registration Overview This Month |
|
1131 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month' ) ) { |
|
@@ 1131-1143 (lines=13) @@ | ||
1128 | } |
|
1129 | ||
1130 | //Registration Overview This Month |
|
1131 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month' ) ) { |
|
1132 | $admin_bar->add_menu(array( |
|
1133 | 'id' => 'espresso-toolbar-registrations-month', |
|
1134 | 'parent' => 'espresso-toolbar-registrations', |
|
1135 | 'title' => __( 'This Month', 'event_espresso' ), |
|
1136 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month' ), $reg_admin_url ), |
|
1137 | 'meta' => array( |
|
1138 | 'title' => __('This Month', 'event_espresso'), |
|
1139 | 'target' => '', |
|
1140 | 'class' => $menu_class |
|
1141 | ), |
|
1142 | )); |
|
1143 | } |
|
1144 | ||
1145 | //Registration Overview This Month Approved |
|
1146 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-approved' ) ) { |
|
@@ 1146-1158 (lines=13) @@ | ||
1143 | } |
|
1144 | ||
1145 | //Registration Overview This Month Approved |
|
1146 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-approved' ) ) { |
|
1147 | $admin_bar->add_menu(array( |
|
1148 | 'id' => 'espresso-toolbar-registrations-month-approved', |
|
1149 | 'parent' => 'espresso-toolbar-registrations-month', |
|
1150 | 'title' => __( 'Approved', 'event_espresso' ), |
|
1151 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_approved ), $reg_admin_url ), |
|
1152 | 'meta' => array( |
|
1153 | 'title' => __('Approved', 'event_espresso'), |
|
1154 | 'target' => '', |
|
1155 | 'class' => $menu_class |
|
1156 | ), |
|
1157 | )); |
|
1158 | } |
|
1159 | ||
1160 | //Registration Overview This Month Pending |
|
1161 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-pending' ) ) { |
|
@@ 1161-1173 (lines=13) @@ | ||
1158 | } |
|
1159 | ||
1160 | //Registration Overview This Month Pending |
|
1161 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-pending' ) ) { |
|
1162 | $admin_bar->add_menu(array( |
|
1163 | 'id' => 'espresso-toolbar-registrations-month-pending', |
|
1164 | 'parent' => 'espresso-toolbar-registrations-month', |
|
1165 | 'title' => __( 'Pending', 'event_espresso'), |
|
1166 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_pending_payment ), $reg_admin_url ), |
|
1167 | 'meta' => array( |
|
1168 | 'title' => __('Pending', 'event_espresso'), |
|
1169 | 'target' => '', |
|
1170 | 'class' => $menu_class |
|
1171 | ), |
|
1172 | )); |
|
1173 | } |
|
1174 | ||
1175 | //Registration Overview This Month Not Approved |
|
1176 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-not-approved' ) ) { |
|
@@ 1176-1188 (lines=13) @@ | ||
1173 | } |
|
1174 | ||
1175 | //Registration Overview This Month Not Approved |
|
1176 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-not-approved' ) ) { |
|
1177 | $admin_bar->add_menu(array( |
|
1178 | 'id' => 'espresso-toolbar-registrations-month-not-approved', |
|
1179 | 'parent' => 'espresso-toolbar-registrations-month', |
|
1180 | 'title' => __( 'Not Approved', 'event_espresso'), |
|
1181 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_not_approved ), $reg_admin_url ), |
|
1182 | 'meta' => array( |
|
1183 | 'title' => __('Not Approved', 'event_espresso' ), |
|
1184 | 'target' => '', |
|
1185 | 'class' => $menu_class |
|
1186 | ), |
|
1187 | )); |
|
1188 | } |
|
1189 | ||
1190 | ||
1191 | //Registration Overview This Month Cancelled |
|
@@ 1192-1204 (lines=13) @@ | ||
1189 | ||
1190 | ||
1191 | //Registration Overview This Month Cancelled |
|
1192 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-month-cancelled' ) ) { |
|
1193 | $admin_bar->add_menu(array( |
|
1194 | 'id' => 'espresso-toolbar-registrations-month-cancelled', |
|
1195 | 'parent' => 'espresso-toolbar-registrations-month', |
|
1196 | 'title' => __('Cancelled', 'event_espresso'), |
|
1197 | 'href' => EEH_URL::add_query_args_and_nonce( array( 'action'=>'default', 'status'=>'month', '_reg_status'=>EEM_Registration::status_id_cancelled ), $reg_admin_url ), |
|
1198 | 'meta' => array( |
|
1199 | 'title' => __('Cancelled', 'event_espresso'), |
|
1200 | 'target' => '', |
|
1201 | 'class' => $menu_class |
|
1202 | ), |
|
1203 | )); |
|
1204 | } |
|
1205 | ||
1206 | //Extensions & Services |
|
1207 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_ee', 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services' ) ) { |
|
@@ 1207-1219 (lines=13) @@ | ||
1204 | } |
|
1205 | ||
1206 | //Extensions & Services |
|
1207 | if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_ee', 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services' ) ) { |
|
1208 | $admin_bar->add_menu(array( |
|
1209 | 'id' => 'espresso-toolbar-extensions-and-services', |
|
1210 | 'parent' => 'espresso-toolbar', |
|
1211 | 'title' => __( 'Extensions & Services', 'event_espresso' ), |
|
1212 | 'href' => $extensions_admin_url, |
|
1213 | 'meta' => array( |
|
1214 | 'title' => __('Extensions & Services', 'event_espresso'), |
|
1215 | 'target' => '', |
|
1216 | 'class' => $menu_class |
|
1217 | ), |
|
1218 | )); |
|
1219 | } |
|
1220 | } |
|
1221 | ||
1222 |