Code Duplication    Length = 31-31 lines in 2 locations

modules/event_single/EED_Event_Single.module.php 1 location

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

modules/events_archive/EED_Events_Archive.module.php 1 location

@@ 155-185 (lines=31) @@
152
	 * @param \EE_Events_Archive_Config $config
153
	 * @return \EE_Template_Part_Manager
154
	 */
155
	public function initialize_template_parts( EE_Events_Archive_Config $config = null ) {
156
		$config = $config instanceof EE_Events_Archive_Config ? $config : $this->config();
157
		EEH_Autoloader::instance()->register_template_part_autoloaders();
158
		$template_parts = new EE_Template_Part_Manager();
159
		$template_parts->add_template_part(
160
			'tickets',
161
			__( 'Ticket Selector', 'event_espresso' ),
162
			'content-espresso_events-tickets.php',
163
			$config->display_order_tickets
164
		);
165
		$template_parts->add_template_part(
166
			'datetimes',
167
			__( 'Dates and Times', 'event_espresso' ),
168
			'content-espresso_events-datetimes.php',
169
			$config->display_order_datetimes
170
		);
171
		$template_parts->add_template_part(
172
			'event',
173
			__( 'Event Description', 'event_espresso' ),
174
			'content-espresso_events-details.php',
175
			$config->display_order_event
176
		);
177
		$template_parts->add_template_part(
178
			'venue',
179
			__( 'Venue Information', 'event_espresso' ),
180
			'content-espresso_events-venues.php',
181
			$config->display_order_venue
182
		);
183
		do_action( 'AHEE__EED_Event_Archive__initialize_template_parts', $template_parts );
184
		return $template_parts;
185
	}
186
187
188