ID, 'ip_theme_true_fullwidth', true);
if ($post_fullwidth == 'fullwidth') {
$class[] = 'content-true-fullwidth';
}
}
return implode(' ', apply_filters('ip_theme_content_container_class', $class));
}
}
if (!function_exists('ip_theme_get_footer_container_class')) {
/**
* Get the classes for footer container
*
* @return string
*/
function ip_theme_get_footer_container_class()
{
$class = array(
'footer-container'
);
/**
* Let plugins and child themes override layout
* fullwidth/ boxed
*/
$site_layout = apply_filters('ip_theme_site_layout', get_option(IP_THEME . 'site_layout', ip_theme_get_default_options()['site_layout']));
$class[] = 'container-' . $site_layout;
return implode(' ', apply_filters('ip_theme_footer_container_class', $class));
}
}
if (!function_exists('ip_theme_get_content_template_type')) {
/**
* Get the type how to display individual posts on blog and archive pages
*
* Excerpt/ Full content/ Grid / List
* @return string
*/
function ip_theme_get_content_template_type()
{
$archive_content_display = get_option(IP_THEME . 'archive_content_display', ip_theme_get_default_options()['archive_content_display']);
/**
* If archive is set to display full content
*/
if ($archive_content_display != 'excerpt') {
return apply_filters('ip_theme_archive_type', $archive_content_display);
}
/**
* If archive is set to display as excerpt determine whether to display as list or grid
*
*/
return apply_filters('ip_theme_archive_type', get_option(IP_THEME . 'archive_type', ip_theme_get_default_options()['archive_type']));
}
}
if (!function_exists('ip_theme_get_grid_col_number')) {
/**
* Get number of columns in each row of grid view
*
* @return integer
*/
function ip_theme_get_grid_col_number()
{
return apply_filters('ip_theme_grid_col_number', get_option(IP_THEME . 'grid_col_number', ip_theme_get_default_options()['grid_col_number']));
}
}
if (!function_exists('ip_theme_get_archive_wrapper_class')) {
/**
* Get classes for archive items wrapper
*
* @return string
*/
function ip_theme_get_archive_wrapper_class()
{
$classes = array(
'archive-items-wrapper'
);
$classes[] = 'ip-archive-wrapper-' . ip_theme_get_content_template_type();
return apply_filters('ip_theme_archive_wrapper_class', implode(' ', $classes));
}
}
if (!function_exists('ip_theme_get_archive_content_class')) {
/**
* Get the classes for individual post on archive and blog pages for grid view
*
* @return string
*/
function ip_theme_get_archive_content_class()
{
$classes = array(
'ip-col',
'ip-archive-item'
);
//Content display type excerpt/full
$classes[] = 'ip-archive-item-' . ip_theme_get_content_template_type();
//Number of columns in each row
$classes[] = 'ip-col-' . ip_theme_get_grid_col_number();
global $post;
//If post has thumbnail
if (!has_post_thumbnail($post)) {
$classes[] = 'post-has-no-thumbnail';
} else {
$classes[] = 'post-has-thumbnail';
}
//Whether to show categories
if (ip_theme_should_show_archive_categories()) {
$classes[] = 'categories-showing';
} else {
$classes[] = 'categories-hidden';
}
//If it is a sticky post
if ( is_sticky() ){
$classes[] = 'ip-archive-sticky';
}
return apply_filters('ip_theme_archive_content_class', implode(' ', $classes));
}
}
if (!function_exists('ip_theme_get_archive_list_content_class')) {
/**
* Get the classes for individual post on archive and blog pages for list view
*
* @return string
*/
function ip_theme_get_archive_list_content_class()
{
$classes = array(
'ip-row',
'ip-archive-item'
);
//Content display type excerpt/full
$classes[] = 'ip-archive-item-' . ip_theme_get_content_template_type();
global $post;
//If post has thumbnail
if (!has_post_thumbnail($post)) {
$classes[] = 'post-has-no-thumbnail';
} else {
$classes[] = 'post-has-thumbnail';
}
//Whether to show categories
if (ip_theme_should_show_archive_categories()) {
$classes[] = 'categories-showing';
} else {
$classes[] = 'categories-hidden';
}
//If it is a sticky post
if ( is_sticky() ){
$classes[] = 'ip-archive-sticky';
}
return apply_filters('ip_theme_archive_list_content_class', implode(' ', $classes));
}
}
if (!function_exists('ip_theme_archive_thumbnail')) {
/**
* Display post thumbnail on blog and archive pages
*
* @return void
*/
function ip_theme_archive_thumbnail()
{
if (!apply_filters('ip_theme_can_show_archive_thumbnail', !post_password_required() && !is_attachment())) return;
if (has_post_thumbnail()) :
?>