__( 'Main Sidebar', 'catchevolution' ),
'id' => 'sidebar-1',
'before_widget' => '",
'before_title' => '
',
) );
//Third Column Sidebar
register_sidebar( array(
'name' => __( 'Third Column Sidebar', 'catchevolution' ),
'id' => 'catchevolution_third',
'before_widget' => '",
'before_title' => '',
) );
// Header Right Sidebar
register_sidebar( array(
'name' => __( 'Header Right Sidebar', 'catchevolution' ),
'id' => 'catchevolution_header_right_sidebar',
'before_widget' => '",
'before_title' => '',
) );
// WooCommerce Sidebar
if ( class_exists( 'Woocommerce' ) ) {
register_sidebar( array(
'name' => __( 'WooCommerce Sidebar', 'catchevolution' ),
'id' => 'catchevolution_woocommerce_sidebar',
'before_widget' => '",
'before_title' => '',
) );
}
//Footer One Sidebar
register_sidebar( array(
'name' => __( 'Footer Area One', 'catchevolution' ),
'id' => 'sidebar-2',
'description' => __( 'An optional widget area for your site footer', 'catchevolution' ),
'before_widget' => '",
'before_title' => '',
) );
//Footer Two Sidebar
register_sidebar( array(
'name' => __( 'Footer Area Two', 'catchevolution' ),
'id' => 'sidebar-3',
'description' => __( 'An optional widget area for your site footer', 'catchevolution' ),
'before_widget' => '",
'before_title' => '',
) );
//Footer Three Sidebar
register_sidebar( array(
'name' => __( 'Footer Area Three', 'catchevolution' ),
'id' => 'sidebar-4',
'description' => __( 'An optional widget area for your site footer', 'catchevolution' ),
'before_widget' => '",
'before_title' => '',
) );
}
add_action( 'widgets_init', 'catchevolution_widgets_init' );
/**
* Makes a custom Widget for Displaying Ads
*
* Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets
*
* @package Catch Themes
* @subpackage Catch_Evolution_Pro
* @since Catch Evolution 1.0
*/
class catchevolution_adwidget extends WP_Widget {
/**
* Constructor
*
* @return void
**/
function catchevolution_adwidget() {
$widget_ops = array( 'classname' => 'widget_catchevolution_adwidget', 'description' => __( 'Use this widget to add any type of Advertisement as a widget.', 'catchevolution' ) );
$this->WP_Widget( 'widget_catchevolution_adwidget', __( '1. Catch Evolution Adspace Widget', 'catchevolution' ), $widget_ops );
$this->alt_option_name = 'widget_catchevolution_adwidget';
}
/**
* Creates the form for the widget in the back-end which includes the Title , adcode, image, alt
* $instance Current settings
*/
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'adcode' => '', 'image' => '', 'href' => '', 'target' => '0', 'alt' => '' ) );
$title = esc_attr( $instance[ 'title' ] );
$adcode = esc_textarea( $instance[ 'adcode' ] );
$image = esc_url( $instance[ 'image' ] );
$href = esc_url( $instance[ 'href' ] );
$target = $instance['target'] ? 'checked="checked"' : '';
$alt = esc_attr( $instance[ 'alt' ] );
?>
or
id="get_field_id('target'); ?>" name="get_field_name('target'); ?>" />
id_base ) . $after_title;
}
else {
echo '';
}
if ( $adcode != '' ) {
echo $adcode;
}
else {
echo '';
}
echo $after_widget;
}
}
/**
* Makes a custom Widget for Displaying Ads
*
* Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets
*
* @package Catch Themes
* @subpackage Catch_Evolution_Pro
* @since Catch Evolution 1.0
*/
class catchevolution_social_search_widget extends WP_Widget {
/**
* Constructor
*
* @return void
**/
function catchevolution_social_search_widget() {
$widget_ops = array( 'classname' => 'widget_catchevolution_social_widget', 'description' => __( 'Use this widget to add Social Icons from Social Icons Settings as a widget. ', 'catchevolution' ) );
$this->WP_Widget( 'widget_catchevolution_social_widget', __( '2. Catch Evolution Social Widget', 'catchevolution' ), $widget_ops );
$this->alt_option_name = 'widget_catchevolution_social_widget';
}
/**
* Creates the form for the widget in the back-end which includes the Title , adcode, image, alt
* $instance Current settings
*/
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = esc_attr( $instance[ 'title' ] );
?>
id_base ) . $after_title;
}
catchevolution_social_networks();
echo $after_widget;
}
}
/**
* Makes a custom Widget for Displaying Ads
*
* Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets
*
* @package Catch Themes
* @subpackage Catch_Evolution_Pro
* @since Catch Evolution 1.0
*/
class catchevolution_social_widget extends WP_Widget {
/**
* Constructor
*
* @return void
**/
function catchevolution_social_widget() {
$widget_ops = array( 'classname' => 'widget_catchevolution_social_search_widget', 'description' => __( 'Use this widget to add Social Icons from Social Icons Settings & Search as a widget. ', 'catchevolution' ) );
$this->WP_Widget( 'widget_catchevolution_social_search_widget', __( '3. Catch Evolution Social & Seach Widget', 'catchevolution' ), $widget_ops );
$this->alt_option_name = 'widget_catchevolution_social_search_widget';
}
/**
* Creates the form for the widget in the back-end which includes the Title , adcode, image, alt
* $instance Current settings
*/
function form($instance) {
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = esc_attr( $instance[ 'title' ] );
?>
id_base ) . $after_title;
}
catchevolution_social_search();
echo $after_widget;
}
}