Code Duplication    Length = 35-36 lines in 2 locations

admin_pages/venues/Venues_Admin_Page.core.php 1 location

@@ 1263-1297 (lines=35) @@
1260
1261
1262
1263
	protected function _category_details_content() {
1264
		$editor_args['category_desc'] = array(
1265
			'type' => 'wp_editor',
1266
			'value' => EEH_Formatter::admin_format_content($this->_category->category_desc),
1267
			'class' => 'my_editor_custom',
1268
			'wpeditor_args' => array( 'media_buttons' => FALSE )
1269
		);
1270
		$_wp_editor = $this->_generate_admin_form_fields( $editor_args, 'array' );
1271
1272
		$all_terms = get_terms( array('espresso_venue_categories' ), array( 'hide_empty' => 0, 'exclude' => array( $this->_category->id ) ) );
1273
1274
		//setup category select for term parents.
1275
		$category_select_values[] = array(
1276
			'text' => __('No Parent', 'event_espresso'),
1277
			'id' => 0
1278
			);
1279
		foreach ( $all_terms as $term ) {
1280
			$category_select_values[] = array(
1281
				'text' => $term->name,
1282
				'id' => $term->term_id
1283
				);
1284
		}
1285
1286
		$category_select = EEH_Form_Fields::select_input( 'category_parent', $category_select_values, $this->_category->parent );
1287
		$template_args = array(
1288
			'category' => $this->_category,
1289
			'category_select' => $category_select,
1290
			'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'),
1291
			'category_desc_editor' =>  $_wp_editor['category_desc']['field'],
1292
			'disable' => '',
1293
			'disabled_message' =>FALSE
1294
			);
1295
		$template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php';
1296
		return EEH_Template::display_template($template, $template_args, TRUE );
1297
	}
1298
1299
1300
	protected function _delete_categories() {

admin_pages/events/Events_Admin_Page.core.php 1 location

@@ 2202-2237 (lines=36) @@
2199
2200
2201
2202
	protected function _category_details_content() {
2203
		$editor_args['category_desc'] = array(
2204
			'type' => 'wp_editor',
2205
			'value' => EEH_Formatter::admin_format_content($this->_category->category_desc),
2206
			'class' => 'my_editor_custom',
2207
			'wpeditor_args' => array('media_buttons' => FALSE )
2208
		);
2209
		$_wp_editor = $this->_generate_admin_form_fields( $editor_args, 'array' );
2210
2211
		$all_terms = get_terms( array('espresso_event_categories' ), array( 'hide_empty' => 0, 'exclude' => array( $this->_category->id ) ) );
2212
2213
		//setup category select for term parents.
2214
		$category_select_values[] = array(
2215
			'text' => __('No Parent', 'event_espresso'),
2216
			'id' => 0
2217
			);
2218
		foreach ( $all_terms as $term ) {
2219
			$category_select_values[] = array(
2220
				'text' => $term->name,
2221
				'id' => $term->term_id
2222
				);
2223
		}
2224
2225
		$category_select = EEH_Form_Fields::select_input( 'category_parent', $category_select_values, $this->_category->parent );
2226
2227
		$template_args = array(
2228
			'category' => $this->_category,
2229
			'category_select' => $category_select,
2230
			'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'),
2231
			'category_desc_editor' =>  $_wp_editor['category_desc']['field'],
2232
			'disable' => '',
2233
			'disabled_message' => FALSE
2234
			);
2235
		$template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php';
2236
		return EEH_Template::display_template($template, $template_args, TRUE );
2237
	}
2238
2239
2240
	protected function _delete_categories() {