/** * Checks if viewing the project archive. * * @since 1.0.0 * @access public * @return bool */ function ccp_is_project_archive() { return apply_filters('ccp_is_project_archive', is_post_type_archive(ccp_get_project_post_type()) && !ccp_is_author()); }
/** * Filters the archive description. * * @since 1.0.0 * @access public * @param string $desc * @return string */ function ccp_get_the_archive_description($desc) { if (ccp_is_author()) { $desc = get_the_author_meta('description', get_query_var('author')); } else { if (ccp_is_project_archive() && !$desc) { $desc = ccp_get_portfolio_description(); } } return $desc; }
/** * Conditional tag to check if viewing any portfolio page. * * @since 1.0.0 * @access public * @param mixed $term * @return bool */ function ccp_is_portfolio() { $is_portfolio = ccp_is_project_archive() || ccp_is_single_project() || ccp_is_author() || ccp_is_category() || ccp_is_tag(); return apply_filters('ccp_is_portfolio', $is_portfolio); }