Submit
Path:
~
/
home
/
getwphos
/
public_html
/
nyspoolsli
/
wp-content
/
plugins
/
poolix-plugin
/
inc
/
helpers
/
File Content:
widgets.php
<?php ///----footer One widgets--- //About Company class Poolix_About_Company extends WP_Widget { /** constructor */ function __construct() { parent::__construct( /* Base ID */'Poolixx_About_Company', /* Name */esc_html__('Poolix About Company','poolix'), array( 'description' => esc_html__('Show the About Company', 'poolix' )) ); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); echo wp_kses_post($before_widget);?> <div class="contact-widget-1"> <?php echo wp_kses_post($before_title.$title.$after_title); ?> <?php if($instance['content']){ ?><p class="mb_30"><?php echo wp_kses_post($instance['content']); ?></p><?php } ?> <?php if( $instance['show'] ): ?> <ul class="footer-social-icon d-flex align-items-center"> <?php echo wp_kses_post(poolix_get_social_icon()); ?> </ul> <?php endif; ?> </div> <?php echo wp_kses_post($after_widget); } /** @see WP_Widget::update */ function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['content'] = $new_instance['content']; $instance['show'] = $new_instance['show']; return $instance; } /** @see WP_Widget::form */ function form($instance) { $title = ($instance) ? esc_attr($instance['title']) : esc_html__('About Us', 'poolix'); $content = ($instance) ? esc_attr($instance['content']) : ''; $show = ($instance) ? esc_attr($instance['show']) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title: ', 'poolix'); ?></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('content')); ?>"><?php esc_html_e('Content:', 'poolix'); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id('content')); ?>" name="<?php echo esc_attr($this->get_field_name('content')); ?>" ><?php echo wp_kses_post($content); ?></textarea> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('show')); ?>"><?php esc_html_e('Show Social Icons:', 'poolix'); ?></label> <?php $selected = ( $show ) ? ' checked="checked"' : ''; ?> <input class="widefat" id="<?php echo esc_attr($this->get_field_id('show')); ?>"<?php echo esc_attr($selected); ?> name="<?php echo esc_attr($this->get_field_name('show')); ?>" type="checkbox" value="true" /> </p> <?php } } //Contact Info class Poolix_Contact_Info extends WP_Widget { /** constructor */ function __construct() { parent::__construct( /* Base ID */'Poolix_contact_info', /* Name */esc_html__('Poolix Contact Info','poolix'), array( 'description' => esc_html__('Show the Contact Info', 'poolix' )) ); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); echo wp_kses_post($before_widget);?> <div class="contact-widget-1"> <?php echo wp_kses_post($before_title.$title.$after_title); ?> <?php if($instance['content2']){ ?><p><?php echo wp_kses_post($instance['content2']); ?></p><?php } ?> <ul class="contact-widget-1-list"> <?php if($instance['address_title'] || $instance['address']){ ?> <li><?php if($instance['address_title']){ ?><span><?php echo wp_kses_post($instance['address_title']); ?></span><?php } ?> <?php echo wp_kses_post($instance['address']); ?></li> <?php } ?> <?php if($instance['email_title'] || $instance['email_address']){ ?> <li><?php if($instance['email_title']){ ?><span><?php echo wp_kses_post($instance['email_title']); ?></span><?php } ?><?php if($instance['email_address']){ ?><a href="mailto:<?php echo esc_attr($instance['email_address']); ?>"><?php echo wp_kses_post($instance['email_address']); ?></a><?php } ?></li> <?php } ?> <?php if($instance['phone_no'] || $instance['phone_title']){ ?> <li><?php if($instance['phone_title']){ ?><span><?php echo wp_kses_post($instance['phone_title']); ?></span><?php } ?><a href="tel:<?php echo esc_attr($instance['phone_no']); ?>"><?php echo wp_kses_post($instance['phone_no']); ?></a></li> <?php } ?> </ul> </div> <?php echo wp_kses_post($after_widget); } /** @see WP_Widget::update */ function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['content2'] = $new_instance['content2']; $instance['address_title'] = $new_instance['address_title']; $instance['address'] = $new_instance['address']; $instance['email_title'] = $new_instance['email_title']; $instance['email_address'] = $new_instance['email_address']; $instance['phone_title'] = $new_instance['phone_title']; $instance['phone_no'] = $new_instance['phone_no']; return $instance; } /** @see WP_Widget::form */ function form($instance) { $title = ($instance) ? esc_attr($instance['title']) : esc_html__('Get In Touch', 'poolix'); $content2 = ($instance) ? esc_attr($instance['content2']) : ''; $address_title = ($instance) ? esc_attr($instance['address_title']) : ''; $address = ($instance) ? esc_attr($instance['address']) : ''; $email_title = ($instance) ? esc_attr($instance['email_title']) : ''; $email_address = ($instance) ? esc_attr($instance['email_address']) : ''; $phone_title = ($instance) ? esc_attr($instance['phone_title']) : ''; $phone_no = ($instance) ? esc_attr($instance['phone_no']) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title: ', 'poolix'); ?></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('content2')); ?>"><?php esc_html_e('Content:', 'poolix'); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id('content2')); ?>" name="<?php echo esc_attr($this->get_field_name('content2')); ?>" ><?php echo wp_kses_post($content2); ?></textarea> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('address_title')); ?>"><?php esc_html_e('Address Title:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Address Title', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('address_title')); ?>" name="<?php echo esc_attr($this->get_field_name('address_title')); ?>" type="text" value="<?php echo esc_attr($address_title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('address')); ?>"><?php esc_html_e('Address:', 'poolix'); ?></label> <textarea class="widefat" id="<?php echo esc_attr($this->get_field_id('address')); ?>" name="<?php echo esc_attr($this->get_field_name('address')); ?>" ><?php echo wp_kses_post($address); ?></textarea> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('email_title')); ?>"><?php esc_html_e('Email Title:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Email Title', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('email_title')); ?>" name="<?php echo esc_attr($this->get_field_name('email_title')); ?>" type="text" value="<?php echo esc_attr($email_title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('email_address')); ?>"><?php esc_html_e('Email Address:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Email Address', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('email_address')); ?>" name="<?php echo esc_attr($this->get_field_name('email_address')); ?>" type="text" value="<?php echo esc_attr($email_address); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('phone_title')); ?>"><?php esc_html_e('Phone Title:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Phone Title', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('phone_title')); ?>" name="<?php echo esc_attr($this->get_field_name('phone_title')); ?>" type="text" value="<?php echo esc_attr($phone_title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('phone_no')); ?>"><?php esc_html_e('Phone Number:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Phone Number', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('phone_no')); ?>" name="<?php echo esc_attr($this->get_field_name('phone_no')); ?>" type="text" value="<?php echo esc_attr($phone_no); ?>" /> </p> <?php } } //Contact Us class Poolix_Contact_Us extends WP_Widget { /** constructor */ function __construct() { parent::__construct( /* Base ID */'Poolix_Contact_Us', /* Name */esc_html__('Poolix Contact Us','poolix'), array( 'description' => esc_html__('Show the Contact Us', 'poolix' )) ); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); echo wp_kses_post($before_widget);?> <div class="link-widget-1"> <?php echo wp_kses_post($before_title.$title.$after_title); ?> <?php if($instance['content3']){ ?><p class="mb_25"><?php echo wp_kses_post($instance['content3']); ?></p><?php } ?> <?php if($instance['working_time']){ ?><p><?php echo wp_kses_post($instance['working_time']); ?></p><?php } ?> </div> <?php echo wp_kses_post($after_widget); } /** @see WP_Widget::update */ function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['content3'] = $new_instance['content3']; $instance['working_time'] = $new_instance['working_time']; return $instance; } /** @see WP_Widget::form */ function form($instance) { $title = ($instance) ? esc_attr($instance['title']) : esc_html__('Working Hours', 'poolix'); $content3 = ($instance) ? esc_attr($instance['content3']) : ''; $working_time = ($instance) ? esc_attr($instance['working_time']) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title: ', 'poolix'); ?></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('content3')); ?>"><?php esc_html_e('Content:', 'poolix'); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id('content3')); ?>" name="<?php echo esc_attr($this->get_field_name('content3')); ?>" type="text" value="<?php echo esc_attr($content3); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('working_time')); ?>"><?php esc_html_e('Working Time:', 'poolix'); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id('working_time')); ?>" name="<?php echo esc_attr($this->get_field_name('working_time')); ?>" type="text" value="<?php echo esc_attr($working_time); ?>" /> </p> <?php } } //------ Service Sidebar Widgets-------- //Need Any Help class Poolix_Need_Any_Help extends WP_Widget { /** constructor */ function __construct() { parent::__construct( /* Base ID */'Poolix_Need_Any_Help', /* Name */esc_html__('Poolix Need Any Help','poolix'), array( 'description' => esc_html__('Show the Need Any Help', 'poolix' )) ); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); echo wp_kses_post($before_widget);?> <div class="contact-widget"> <?php if($instance['sidebar_title']){ ?><h2><?php echo wp_kses_post($instance['sidebar_title']); ?></h2><?php } ?> <ul class="info-list clearfix"> <?php if($instance['sidebar_phone_no'] || $instance['sidebar_phone_title']){ ?> <li> <?php if($instance['sidebar_phone_title']){ ?><span><?php echo wp_kses_post($instance['sidebar_phone_title']); ?></span><?php } ?> <?php if($instance['sidebar_phone_no']){ ?><h3><i class="icon-2"></i><a href="tel:<?php echo esc_attr($instance['sidebar_phone_no']); ?>"><?php echo wp_kses_post($instance['sidebar_phone_no']); ?></a></h3><?php } ?> </li> <?php } ?> <?php if($instance['sidebar_email_title'] || $instance['sidebar_email_address']){ ?> <li> <?php if($instance['sidebar_email_title']){ ?><span><?php echo wp_kses_post($instance['sidebar_email_title']); ?></span><?php } ?> <?php if($instance['sidebar_email_address']){ ?><h3><i class="icon-59"></i><a href="mailto:<?php echo esc_attr($instance['sidebar_email_address']); ?>"><?php echo wp_kses_post($instance['sidebar_email_address']); ?></a></h3><?php } ?> </li> <?php } ?> </ul> </div> <?php echo wp_kses_post($after_widget); } /** @see WP_Widget::update */ function update($new_instance, $old_instance) { $instance = $old_instance; $instance['sidebar_title'] = $new_instance['sidebar_title']; $instance['sidebar_phone_title'] = $new_instance['sidebar_phone_title']; $instance['sidebar_phone_no'] = $new_instance['sidebar_phone_no']; $instance['sidebar_email_title'] = $new_instance['sidebar_email_title']; $instance['sidebar_email_address'] = $new_instance['sidebar_email_address']; return $instance; } /** @see WP_Widget::form */ function form($instance) { $sidebar_title = ($instance) ? esc_attr($instance['sidebar_title']) : ''; $sidebar_phone_title = ($instance) ? esc_attr($instance['sidebar_phone_title']) : ''; $sidebar_phone_no = ($instance) ? esc_attr($instance['sidebar_phone_no']) : ''; $sidebar_email_title = ($instance) ? esc_attr($instance['sidebar_email_title']) : ''; $sidebar_email_address = ($instance) ? esc_attr($instance['sidebar_email_address']) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('sidebar_title')); ?>"><?php esc_html_e('Title:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Title', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('sidebar_title')); ?>" name="<?php echo esc_attr($this->get_field_name('sidebar_title')); ?>" type="text" value="<?php echo esc_attr($sidebar_title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('sidebar_phone_title')); ?>"><?php esc_html_e('Phone Title:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Phone Title', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('sidebar_phone_title')); ?>" name="<?php echo esc_attr($this->get_field_name('sidebar_phone_title')); ?>" type="text" value="<?php echo esc_attr($sidebar_phone_title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('sidebar_phone_no')); ?>"><?php esc_html_e('Phone Number:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Phone Number', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('sidebar_phone_no')); ?>" name="<?php echo esc_attr($this->get_field_name('sidebar_phone_no')); ?>" type="text" value="<?php echo esc_attr($sidebar_phone_no); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('sidebar_email_title')); ?>"><?php esc_html_e('Email Title:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Email Title', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('sidebar_email_title')); ?>" name="<?php echo esc_attr($this->get_field_name('sidebar_email_title')); ?>" type="text" value="<?php echo esc_attr($sidebar_email_title); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('sidebar_email_address')); ?>"><?php esc_html_e('Email Address:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('Email Address', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('sidebar_email_address')); ?>" name="<?php echo esc_attr($this->get_field_name('sidebar_email_address')); ?>" type="text" value="<?php echo esc_attr($sidebar_email_address); ?>" /> </p> <?php } } //Ask Question Form class Poolix_Ask_Question extends WP_Widget { /** constructor */ function __construct() { parent::__construct( /* Base ID */'Poolix_Ask_Question', /* Name */esc_html__('Poolix Ask Question','poolix'), array( 'description' => esc_html__('Show the Ask Question', 'poolix' )) ); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', $instance['title']); echo wp_kses_post($before_widget);?> <div class="question-widget"> <?php echo wp_kses_post($before_title.$title.$after_title); ?> <?php if($instance['sidebar_form_url']){ ?> <div class="form-inner"> <?php echo do_shortcode($instance['sidebar_form_url']); ?> </div> <?php } ?> </div> <?php echo wp_kses_post($after_widget); } /** @see WP_Widget::update */ function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['sidebar_form_url'] = $new_instance['sidebar_form_url']; return $instance; } /** @see WP_Widget::form */ function form($instance) { $title = ($instance) ? esc_attr($instance['title']) : esc_html__('Ask Question', 'poolix'); $sidebar_form_url = ($instance) ? esc_attr($instance['sidebar_form_url']) : '#'; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title: ', 'poolix'); ?></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('sidebar_form_url')); ?>"><?php esc_html_e('Form Url:', 'poolix'); ?></label> <input placeholder="<?php esc_attr_e('#', 'poolix');?>" class="widefat" id="<?php echo esc_attr($this->get_field_id('sidebar_form_url')); ?>" name="<?php echo esc_attr($this->get_field_name('sidebar_form_url')); ?>" type="text" value="<?php echo esc_attr($sidebar_form_url); ?>" /> </p> <?php } } ///----Blog widgets-------- //Recent News class Poolix_Recent_News extends WP_Widget { /** constructor */ public function __construct() { parent::__construct( /* Base ID */'Poolix_Recent_News', /* Name */esc_html__('Poolix Blog Recent News', 'poolix'), array( 'description' => esc_html__('Show the Blog Recent News', 'poolix'))); } /** @see WP_Widget::widget */ public function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo wp_kses_post($before_widget); ?> <div class="post-widget"> <?php echo wp_kses_post($before_title.$title.$after_title); ?> <div class="widget-content p_relative"> <div class="swiper-container banner-slider-blog"> <div class="swiper-wrapper"> <?php $query_string = array('showposts'=>$instance['number']); if ($instance['cat']) { $query_string['tax_query'] = array(array('taxonomy' => 'category','field' => 'id','terms' => (array)$instance['cat'])); } $this->posts($query_string); ?> </div> </div> <div class="banner-slider-nav"> <div class="banner-slider-control banner-slider-button-prev"><span><i class="icon-4"></i></span></div> <div class="banner-slider-control banner-slider-button-next"><span><i class="icon-3"></i></span> </div> </div> </div> </div> <?php echo wp_kses_post($after_widget); } /** @see WP_Widget::update */ public function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['number'] = $new_instance['number']; $instance['cat'] = $new_instance['cat']; return $instance; } /** @see WP_Widget::form */ public function form($instance) { $title = ($instance) ? esc_attr($instance['title']) : esc_html__('Recent Articles', 'poolix'); $number = ($instance) ? esc_attr($instance['number']) : 4; $cat = ($instance) ? esc_attr($instance['cat']) : ''; ?> <p> <label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php esc_html_e('Title: ', 'poolix'); ?></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('number')); ?>"><?php esc_html_e('No. of Posts:', 'poolix'); ?></label> <input class="widefat" id="<?php echo esc_attr($this->get_field_id('number')); ?>" name="<?php echo esc_attr($this->get_field_name('number')); ?>" type="text" value="<?php echo esc_attr($number); ?>" /> </p> <p> <label for="<?php echo esc_attr($this->get_field_id('categories')); ?>"><?php esc_html_e('Category', 'poolix'); ?></label> <?php wp_dropdown_categories(array('show_option_all'=>esc_html__('All Categories', 'poolix'), 'taxonomy' => 'category', 'selected'=>$cat, 'class'=>'widefat', 'name'=>$this->get_field_name('cat'))); ?> </p> <?php } public function posts($query_string) { $query = new WP_Query($query_string); if ($query->have_posts()):?> <div class="swiper-slide"> <div class="post-inner"> <?php $counts = 0; global $post; while ($query->have_posts()): $query->the_post(); ?> <?php if(($counts%2) == 0 && $counts != 0):?> </div> </div> <div class="swiper-slide"> <div class="post-inner"> <?php endif; ?> <div class="post"> <figure class="post-thumb"><a href="<?php echo esc_url(get_the_permalink(get_the_id()));?>"><?php the_post_thumbnail('poolix_290x210'); ?></a></figure> <div class="lower-content"> <h5><a href="<?php echo esc_url(get_the_permalink(get_the_id()));?>"><?php echo wp_trim_words( get_the_title(), 5, '...' );?></a></h5> <div class="blog-1-postmeta"><?php echo get_the_date( ); ?> / 04 Comnts</div> <div class="blog-1-link-btn"><a href="<?php echo esc_url(get_the_permalink(get_the_id()));?>" class="btn-1 alt"><?php esc_html_e('Read More', 'poolix');?> <span></span></a></div> </div> </div> <?php $counts++; endwhile; ?> </div> </div> <?php endif; wp_reset_postdata(); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
_notes
---
0755
functions.php
18189 bytes
0644
widgets.php
25084 bytes
0644
N4ST4R_ID | Naxtarrr