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

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