D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
etb1lp46s9ed
/
www
/
vienterprises.in
/
wp-content
/
plugins
/
furious-common
/
widget
/
Filename :
footer-widget.php
back
Copy
<?php /** * Footer_Widget widget class * * @since 2.8.0 */ class footer_infomation extends WP_Widget { function __construct() { $widget_ops = array('classname' => 'footer_info', 'description' => esc_html__( "Footer info for footer", 'furious') ); parent::__construct('footer-infomation', esc_html__('Footer Info', 'furious'), $widget_ops); $this->alt_option_name = 'footer_info'; } function widget($args, $instance) { $cache = wp_cache_get('footer_infomation', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo wp_specialchars_decode(esc_attr($cache[ $args['widget_id'] ])); return; } ob_start(); extract($args); $image_upload = ! empty( $instance['image_upload'] ) ? $instance['image_upload'] : ''; $image_upload = apply_filters( 'image_upload', $image_upload, $instance, $this->id_base ); $cont = ( ! empty( $instance['cont'] ) ) ? $instance['cont'] : esc_html__( 'Content Text', 'furious' ); $cont = apply_filters( 'widget_cont', $cont, $instance, $this->id_base ); $social_ctn = ( ! empty( $instance['social_ctn'] ) ) ? $instance['social_ctn'] : esc_html__( 'Social Content', 'furious' ); $social_ctn = apply_filters( 'widget_social_ctn', $social_ctn, $instance, $this->id_base ); ?> <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12"> <div class="footer-widget" data-aos="fade-up"> <?php if ('' != $image_upload): ?> <div class="navbar-brand"> <a href="index.html"> <img class="lazyload" src="<?php echo get_template_directory_uri();?>/assets/images/placeholder.png" data-src="<?php echo esc_url( $image_upload ); ?>" alt="<?php bloginfo( 'name' ); ?>"> </a> </div> <?php endif ?> <?php if ('' != $cont): ?> <p><?php echo html_entity_decode(esc_attr($cont)) ?></p> <?php endif ?> <?php if ('' != $social_ctn): ?> <?php echo html_entity_decode(esc_attr($social_ctn)) ?> <?php endif ?> </div> </div> <?php // Reset the global $the_post as this query will have stomped on it wp_reset_postdata(); $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('footer_infomation', $cache, 'widget'); } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['image_upload'] = esc_url( $new_instance['image_upload'] ); $instance['cont'] = wp_kses_post($new_instance['cont']); $instance['social_ctn'] = wp_kses_post($new_instance['social_ctn']); $alloptions = wp_cache_get( 'alloptions', 'options' ); if ( isset($alloptions['footer_info']) ) delete_option('footer_info'); return $instance; } function form( $instance ) { $image_upload = isset( $instance['image_upload'] ) ? esc_url( $instance['image_upload'] ) : ''; $cont = isset( $instance['cont'] ) ? esc_attr( $instance['cont'] ) : ''; $social_ctn = isset( $instance['social_ctn'] ) ? esc_attr( $instance['social_ctn'] ) : ''; ?> <p> <label for="<?php echo esc_attr( $this->get_field_id( 'image_upload' ) ); ?>"><?php esc_html_e( 'Link Logo Image:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'image_upload' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'image_upload' )); ?>" rows="4"><?php echo esc_attr($image_upload); ?></textarea> </p> <p> <label for="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>"><?php esc_html_e( 'Content:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'cont' )); ?>" rows="4"><?php echo esc_attr($cont); ?></textarea> </p> <p> <label for="<?php echo esc_attr($this->get_field_id( 'social_ctn' )); ?>"><?php esc_html_e( 'Social Content:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'social_ctn' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'social_ctn' )); ?>" rows="8"><?php echo esc_attr($social_ctn); ?></textarea> </p> <?php } } class footer_subscribe extends WP_Widget { function __construct() { $widget_ops = array('classname' => 'footer_sub', 'description' => esc_html__( "Footer subscribe for footer", 'furious') ); parent::__construct('footer-subscribe', esc_html__('Footer Subscribe', 'furious'), $widget_ops); $this->alt_option_name = 'footer_sub'; } function widget($args, $instance) { $cache = wp_cache_get('footer_subscribe', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo wp_specialchars_decode(esc_attr($cache[ $args['widget_id'] ])); return; } ob_start(); extract($args); $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : esc_html__( 'Footer About', 'furious' ); $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $cont = ( ! empty( $instance['cont'] ) ) ? $instance['cont'] : esc_html__( 'Content', 'furious' ); $cont = apply_filters( 'widget_cont', $cont, $instance, $this->id_base ); $shortcode = ( ! empty( $instance['shortcode'] ) ) ? $instance['shortcode'] : esc_html__( '', 'furious' ); $shortcode = apply_filters( 'widget_shortcode', $shortcode, $instance, $this->id_base ); ?> <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12"> <div class="footer-widget" data-aos="fade-up"> <?php if ('' != $title): ?> <h4><?php echo esc_attr($title) ?></h4> <?php endif ?> <?php if ('' != $cont): ?> <p class="lh-1 mb-20"><?php echo html_entity_decode(esc_attr($cont)) ?></p> <?php endif ?> <?php if ('' != $shortcode): ?> <div class="newsletter-form"> <?php echo do_shortcode( $shortcode ); ?> </div> <?php endif ?> </div> </div> <?php // Reset the global $the_post as this query will have stomped on it wp_reset_postdata(); $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('footer_subscribe', $cache, 'widget'); } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['cont'] = wp_kses_post($new_instance['cont']); $instance['shortcode'] = wp_kses_post($new_instance['shortcode']); $alloptions = wp_cache_get( 'alloptions', 'options' ); if ( isset($alloptions['footer_sub']) ) delete_option('footer_sub'); return $instance; } function form( $instance ) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $cont = isset( $instance['cont'] ) ? esc_attr( $instance['cont'] ) : ''; $shortcode = isset( $instance['shortcode'] ) ? esc_attr( $instance['shortcode'] ) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id( 'title' )); ?>"><?php esc_html_e( 'Title:', 'furious' ); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id( 'title' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'title' )); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>"><?php esc_html_e( 'Content:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'cont' )); ?>" rows="8"><?php echo esc_attr($cont); ?></textarea> </p> <p> <label for="<?php echo esc_attr($this->get_field_id( 'shortcode' )); ?>"><?php esc_html_e( 'Shortcode:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'shortcode' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'shortcode' )); ?>" rows="8"><?php echo esc_attr($shortcode); ?></textarea> </p> <?php } } class footer_col_2_4 extends WP_Widget { function __construct() { $widget_ops = array('classname' => 'footer_col24', 'description' => esc_html__( "Footer Col xl-2 lg-4 md-4 sm-5", 'furious') ); parent::__construct('footer-col24', esc_html__('Footer Col 24', 'furious'), $widget_ops); $this->alt_option_name = 'footer_col24'; } function widget($args, $instance) { $cache = wp_cache_get('footer_col_2_4', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo wp_specialchars_decode(esc_attr($cache[ $args['widget_id'] ])); return; } ob_start(); extract($args); $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : esc_html__( 'Footer Column', 'furious' ); $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $cont = ( ! empty( $instance['cont'] ) ) ? $instance['cont'] : esc_html__( 'Content', 'furious' ); $cont = apply_filters( 'widget_cont', $cont, $instance, $this->id_base ); ?> <div class="col-xl-2 col-lg-4 col-md-4 col-sm-5"> <div class="footer-widget" data-aos="fade-up"> <?php if ('' != $title): ?> <h4><?php echo esc_attr($title) ?></h4> <?php endif ?> <?php if ('' != $cont): ?> <ul class="info-list"> <?php echo html_entity_decode(esc_attr($cont)) ?> </ul> <?php endif ?> </div> </div> <?php // Reset the global $the_post as this query will have stomped on it wp_reset_postdata(); $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('footer_col_2_4', $cache, 'widget'); } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['cont'] = wp_kses_post($new_instance['cont']); $alloptions = wp_cache_get( 'alloptions', 'options' ); if ( isset($alloptions['footer_col24']) ) delete_option('footer_col24'); return $instance; } function form( $instance ) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $cont = isset( $instance['cont'] ) ? esc_attr( $instance['cont'] ) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id( 'title' )); ?>"><?php esc_html_e( 'Title:', 'furious' ); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id( 'title' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'title' )); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>"><?php esc_html_e( 'Content:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'cont' )); ?>" rows="8"><?php echo esc_attr($cont); ?></textarea> </p> <?php } } class footer_col_2_2 extends WP_Widget { function __construct() { $widget_ops = array('classname' => 'footer_col22', 'description' => esc_html__( "Footer Col xl-2 lg-2 md-3 sm", 'furious') ); parent::__construct('footer-col22', esc_html__('Footer Col 22', 'furious'), $widget_ops); $this->alt_option_name = 'footer_col22'; } function widget($args, $instance) { $cache = wp_cache_get('footer_col_2_2', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo wp_specialchars_decode(esc_attr($cache[ $args['widget_id'] ])); return; } ob_start(); extract($args); $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : esc_html__( 'Footer Column', 'furious' ); $title = apply_filters( 'widget_title', $title, $instance, $this->id_base ); $cont = ( ! empty( $instance['cont'] ) ) ? $instance['cont'] : esc_html__( 'Content', 'furious' ); $cont = apply_filters( 'widget_cont', $cont, $instance, $this->id_base ); ?> <div class="col-xl-2 col-lg-2 col-md-3 col-sm"> <div class="footer-widget" data-aos="fade-up"> <?php if ('' != $title): ?> <h4><?php echo esc_attr($title) ?></h4> <?php endif ?> <?php if ('' != $cont): ?> <ul class="footer-links"> <?php echo html_entity_decode(esc_attr($cont)) ?> </ul> <?php endif ?> </div> </div> <?php // Reset the global $the_post as this query will have stomped on it wp_reset_postdata(); $cache[$args['widget_id']] = ob_get_flush(); wp_cache_set('footer_col_2_2', $cache, 'widget'); } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['cont'] = wp_kses_post($new_instance['cont']); $alloptions = wp_cache_get( 'alloptions', 'options' ); if ( isset($alloptions['footer_col22']) ) delete_option('footer_col22'); return $instance; } function form( $instance ) { $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; $cont = isset( $instance['cont'] ) ? esc_attr( $instance['cont'] ) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id( 'title' )); ?>"><?php esc_html_e( 'Title:', 'furious' ); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id( 'title' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'title' )); ?>" type="text" value="<?php echo esc_attr($title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>"><?php esc_html_e( 'Content:', 'furious' ); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id( 'cont' )); ?>" name="<?php echo esc_attr($this->get_field_name( 'cont' )); ?>" rows="8"><?php echo esc_attr($cont); ?></textarea> </p> <?php } } function furious_footer_widget() { register_widget( 'footer_infomation' ); register_widget( 'footer_subscribe' ); register_widget( 'footer_col_2_4' ); register_widget( 'footer_col_2_2' ); } add_action( 'widgets_init', 'furious_footer_widget' );