Code Duplication    Length = 13-14 lines in 5 locations

core/EE_System.core.php 5 locations

@@ 1060-1072 (lines=13) @@
1057
            ),
1058
        ));
1059
        //Events
1060
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events')) {
1061
            $admin_bar->add_menu(array(
1062
                'id'     => 'espresso-toolbar-events',
1063
                'parent' => 'espresso-toolbar',
1064
                'title'  => __('Events', 'event_espresso'),
1065
                'href'   => $events_admin_url,
1066
                'meta'   => array(
1067
                    'title'  => __('Events', 'event_espresso'),
1068
                    'target' => '',
1069
                    'class'  => $menu_class,
1070
                ),
1071
            ));
1072
        }
1073
        if ($this->registry->CAP->current_user_can('ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new')) {
1074
            //Events Add New
1075
            $admin_bar->add_menu(array(
@@ 1109-1121 (lines=13) @@
1106
            }
1107
        }
1108
        //Events View
1109
        if ($this->registry->CAP->current_user_can('ee_read_events',
1110
            'ee_admin_bar_menu_espresso-toolbar-events-view')
1111
        ) {
1112
            $admin_bar->add_menu(array(
1113
                'id'     => 'espresso-toolbar-events-view',
1114
                'parent' => 'espresso-toolbar-events',
1115
                'title'  => __('View', 'event_espresso'),
1116
                'href'   => $events_admin_url,
1117
                'meta'   => array(
1118
                    'title'  => __('View', 'event_espresso'),
1119
                    'target' => '',
1120
                    'class'  => $menu_class,
1121
                ),
1122
            ));
1123
        }
1124
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
@@ 1124-1137 (lines=14) @@
1121
                ),
1122
            ));
1123
        }
1124
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
1125
            //Events View All
1126
            $admin_bar->add_menu(array(
1127
                'id'     => 'espresso-toolbar-events-all',
1128
                'parent' => 'espresso-toolbar-events-view',
1129
                'title'  => __('All', 'event_espresso'),
1130
                'href'   => $events_admin_url,
1131
                'meta'   => array(
1132
                    'title'  => __('All', 'event_espresso'),
1133
                    'target' => '',
1134
                    'class'  => $menu_class,
1135
                ),
1136
            ));
1137
        }
1138
        if ($this->registry->CAP->current_user_can('ee_read_events',
1139
            'ee_admin_bar_menu_espresso-toolbar-events-today')
1140
        ) {
@@ 1173-1185 (lines=13) @@
1170
            ));
1171
        }
1172
        //Registration Overview
1173
        if ($this->registry->CAP->current_user_can('ee_read_registrations',
1174
            'ee_admin_bar_menu_espresso-toolbar-registrations')
1175
        ) {
1176
            $admin_bar->add_menu(array(
1177
                'id'     => 'espresso-toolbar-registrations',
1178
                'parent' => 'espresso-toolbar',
1179
                'title'  => __('Registrations', 'event_espresso'),
1180
                'href'   => $reg_admin_url,
1181
                'meta'   => array(
1182
                    'title'  => __('Registrations', 'event_espresso'),
1183
                    'target' => '',
1184
                    'class'  => $menu_class,
1185
                ),
1186
            ));
1187
        }
1188
        //Registration Overview Today
@@ 1383-1395 (lines=13) @@
1380
            ));
1381
        }
1382
        //Extensions & Services
1383
        if ($this->registry->CAP->current_user_can('ee_read_ee',
1384
            'ee_admin_bar_menu_espresso-toolbar-extensions-and-services')
1385
        ) {
1386
            $admin_bar->add_menu(array(
1387
                'id'     => 'espresso-toolbar-extensions-and-services',
1388
                'parent' => 'espresso-toolbar',
1389
                'title'  => __('Extensions & Services', 'event_espresso'),
1390
                'href'   => $extensions_admin_url,
1391
                'meta'   => array(
1392
                    'title'  => __('Extensions & Services', 'event_espresso'),
1393
                    'target' => '',
1394
                    'class'  => $menu_class,
1395
                ),
1396
            ));
1397
        }
1398
    }