Code Duplication    Length = 13-14 lines in 5 locations

core/EE_System.core.php 5 locations

@@ 943-955 (lines=13) @@
940
		));
941
942
		//Events
943
		if ( $this->registry->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events' ) ) {
944
			$admin_bar->add_menu(array(
945
					'id' => 'espresso-toolbar-events',
946
					'parent' => 'espresso-toolbar',
947
					'title' => __( 'Events', 'event_espresso' ),
948
					'href' => $events_admin_url,
949
					'meta' => array(
950
							'title' => __('Events', 'event_espresso'),
951
							'target' => '',
952
							'class' => $menu_class
953
					),
954
			));
955
		}
956
957
958
		if ( $this->registry->CAP->current_user_can( 'ee_edit_events', 'ee_admin_bar_menu_espresso-toolbar-events-new' ) ) {
@@ 996-1008 (lines=13) @@
993
		}
994
995
		//Events View
996
		if ( $this->registry->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-view' ) ) {
997
			$admin_bar->add_menu(array(
998
					'id' => 'espresso-toolbar-events-view',
999
					'parent' => 'espresso-toolbar-events',
1000
					'title' => __( 'View', 'event_espresso' ),
1001
					'href' => $events_admin_url,
1002
					'meta' => array(
1003
							'title' => __('View', 'event_espresso'),
1004
							'target' => '',
1005
							'class' => $menu_class
1006
					),
1007
			));
1008
		}
1009
1010
		if ( $this->registry->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) {
1011
			//Events View All
@@ 1010-1023 (lines=14) @@
1007
			));
1008
		}
1009
1010
		if ( $this->registry->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-all' ) ) {
1011
			//Events View All
1012
			$admin_bar->add_menu(array(
1013
					'id' => 'espresso-toolbar-events-all',
1014
					'parent' => 'espresso-toolbar-events-view',
1015
					'title' => __( 'All', 'event_espresso' ),
1016
					'href' => $events_admin_url,
1017
					'meta' => array(
1018
							'title' => __('All', 'event_espresso'),
1019
							'target' => '',
1020
							'class' => $menu_class
1021
					),
1022
			));
1023
		}
1024
1025
1026
		if ( $this->registry->CAP->current_user_can( 'ee_read_events', 'ee_admin_bar_menu_espresso-toolbar-events-today' ) ) {
@@ 1058-1070 (lines=13) @@
1055
		}
1056
1057
		//Registration Overview
1058
		if ( $this->registry->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations' ) ) {
1059
			$admin_bar->add_menu(array(
1060
					'id' => 'espresso-toolbar-registrations',
1061
					'parent' => 'espresso-toolbar',
1062
					'title' => __( 'Registrations', 'event_espresso' ),
1063
					'href' => $reg_admin_url,
1064
					'meta' => array(
1065
							'title' => __('Registrations', 'event_espresso'),
1066
							'target' => '',
1067
							'class' => $menu_class
1068
					),
1069
			));
1070
		}
1071
1072
		//Registration Overview Today
1073
		if ( $this->registry->CAP->current_user_can( 'ee_read_registrations', 'ee_admin_bar_menu_espresso-toolbar-registrations-today' ) ) {
@@ 1224-1236 (lines=13) @@
1221
		}
1222
1223
		//Extensions & Services
1224
		if ( $this->registry->CAP->current_user_can( 'ee_read_ee', 'ee_admin_bar_menu_espresso-toolbar-extensions-and-services' ) ) {
1225
			$admin_bar->add_menu(array(
1226
					'id' => 'espresso-toolbar-extensions-and-services',
1227
					'parent' => 'espresso-toolbar',
1228
					'title' => __( 'Extensions & Services', 'event_espresso' ),
1229
					'href' => $extensions_admin_url,
1230
					'meta' => array(
1231
							'title' => __('Extensions & Services', 'event_espresso'),
1232
							'target' => '',
1233
							'class' => $menu_class
1234
					),
1235
			));
1236
		}
1237
	}
1238
1239