Path : /home/vishqocm/vishalwebtech.in/blog/wp-content/themes/katerio/functions/
File Upload :
Current File : /home/vishqocm/vishalwebtech.in///blog/wp-content/themes/katerio/functions/widgets.php

<?php
/**
 * Sidebar
 *
 * @package Katerio
 */

/*
--------------------------------------------------------------------------------
* Register Default Widgets
* ------------------------------------------------------------------------------
*/
if ( ! function_exists( 'th90_default_widget_areas' ) ) {
    /**
     * Register default widget area.
     */
    function th90_default_widget_areas() {
        /* Default */
        register_sidebar( array(
            'name'          => 'Default',
            'id'            => 'sidebar-1',
            'description'   => esc_html__( 'This is default widgets area.', 'katerio' ),
            'before_widget' => '<div id="%1$s" class="widget %2$s clearfix">',
            'after_widget'  => '</div>',
            'before_title'  => '',
            'after_title'   => '',
        ) );
    }
}
add_action( 'widgets_init', 'th90_default_widget_areas' );

/*
--------------------------------------------------------------------------------
* Modify widget title
* ------------------------------------------------------------------------------
*/
if ( ! function_exists( 'th90_widget_title' ) ) {

    function th90_widget_title( $title, $instance, $id_base ) {
        $heading = th90_heading_block( array(
            '_heading'	=> $title,
            '_heading_align' => '',
            '_heading_style' => '',
            '_heading_tag'  => 'h4',
            '_heading_size'  => 'h4',
        ) );

        if ( 'rss' != $id_base ) {
            return $heading;
        } else {
            echo wp_kses_post( $heading );
        }

    }
}

add_filter ( 'widget_title' , 'th90_widget_title', 10, 3);