- Issue created by @erwangel
Tags are sourced in content types. In some cases we may have various content types that use the same taxonomy/vocabulary but we don't want all of these types to contribute to tags level force. also, we may want to limit such contribution to only recent content. In this case we need to limit the tags query on content types and on content age.
$content_types = array('content_type_1', 'content_type_2', 'content_type_3');
$content_age = time() - (240 * 24 * 60 * 60); // a week, 7 days
public function getTags(array $vids, $content_types, $content_age, $steps = 6, $size = 60, $display = NULL);
//public function getTags(array $vids, $steps = 6, $size = 60, $display = NULL){
public function getTags(array $vids, $content_types, $content_age, $steps = 6, $size = 60, $display = NULL) {
implode($content_types),
$content_age, // Difficulty: set cache on daily or weekly basis instead of seconds
in $cache_name
$query->condition('n.type', $content_types, 'IN');
$query->condition('n.created', $content_age, '>');
to $query
->getTags($vocs, $content_types, $content_age, $config->get('levels'), $config->get('page_amount'));
->getTags($vocs, $content_types, $content_age, $config->get('levels'), $config->get('page_amount'));
Active
2.0
Code