<?php

if( !function_exists('calla_elated_get_blog_holder_params') ) {
    /**
     * Function that generates params for holders on blog templates
     */
    function calla_elated_get_blog_holder_params($params) {
        $params_list = array();

        $params_list['holder'] = 'eltdf-container';
        $params_list['inner'] = 'eltdf-container-inner clearfix';

        return $params_list;
    }

    add_filter( 'calla_elated_blog_holder_params', 'calla_elated_get_blog_holder_params' );
}

if( !function_exists('calla_elated_get_blog_single_holder_classes') ) {
    /**
     * Function that generates blog holder classes for single blog page
     */
    function calla_elated_get_blog_single_holder_classes($classes) {
        $sidebar_classes   = array();
        $sidebar_classes[] = 'eltdf-grid-large-gutter';
	
	    $classes = $classes . ' ' . implode(' ', $sidebar_classes);
	    
        return $classes;
    }

    function calla_elated_get_blog_single_holder_padding(){
        $params = array();
        $blog_single_padding = calla_elated_options()->getOptionValue('blog_single_grid_padding');
        if(!empty($blog_single_padding)){
            $params[] = "padding: ".$blog_single_padding;
        }
        return $params;
    }

    add_filter( 'calla_elated_blog_single_holder_classes', 'calla_elated_get_blog_single_holder_classes' );
}

if( !function_exists('calla_elated_blog_part_params') ) {
    function calla_elated_blog_part_params($params) {

        $part_params = array();
        $part_params['title_tag'] = 'h2';
        $part_params['link_tag'] = 'h5';
        $part_params['quote_tag'] = 'h5';

        return array_merge($params, $part_params);
    }

    add_filter( 'calla_elated_blog_part_params', 'calla_elated_blog_part_params' );
}