| @@ 1233-1245 (lines=13) @@ | ||
| 1230 | ) |
|
| 1231 | ); |
|
| 1232 | //Events |
|
| 1233 | if ($this->capabilities->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events')) { |
|
| 1234 | $admin_bar->add_menu( |
|
| 1235 | array( |
|
| 1236 | 'id' => 'espresso-toolbar-events', |
|
| 1237 | 'parent' => 'espresso-toolbar', |
|
| 1238 | 'title' => __('Events', 'event_espresso'), |
|
| 1239 | 'href' => $events_admin_url, |
|
| 1240 | 'meta' => array( |
|
| 1241 | 'title' => __('Events', 'event_espresso'), |
|
| 1242 | 'target' => '', |
|
| 1243 | 'class' => $menu_class, |
|
| 1244 | ), |
|
| 1245 | ) |
|
| 1246 | ); |
|
| 1247 | } |
|
| 1248 | if ($this->capabilities->current_user_can('ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new')) { |
|
| @@ 1248-1261 (lines=14) @@ | ||
| 1245 | ) |
|
| 1246 | ); |
|
| 1247 | } |
|
| 1248 | if ($this->capabilities->current_user_can('ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new')) { |
|
| 1249 | //Events Add New |
|
| 1250 | $admin_bar->add_menu( |
|
| 1251 | array( |
|
| 1252 | 'id' => 'espresso-toolbar-events-new', |
|
| 1253 | 'parent' => 'espresso-toolbar-events', |
|
| 1254 | 'title' => __('Add New', 'event_espresso'), |
|
| 1255 | 'href' => EEH_URL::add_query_args_and_nonce(array('action' => 'create_new'), $events_admin_url), |
|
| 1256 | 'meta' => array( |
|
| 1257 | 'title' => __('Add New', 'event_espresso'), |
|
| 1258 | 'target' => '', |
|
| 1259 | 'class' => $menu_class, |
|
| 1260 | ), |
|
| 1261 | ) |
|
| 1262 | ); |
|
| 1263 | } |
|
| 1264 | if (is_single() && (get_post_type() === 'espresso_events')) { |
|
| @@ 1292-1306 (lines=15) @@ | ||
| 1289 | } |
|
| 1290 | } |
|
| 1291 | //Events View |
|
| 1292 | if ($this->capabilities->current_user_can( |
|
| 1293 | 'ee_read_events', |
|
| 1294 | 'ee_admin_bar_menu_espresso-toolbar-events-view' |
|
| 1295 | ) |
|
| 1296 | ) { |
|
| 1297 | $admin_bar->add_menu( |
|
| 1298 | array( |
|
| 1299 | 'id' => 'espresso-toolbar-events-view', |
|
| 1300 | 'parent' => 'espresso-toolbar-events', |
|
| 1301 | 'title' => __('View', 'event_espresso'), |
|
| 1302 | 'href' => $events_admin_url, |
|
| 1303 | 'meta' => array( |
|
| 1304 | 'title' => __('View', 'event_espresso'), |
|
| 1305 | 'target' => '', |
|
| 1306 | 'class' => $menu_class, |
|
| 1307 | ), |
|
| 1308 | ) |
|
| 1309 | ); |
|
| @@ 1311-1324 (lines=14) @@ | ||
| 1308 | ) |
|
| 1309 | ); |
|
| 1310 | } |
|
| 1311 | if ($this->capabilities->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) { |
|
| 1312 | //Events View All |
|
| 1313 | $admin_bar->add_menu( |
|
| 1314 | array( |
|
| 1315 | 'id' => 'espresso-toolbar-events-all', |
|
| 1316 | 'parent' => 'espresso-toolbar-events-view', |
|
| 1317 | 'title' => __('All', 'event_espresso'), |
|
| 1318 | 'href' => $events_admin_url, |
|
| 1319 | 'meta' => array( |
|
| 1320 | 'title' => __('All', 'event_espresso'), |
|
| 1321 | 'target' => '', |
|
| 1322 | 'class' => $menu_class, |
|
| 1323 | ), |
|
| 1324 | ) |
|
| 1325 | ); |
|
| 1326 | } |
|
| 1327 | if ($this->capabilities->current_user_can( |
|
| @@ 1374-1388 (lines=15) @@ | ||
| 1371 | ); |
|
| 1372 | } |
|
| 1373 | //Registration Overview |
|
| 1374 | if ($this->capabilities->current_user_can( |
|
| 1375 | 'ee_read_registrations', |
|
| 1376 | 'ee_admin_bar_menu_espresso-toolbar-registrations' |
|
| 1377 | ) |
|
| 1378 | ) { |
|
| 1379 | $admin_bar->add_menu( |
|
| 1380 | array( |
|
| 1381 | 'id' => 'espresso-toolbar-registrations', |
|
| 1382 | 'parent' => 'espresso-toolbar', |
|
| 1383 | 'title' => __('Registrations', 'event_espresso'), |
|
| 1384 | 'href' => $reg_admin_url, |
|
| 1385 | 'meta' => array( |
|
| 1386 | 'title' => __('Registrations', 'event_espresso'), |
|
| 1387 | 'target' => '', |
|
| 1388 | 'class' => $menu_class, |
|
| 1389 | ), |
|
| 1390 | ) |
|
| 1391 | ); |
|
| @@ 1648-1662 (lines=15) @@ | ||
| 1645 | ); |
|
| 1646 | } |
|
| 1647 | //Extensions & Services |
|
| 1648 | if ($this->capabilities->current_user_can( |
|
| 1649 | 'ee_read_ee', |
|
| 1650 | 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services' |
|
| 1651 | ) |
|
| 1652 | ) { |
|
| 1653 | $admin_bar->add_menu( |
|
| 1654 | array( |
|
| 1655 | 'id' => 'espresso-toolbar-extensions-and-services', |
|
| 1656 | 'parent' => 'espresso-toolbar', |
|
| 1657 | 'title' => __('Extensions & Services', 'event_espresso'), |
|
| 1658 | 'href' => $extensions_admin_url, |
|
| 1659 | 'meta' => array( |
|
| 1660 | 'title' => __('Extensions & Services', 'event_espresso'), |
|
| 1661 | 'target' => '', |
|
| 1662 | 'class' => $menu_class, |
|
| 1663 | ), |
|
| 1664 | ) |
|
| 1665 | ); |
|