| @@ 1342-1376 (lines=35) @@ | ||
| 1339 | } |
|
| 1340 | ||
| 1341 | ||
| 1342 | protected function _category_details_content() |
|
| 1343 | { |
|
| 1344 | $editor_args['category_desc'] = array( |
|
| 1345 | 'type' => 'wp_editor', |
|
| 1346 | 'value' => EEH_Formatter::admin_format_content($this->_category->category_desc), |
|
| 1347 | 'class' => 'my_editor_custom', |
|
| 1348 | 'wpeditor_args' => array('media_buttons' => false), |
|
| 1349 | ); |
|
| 1350 | $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); |
|
| 1351 | ||
| 1352 | $all_terms = get_terms( |
|
| 1353 | array('espresso_venue_categories'), |
|
| 1354 | array('hide_empty' => 0, 'exclude' => array($this->_category->id)) |
|
| 1355 | ); |
|
| 1356 | ||
| 1357 | // setup category select for term parents. |
|
| 1358 | $category_select_values[] = array( |
|
| 1359 | 'text' => __('No Parent', 'event_espresso'), |
|
| 1360 | 'id' => 0, |
|
| 1361 | ); |
|
| 1362 | foreach ($all_terms as $term) { |
|
| 1363 | $category_select_values[] = array( |
|
| 1364 | 'text' => $term->name, |
|
| 1365 | 'id' => $term->term_id, |
|
| 1366 | ); |
|
| 1367 | } |
|
| 1368 | ||
| 1369 | $category_select = EEH_Form_Fields::select_input( |
|
| 1370 | 'category_parent', |
|
| 1371 | $category_select_values, |
|
| 1372 | $this->_category->parent |
|
| 1373 | ); |
|
| 1374 | $template_args = array( |
|
| 1375 | 'category' => $this->_category, |
|
| 1376 | 'category_select' => $category_select, |
|
| 1377 | 'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'), |
|
| 1378 | 'category_desc_editor' => $_wp_editor['category_desc']['field'], |
|
| 1379 | 'disable' => '', |
|
| @@ 2619-2658 (lines=40) @@ | ||
| 2616 | /** |
|
| 2617 | * Output category details content. |
|
| 2618 | */ |
|
| 2619 | protected function _category_details_content() |
|
| 2620 | { |
|
| 2621 | $editor_args['category_desc'] = array( |
|
| 2622 | 'type' => 'wp_editor', |
|
| 2623 | 'value' => EEH_Formatter::admin_format_content($this->_category->category_desc), |
|
| 2624 | 'class' => 'my_editor_custom', |
|
| 2625 | 'wpeditor_args' => array('media_buttons' => false), |
|
| 2626 | ); |
|
| 2627 | $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); |
|
| 2628 | $all_terms = get_terms( |
|
| 2629 | array(EEM_CPT_Base::EVENT_CATEGORY_TAXONOMY), |
|
| 2630 | array('hide_empty' => 0, 'exclude' => array($this->_category->id)) |
|
| 2631 | ); |
|
| 2632 | // setup category select for term parents. |
|
| 2633 | $category_select_values[] = array( |
|
| 2634 | 'text' => esc_html__('No Parent', 'event_espresso'), |
|
| 2635 | 'id' => 0, |
|
| 2636 | ); |
|
| 2637 | foreach ($all_terms as $term) { |
|
| 2638 | $category_select_values[] = array( |
|
| 2639 | 'text' => $term->name, |
|
| 2640 | 'id' => $term->term_id, |
|
| 2641 | ); |
|
| 2642 | } |
|
| 2643 | $category_select = EEH_Form_Fields::select_input( |
|
| 2644 | 'category_parent', |
|
| 2645 | $category_select_values, |
|
| 2646 | $this->_category->parent |
|
| 2647 | ); |
|
| 2648 | $template_args = array( |
|
| 2649 | 'category' => $this->_category, |
|
| 2650 | 'category_select' => $category_select, |
|
| 2651 | 'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'), |
|
| 2652 | 'category_desc_editor' => $_wp_editor['category_desc']['field'], |
|
| 2653 | 'disable' => '', |
|
| 2654 | 'disabled_message' => false, |
|
| 2655 | ); |
|
| 2656 | $template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php'; |
|
| 2657 | return EEH_Template::display_template($template, $template_args, true); |
|
| 2658 | } |
|
| 2659 | ||
| 2660 | ||
| 2661 | /** |
|