나는이 코드를 내 wordpress function.php에 넣었습니다.Wordpress의 Tinymce 오류 페이지 카테고리
remove_filter('pre_term_description', 'wp_filter_kses');
remove_filter('term_description', 'wp_kses_data');
add_filter('edit_category_form_fields', 'cat_description');
function cat_description($tag)
{
?>
<table class="form-table">
<tr class="form-field">
<th scope="row" valign="top"><label for="description"><?php _ex('Description', 'Taxonomy Description'); ?></label></th>
<td>
<?php
$settings = array('wpautop' => true, 'media_buttons' => true, 'quicktags' => true, 'textarea_rows' => '15', 'textarea_name' => 'description');
wp_editor(wp_kses_post($tag->description , ENT_QUOTES, 'UTF-8'), 'cat_description', $settings);
?>
<br />
<span class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></span>
</td>
</tr>
</table>
<?php
}
add_action('admin_head', 'remove_default_category_description');
function remove_default_category_description()
{
global $current_screen;
if ($current_screen->id == 'edit-category')
{
?>
<script type="text/javascript">
jQuery(function($) {
$('textarea#description').closest('tr.form-field').remove();
});
</script>
<?php
}
}
눈에 잘 띄지 않습니다.
그러나 "content-html"에 표시되어야하는 텍스트는 "content-tmce"에 표시됩니다. https://paulund.co.uk/add-tinymce-editor-category-description
는 어떻게 해결할 수 :이 가이드를 따라가
"content-html": <strong>hello</strong>
"content-tmce": <strong>hello</strong>
: 예를 들어
?
은 어디에서이 코드를 얻었 는가? 가이드였습니까? 다른 리소스 나 예제에 링크 할 수 있습니까? –
나는 이것을 따른다 : https://paulund.co.uk/add-tinymce-editor-category-description –
너를 괴롭히는 것이 조금 더 설명 할 수 있니? 내게 그것은 잘 작동하는 것 같습니다. 내 말은, 그래야 할만큼 괜찮은 것 ... –