Code Duplication    Length = 13-14 lines in 5 locations

core/EE_System.core.php 5 locations

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