Code Duplication    Length = 13-14 lines in 5 locations

core/EE_System.core.php 5 locations

@@ 1170-1182 (lines=13) @@
1167
            ),
1168
        ));
1169
        //Events
1170
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events')) {
1171
            $admin_bar->add_menu(array(
1172
                'id'     => 'espresso-toolbar-events',
1173
                'parent' => 'espresso-toolbar',
1174
                'title'  => __('Events', 'event_espresso'),
1175
                'href'   => $events_admin_url,
1176
                'meta'   => array(
1177
                    'title'  => __('Events', 'event_espresso'),
1178
                    'target' => '',
1179
                    'class'  => $menu_class,
1180
                ),
1181
            ));
1182
        }
1183
        if ($this->registry->CAP->current_user_can('ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new')) {
1184
            //Events Add New
1185
            $admin_bar->add_menu(array(
@@ 1219-1231 (lines=13) @@
1216
            }
1217
        }
1218
        //Events View
1219
        if ($this->registry->CAP->current_user_can('ee_read_events',
1220
            'ee_admin_bar_menu_espresso-toolbar-events-view')
1221
        ) {
1222
            $admin_bar->add_menu(array(
1223
                'id'     => 'espresso-toolbar-events-view',
1224
                'parent' => 'espresso-toolbar-events',
1225
                'title'  => __('View', 'event_espresso'),
1226
                'href'   => $events_admin_url,
1227
                'meta'   => array(
1228
                    'title'  => __('View', 'event_espresso'),
1229
                    'target' => '',
1230
                    'class'  => $menu_class,
1231
                ),
1232
            ));
1233
        }
1234
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
@@ 1234-1247 (lines=14) @@
1231
                ),
1232
            ));
1233
        }
1234
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
1235
            //Events View All
1236
            $admin_bar->add_menu(array(
1237
                'id'     => 'espresso-toolbar-events-all',
1238
                'parent' => 'espresso-toolbar-events-view',
1239
                'title'  => __('All', 'event_espresso'),
1240
                'href'   => $events_admin_url,
1241
                'meta'   => array(
1242
                    'title'  => __('All', 'event_espresso'),
1243
                    'target' => '',
1244
                    'class'  => $menu_class,
1245
                ),
1246
            ));
1247
        }
1248
        if ($this->registry->CAP->current_user_can('ee_read_events',
1249
            'ee_admin_bar_menu_espresso-toolbar-events-today')
1250
        ) {
@@ 1283-1295 (lines=13) @@
1280
            ));
1281
        }
1282
        //Registration Overview
1283
        if ($this->registry->CAP->current_user_can('ee_read_registrations',
1284
            'ee_admin_bar_menu_espresso-toolbar-registrations')
1285
        ) {
1286
            $admin_bar->add_menu(array(
1287
                'id'     => 'espresso-toolbar-registrations',
1288
                'parent' => 'espresso-toolbar',
1289
                'title'  => __('Registrations', 'event_espresso'),
1290
                'href'   => $reg_admin_url,
1291
                'meta'   => array(
1292
                    'title'  => __('Registrations', 'event_espresso'),
1293
                    'target' => '',
1294
                    'class'  => $menu_class,
1295
                ),
1296
            ));
1297
        }
1298
        //Registration Overview Today
@@ 1493-1505 (lines=13) @@
1490
            ));
1491
        }
1492
        //Extensions & Services
1493
        if ($this->registry->CAP->current_user_can('ee_read_ee',
1494
            'ee_admin_bar_menu_espresso-toolbar-extensions-and-services')
1495
        ) {
1496
            $admin_bar->add_menu(array(
1497
                'id'     => 'espresso-toolbar-extensions-and-services',
1498
                'parent' => 'espresso-toolbar',
1499
                'title'  => __('Extensions & Services', 'event_espresso'),
1500
                'href'   => $extensions_admin_url,
1501
                'meta'   => array(
1502
                    'title'  => __('Extensions & Services', 'event_espresso'),
1503
                    'target' => '',
1504
                    'class'  => $menu_class,
1505
                ),
1506
            ));
1507
        }
1508
    }