Code Duplication    Length = 13-14 lines in 5 locations

core/EE_System.core.php 5 locations

@@ 1079-1091 (lines=13) @@
1076
            ),
1077
        ));
1078
        //Events
1079
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events')) {
1080
            $admin_bar->add_menu(array(
1081
                'id'     => 'espresso-toolbar-events',
1082
                'parent' => 'espresso-toolbar',
1083
                'title'  => __('Events', 'event_espresso'),
1084
                'href'   => $events_admin_url,
1085
                'meta'   => array(
1086
                    'title'  => __('Events', 'event_espresso'),
1087
                    'target' => '',
1088
                    'class'  => $menu_class,
1089
                ),
1090
            ));
1091
        }
1092
        if ($this->registry->CAP->current_user_can('ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new')) {
1093
            //Events Add New
1094
            $admin_bar->add_menu(array(
@@ 1128-1140 (lines=13) @@
1125
            }
1126
        }
1127
        //Events View
1128
        if ($this->registry->CAP->current_user_can('ee_read_events',
1129
            'ee_admin_bar_menu_espresso-toolbar-events-view')
1130
        ) {
1131
            $admin_bar->add_menu(array(
1132
                'id'     => 'espresso-toolbar-events-view',
1133
                'parent' => 'espresso-toolbar-events',
1134
                'title'  => __('View', 'event_espresso'),
1135
                'href'   => $events_admin_url,
1136
                'meta'   => array(
1137
                    'title'  => __('View', 'event_espresso'),
1138
                    'target' => '',
1139
                    'class'  => $menu_class,
1140
                ),
1141
            ));
1142
        }
1143
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
@@ 1143-1156 (lines=14) @@
1140
                ),
1141
            ));
1142
        }
1143
        if ($this->registry->CAP->current_user_can('ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all')) {
1144
            //Events View All
1145
            $admin_bar->add_menu(array(
1146
                'id'     => 'espresso-toolbar-events-all',
1147
                'parent' => 'espresso-toolbar-events-view',
1148
                'title'  => __('All', 'event_espresso'),
1149
                'href'   => $events_admin_url,
1150
                'meta'   => array(
1151
                    'title'  => __('All', 'event_espresso'),
1152
                    'target' => '',
1153
                    'class'  => $menu_class,
1154
                ),
1155
            ));
1156
        }
1157
        if ($this->registry->CAP->current_user_can('ee_read_events',
1158
            'ee_admin_bar_menu_espresso-toolbar-events-today')
1159
        ) {
@@ 1192-1204 (lines=13) @@
1189
            ));
1190
        }
1191
        //Registration Overview
1192
        if ($this->registry->CAP->current_user_can('ee_read_registrations',
1193
            'ee_admin_bar_menu_espresso-toolbar-registrations')
1194
        ) {
1195
            $admin_bar->add_menu(array(
1196
                'id'     => 'espresso-toolbar-registrations',
1197
                'parent' => 'espresso-toolbar',
1198
                'title'  => __('Registrations', 'event_espresso'),
1199
                'href'   => $reg_admin_url,
1200
                'meta'   => array(
1201
                    'title'  => __('Registrations', 'event_espresso'),
1202
                    'target' => '',
1203
                    'class'  => $menu_class,
1204
                ),
1205
            ));
1206
        }
1207
        //Registration Overview Today
@@ 1402-1414 (lines=13) @@
1399
            ));
1400
        }
1401
        //Extensions & Services
1402
        if ($this->registry->CAP->current_user_can('ee_read_ee',
1403
            'ee_admin_bar_menu_espresso-toolbar-extensions-and-services')
1404
        ) {
1405
            $admin_bar->add_menu(array(
1406
                'id'     => 'espresso-toolbar-extensions-and-services',
1407
                'parent' => 'espresso-toolbar',
1408
                'title'  => __('Extensions & Services', 'event_espresso'),
1409
                'href'   => $extensions_admin_url,
1410
                'meta'   => array(
1411
                    'title'  => __('Extensions & Services', 'event_espresso'),
1412
                    'target' => '',
1413
                    'class'  => $menu_class,
1414
                ),
1415
            ));
1416
        }
1417
    }