| @@ 1327-1343 (lines=17) @@ | ||
| 1324 | ) |
|
| 1325 | ); |
|
| 1326 | } |
|
| 1327 | if ($this->capabilities->current_user_can( |
|
| 1328 | 'ee_read_events', |
|
| 1329 | 'ee_admin_bar_menu_espresso-toolbar-events-today' |
|
| 1330 | ) |
|
| 1331 | ) { |
|
| 1332 | //Events View Today |
|
| 1333 | $admin_bar->add_menu( |
|
| 1334 | array( |
|
| 1335 | 'id' => 'espresso-toolbar-events-today', |
|
| 1336 | 'parent' => 'espresso-toolbar-events-view', |
|
| 1337 | 'title' => __('Today', 'event_espresso'), |
|
| 1338 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1339 | array('action' => 'default', 'status' => 'today'), |
|
| 1340 | $events_admin_url |
|
| 1341 | ), |
|
| 1342 | 'meta' => array( |
|
| 1343 | 'title' => __('Today', 'event_espresso'), |
|
| 1344 | 'target' => '', |
|
| 1345 | 'class' => $menu_class, |
|
| 1346 | ), |
|
| @@ 1350-1366 (lines=17) @@ | ||
| 1347 | ) |
|
| 1348 | ); |
|
| 1349 | } |
|
| 1350 | if ($this->capabilities->current_user_can( |
|
| 1351 | 'ee_read_events', |
|
| 1352 | 'ee_admin_bar_menu_espresso-toolbar-events-month' |
|
| 1353 | ) |
|
| 1354 | ) { |
|
| 1355 | //Events View This Month |
|
| 1356 | $admin_bar->add_menu( |
|
| 1357 | array( |
|
| 1358 | 'id' => 'espresso-toolbar-events-month', |
|
| 1359 | 'parent' => 'espresso-toolbar-events-view', |
|
| 1360 | 'title' => __('This Month', 'event_espresso'), |
|
| 1361 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1362 | array('action' => 'default', 'status' => 'month'), |
|
| 1363 | $events_admin_url |
|
| 1364 | ), |
|
| 1365 | 'meta' => array( |
|
| 1366 | 'title' => __('This Month', 'event_espresso'), |
|
| 1367 | 'target' => '', |
|
| 1368 | 'class' => $menu_class, |
|
| 1369 | ), |
|
| @@ 1394-1409 (lines=16) @@ | ||
| 1391 | ); |
|
| 1392 | } |
|
| 1393 | //Registration Overview Today |
|
| 1394 | if ($this->capabilities->current_user_can( |
|
| 1395 | 'ee_read_registrations', |
|
| 1396 | 'ee_admin_bar_menu_espresso-toolbar-registrations-today' |
|
| 1397 | ) |
|
| 1398 | ) { |
|
| 1399 | $admin_bar->add_menu( |
|
| 1400 | array( |
|
| 1401 | 'id' => 'espresso-toolbar-registrations-today', |
|
| 1402 | 'parent' => 'espresso-toolbar-registrations', |
|
| 1403 | 'title' => __('Today', 'event_espresso'), |
|
| 1404 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1405 | array('action' => 'default', 'status' => 'today'), |
|
| 1406 | $reg_admin_url |
|
| 1407 | ), |
|
| 1408 | 'meta' => array( |
|
| 1409 | 'title' => __('Today', 'event_espresso'), |
|
| 1410 | 'target' => '', |
|
| 1411 | 'class' => $menu_class, |
|
| 1412 | ), |
|
| @@ 1417-1435 (lines=19) @@ | ||
| 1414 | ); |
|
| 1415 | } |
|
| 1416 | //Registration Overview Today Completed |
|
| 1417 | if ($this->capabilities->current_user_can( |
|
| 1418 | 'ee_read_registrations', |
|
| 1419 | 'ee_admin_bar_menu_espresso-toolbar-registrations-today-approved' |
|
| 1420 | ) |
|
| 1421 | ) { |
|
| 1422 | $admin_bar->add_menu( |
|
| 1423 | array( |
|
| 1424 | 'id' => 'espresso-toolbar-registrations-today-approved', |
|
| 1425 | 'parent' => 'espresso-toolbar-registrations-today', |
|
| 1426 | 'title' => __('Approved', 'event_espresso'), |
|
| 1427 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1428 | array( |
|
| 1429 | 'action' => 'default', |
|
| 1430 | 'status' => 'today', |
|
| 1431 | '_reg_status' => EEM_Registration::status_id_approved, |
|
| 1432 | ), $reg_admin_url |
|
| 1433 | ), |
|
| 1434 | 'meta' => array( |
|
| 1435 | 'title' => __('Approved', 'event_espresso'), |
|
| 1436 | 'target' => '', |
|
| 1437 | 'class' => $menu_class, |
|
| 1438 | ), |
|
| @@ 1443-1461 (lines=19) @@ | ||
| 1440 | ); |
|
| 1441 | } |
|
| 1442 | //Registration Overview Today Pending\ |
|
| 1443 | if ($this->capabilities->current_user_can( |
|
| 1444 | 'ee_read_registrations', |
|
| 1445 | 'ee_admin_bar_menu_espresso-toolbar-registrations-today-pending' |
|
| 1446 | ) |
|
| 1447 | ) { |
|
| 1448 | $admin_bar->add_menu( |
|
| 1449 | array( |
|
| 1450 | 'id' => 'espresso-toolbar-registrations-today-pending', |
|
| 1451 | 'parent' => 'espresso-toolbar-registrations-today', |
|
| 1452 | 'title' => __('Pending', 'event_espresso'), |
|
| 1453 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1454 | array( |
|
| 1455 | 'action' => 'default', |
|
| 1456 | 'status' => 'today', |
|
| 1457 | 'reg_status' => EEM_Registration::status_id_pending_payment, |
|
| 1458 | ), $reg_admin_url |
|
| 1459 | ), |
|
| 1460 | 'meta' => array( |
|
| 1461 | 'title' => __('Pending Payment', 'event_espresso'), |
|
| 1462 | 'target' => '', |
|
| 1463 | 'class' => $menu_class, |
|
| 1464 | ), |
|
| @@ 1469-1487 (lines=19) @@ | ||
| 1466 | ); |
|
| 1467 | } |
|
| 1468 | //Registration Overview Today Incomplete |
|
| 1469 | if ($this->capabilities->current_user_can( |
|
| 1470 | 'ee_read_registrations', |
|
| 1471 | 'ee_admin_bar_menu_espresso-toolbar-registrations-today-not-approved' |
|
| 1472 | ) |
|
| 1473 | ) { |
|
| 1474 | $admin_bar->add_menu( |
|
| 1475 | array( |
|
| 1476 | 'id' => 'espresso-toolbar-registrations-today-not-approved', |
|
| 1477 | 'parent' => 'espresso-toolbar-registrations-today', |
|
| 1478 | 'title' => __('Not Approved', 'event_espresso'), |
|
| 1479 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1480 | array( |
|
| 1481 | 'action' => 'default', |
|
| 1482 | 'status' => 'today', |
|
| 1483 | '_reg_status' => EEM_Registration::status_id_not_approved, |
|
| 1484 | ), $reg_admin_url |
|
| 1485 | ), |
|
| 1486 | 'meta' => array( |
|
| 1487 | 'title' => __('Not Approved', 'event_espresso'), |
|
| 1488 | 'target' => '', |
|
| 1489 | 'class' => $menu_class, |
|
| 1490 | ), |
|
| @@ 1495-1513 (lines=19) @@ | ||
| 1492 | ); |
|
| 1493 | } |
|
| 1494 | //Registration Overview Today Incomplete |
|
| 1495 | if ($this->capabilities->current_user_can( |
|
| 1496 | 'ee_read_registrations', |
|
| 1497 | 'ee_admin_bar_menu_espresso-toolbar-registrations-today-cancelled' |
|
| 1498 | ) |
|
| 1499 | ) { |
|
| 1500 | $admin_bar->add_menu( |
|
| 1501 | array( |
|
| 1502 | 'id' => 'espresso-toolbar-registrations-today-cancelled', |
|
| 1503 | 'parent' => 'espresso-toolbar-registrations-today', |
|
| 1504 | 'title' => __('Cancelled', 'event_espresso'), |
|
| 1505 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1506 | array( |
|
| 1507 | 'action' => 'default', |
|
| 1508 | 'status' => 'today', |
|
| 1509 | '_reg_status' => EEM_Registration::status_id_cancelled, |
|
| 1510 | ), $reg_admin_url |
|
| 1511 | ), |
|
| 1512 | 'meta' => array( |
|
| 1513 | 'title' => __('Cancelled', 'event_espresso'), |
|
| 1514 | 'target' => '', |
|
| 1515 | 'class' => $menu_class, |
|
| 1516 | ), |
|
| @@ 1521-1536 (lines=16) @@ | ||
| 1518 | ); |
|
| 1519 | } |
|
| 1520 | //Registration Overview This Month |
|
| 1521 | if ($this->capabilities->current_user_can( |
|
| 1522 | 'ee_read_registrations', |
|
| 1523 | 'ee_admin_bar_menu_espresso-toolbar-registrations-month' |
|
| 1524 | ) |
|
| 1525 | ) { |
|
| 1526 | $admin_bar->add_menu( |
|
| 1527 | array( |
|
| 1528 | 'id' => 'espresso-toolbar-registrations-month', |
|
| 1529 | 'parent' => 'espresso-toolbar-registrations', |
|
| 1530 | 'title' => __('This Month', 'event_espresso'), |
|
| 1531 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1532 | array('action' => 'default', 'status' => 'month'), |
|
| 1533 | $reg_admin_url |
|
| 1534 | ), |
|
| 1535 | 'meta' => array( |
|
| 1536 | 'title' => __('This Month', 'event_espresso'), |
|
| 1537 | 'target' => '', |
|
| 1538 | 'class' => $menu_class, |
|
| 1539 | ), |
|
| @@ 1544-1562 (lines=19) @@ | ||
| 1541 | ); |
|
| 1542 | } |
|
| 1543 | //Registration Overview This Month Approved |
|
| 1544 | if ($this->capabilities->current_user_can( |
|
| 1545 | 'ee_read_registrations', |
|
| 1546 | 'ee_admin_bar_menu_espresso-toolbar-registrations-month-approved' |
|
| 1547 | ) |
|
| 1548 | ) { |
|
| 1549 | $admin_bar->add_menu( |
|
| 1550 | array( |
|
| 1551 | 'id' => 'espresso-toolbar-registrations-month-approved', |
|
| 1552 | 'parent' => 'espresso-toolbar-registrations-month', |
|
| 1553 | 'title' => __('Approved', 'event_espresso'), |
|
| 1554 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1555 | array( |
|
| 1556 | 'action' => 'default', |
|
| 1557 | 'status' => 'month', |
|
| 1558 | '_reg_status' => EEM_Registration::status_id_approved, |
|
| 1559 | ), $reg_admin_url |
|
| 1560 | ), |
|
| 1561 | 'meta' => array( |
|
| 1562 | 'title' => __('Approved', 'event_espresso'), |
|
| 1563 | 'target' => '', |
|
| 1564 | 'class' => $menu_class, |
|
| 1565 | ), |
|
| @@ 1570-1588 (lines=19) @@ | ||
| 1567 | ); |
|
| 1568 | } |
|
| 1569 | //Registration Overview This Month Pending |
|
| 1570 | if ($this->capabilities->current_user_can( |
|
| 1571 | 'ee_read_registrations', |
|
| 1572 | 'ee_admin_bar_menu_espresso-toolbar-registrations-month-pending' |
|
| 1573 | ) |
|
| 1574 | ) { |
|
| 1575 | $admin_bar->add_menu( |
|
| 1576 | array( |
|
| 1577 | 'id' => 'espresso-toolbar-registrations-month-pending', |
|
| 1578 | 'parent' => 'espresso-toolbar-registrations-month', |
|
| 1579 | 'title' => __('Pending', 'event_espresso'), |
|
| 1580 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1581 | array( |
|
| 1582 | 'action' => 'default', |
|
| 1583 | 'status' => 'month', |
|
| 1584 | '_reg_status' => EEM_Registration::status_id_pending_payment, |
|
| 1585 | ), $reg_admin_url |
|
| 1586 | ), |
|
| 1587 | 'meta' => array( |
|
| 1588 | 'title' => __('Pending', 'event_espresso'), |
|
| 1589 | 'target' => '', |
|
| 1590 | 'class' => $menu_class, |
|
| 1591 | ), |
|
| @@ 1596-1614 (lines=19) @@ | ||
| 1593 | ); |
|
| 1594 | } |
|
| 1595 | //Registration Overview This Month Not Approved |
|
| 1596 | if ($this->capabilities->current_user_can( |
|
| 1597 | 'ee_read_registrations', |
|
| 1598 | 'ee_admin_bar_menu_espresso-toolbar-registrations-month-not-approved' |
|
| 1599 | ) |
|
| 1600 | ) { |
|
| 1601 | $admin_bar->add_menu( |
|
| 1602 | array( |
|
| 1603 | 'id' => 'espresso-toolbar-registrations-month-not-approved', |
|
| 1604 | 'parent' => 'espresso-toolbar-registrations-month', |
|
| 1605 | 'title' => __('Not Approved', 'event_espresso'), |
|
| 1606 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1607 | array( |
|
| 1608 | 'action' => 'default', |
|
| 1609 | 'status' => 'month', |
|
| 1610 | '_reg_status' => EEM_Registration::status_id_not_approved, |
|
| 1611 | ), $reg_admin_url |
|
| 1612 | ), |
|
| 1613 | 'meta' => array( |
|
| 1614 | 'title' => __('Not Approved', 'event_espresso'), |
|
| 1615 | 'target' => '', |
|
| 1616 | 'class' => $menu_class, |
|
| 1617 | ), |
|
| @@ 1622-1640 (lines=19) @@ | ||
| 1619 | ); |
|
| 1620 | } |
|
| 1621 | //Registration Overview This Month Cancelled |
|
| 1622 | if ($this->capabilities->current_user_can( |
|
| 1623 | 'ee_read_registrations', |
|
| 1624 | 'ee_admin_bar_menu_espresso-toolbar-registrations-month-cancelled' |
|
| 1625 | ) |
|
| 1626 | ) { |
|
| 1627 | $admin_bar->add_menu( |
|
| 1628 | array( |
|
| 1629 | 'id' => 'espresso-toolbar-registrations-month-cancelled', |
|
| 1630 | 'parent' => 'espresso-toolbar-registrations-month', |
|
| 1631 | 'title' => __('Cancelled', 'event_espresso'), |
|
| 1632 | 'href' => EEH_URL::add_query_args_and_nonce( |
|
| 1633 | array( |
|
| 1634 | 'action' => 'default', |
|
| 1635 | 'status' => 'month', |
|
| 1636 | '_reg_status' => EEM_Registration::status_id_cancelled, |
|
| 1637 | ), $reg_admin_url |
|
| 1638 | ), |
|
| 1639 | 'meta' => array( |
|
| 1640 | 'title' => __('Cancelled', 'event_espresso'), |
|
| 1641 | 'target' => '', |
|
| 1642 | 'class' => $menu_class, |
|
| 1643 | ), |
|