/** * Checks if viewing the theme archive. * * @since 1.0.0 * @access public * @return bool */ function thds_is_theme_archive() { return apply_filters('thds_is_theme_archive', is_post_type_archive(thds_get_theme_post_type()) && !thds_is_author()); }
/** * Conditional tag to check if viewing any Theme Designer plugin page. * * @since 1.0.0 * @access public * @param mixed $term * @return bool */ function thds_is_theme_designer() { $is_thds = thds_is_theme_archive() || thds_is_single_theme() || thds_is_author() || thds_is_subject() || thds_is_feature(); return apply_filters('thds_is_theme_designer', $is_thds); }
/** * Filters the archive description. * * @since 1.0.0 * @access public * @param string $desc * @return string */ function thds_get_the_archive_description($desc) { if (thds_is_author()) { $desc = get_the_author_meta('description', get_query_var('author')); } else { if (thds_is_theme_archive() && !$desc) { $desc = thds_get_archive_description(); } } return $desc; }