From c8e0692f94cb3c778047653866bbfdc452cbd81d Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 27 Feb 2023 16:30:46 -0300 Subject: [PATCH] Adds option to trim term description. #758. --- src/classes/theme-helper/template-tags.php | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/classes/theme-helper/template-tags.php b/src/classes/theme-helper/template-tags.php index da098c04c..c2a3bbb01 100644 --- a/src/classes/theme-helper/template-tags.php +++ b/src/classes/theme-helper/template-tags.php @@ -1221,7 +1221,7 @@ function tainacan_the_metadata_sections($args = array()) { * @type bool $hide_term_items_link Do not display the Term items list link. Default false * @type bool $hide_term_children_count Do not display the Term children count. Default true * @type bool $hide_term_items_count Do not display the Term items count. Default true - + * @type integer $trim_description_words Amount of words to trim the term description by. Default -1, which means no trimming * @type string $before_terms_list_container String to be added before the taxonomy terms list container * Default '
' * @type string $after_terms_list_container String to be added after the taxonomy terms list container @@ -1277,6 +1277,7 @@ function tainacan_get_single_taxonomy_content($post, $args = []) { 'hide_term_items_link' => false, 'hide_term_children_count' => true, 'hide_term_items_count' => true, + 'trim_description_words' => -1, 'before_terms_list_container' => '
', 'after_terms_list_container' => '
', 'before_terms_list' => '