Code Duplication    Length = 31-31 lines in 2 locations

modules/event_single/EED_Event_Single.module.php 1 location

@@ 103-133 (lines=31) @@
100
	 * @param \EE_Event_Single_Config $config
101
	 * @return \EE_Template_Part_Manager
102
	 */
103
	public function initialize_template_parts( EE_Event_Single_Config $config = null ) {
104
		$config = $config instanceof EE_Event_Single_Config ? $config : $this->config();
105
		EEH_Autoloader::instance()->register_template_part_autoloaders();
106
		$template_parts = new EE_Template_Part_Manager();
107
		$template_parts->add_template_part(
108
			'tickets',
109
			__( 'Ticket Selector', 'event_espresso' ),
110
			'content-espresso_events-tickets.php',
111
			$config->display_order_tickets
112
		);
113
		$template_parts->add_template_part(
114
			'datetimes',
115
			__( 'Dates and Times', 'event_espresso' ),
116
			'content-espresso_events-datetimes.php',
117
			$config->display_order_datetimes
118
		);
119
		$template_parts->add_template_part(
120
			'event',
121
			__( 'Event Description', 'event_espresso' ),
122
			'content-espresso_events-details.php',
123
			$config->display_order_event
124
		);
125
		$template_parts->add_template_part(
126
			'venue',
127
			__( 'Venue Information', 'event_espresso' ),
128
			'content-espresso_events-venues.php',
129
			$config->display_order_venue
130
		);
131
		do_action( 'AHEE__EED_Event_Single__initialize_template_parts', $template_parts );
132
		return $template_parts;
133
	}
134
135
136

modules/events_archive/EED_Events_Archive.module.php 1 location

@@ 104-134 (lines=31) @@
101
	 * @param \EE_Events_Archive_Config $config
102
	 * @return \EE_Template_Part_Manager
103
	 */
104
	public function initialize_template_parts( EE_Events_Archive_Config $config = null ) {
105
		$config = $config instanceof EE_Events_Archive_Config ? $config : $this->config();
106
		EEH_Autoloader::instance()->register_template_part_autoloaders();
107
		$template_parts = new EE_Template_Part_Manager();
108
		$template_parts->add_template_part(
109
			'tickets',
110
			__( 'Ticket Selector', 'event_espresso' ),
111
			'content-espresso_events-tickets.php',
112
			$config->display_order_tickets
113
		);
114
		$template_parts->add_template_part(
115
			'datetimes',
116
			__( 'Dates and Times', 'event_espresso' ),
117
			'content-espresso_events-datetimes.php',
118
			$config->display_order_datetimes
119
		);
120
		$template_parts->add_template_part(
121
			'event',
122
			__( 'Event Description', 'event_espresso' ),
123
			'content-espresso_events-details.php',
124
			$config->display_order_event
125
		);
126
		$template_parts->add_template_part(
127
			'venue',
128
			__( 'Venue Information', 'event_espresso' ),
129
			'content-espresso_events-venues.php',
130
			$config->display_order_venue
131
		);
132
		do_action( 'AHEE__EED_Event_Archive__initialize_template_parts', $template_parts );
133
		return $template_parts;
134
	}
135
136
137