/*
Theme Name:           Flatsome
Theme URI:            http://flatsome.uxthemes.com
Author:               UX-Themes
Author URI:           https://uxthemes.com
Description:          Multi-Purpose Responsive WooCommerce Theme
Version:              3.19.8
Requires at least:    6.4
Requires PHP:         7.4
WC requires at least: 8.3
Text Domain:          flatsome
License:              https://themeforest.net/licenses
License URI:          https://themeforest.net/licenses
*/


/***************
All custom CSS should be added to Flatsome > Advanced > Custom CSS,
or in the style.css of a Child Theme.
***************/
add_action('admin_head', function() {
    ?>
    <style>
        .taxonomy-category .term-description-wrap {
            display: none;
        }
    </style>
    <?php
});

add_filter('edit_category_form_fields', function($tag) {
    ?>
    <tr class="form-field">
        <th scope="row"><label for="description">Mô tả</label></th>
        <td>
            <?php
            $settings = array(
                'textarea_name' => 'description',
                'textarea_rows' => 7,
                'media_buttons' => true,
                'tinymce'       => true,
                'quicktags'     => true
            );
            wp_editor(htmlspecialchars_decode($tag->description), 'cat_description', $settings);
            ?>
        </td>
    </tr>
    <?php
});