[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: widget-social.php
<?php class CS_Social_Widget extends WP_Widget { function __construct() { parent::__construct( 'cs_social_widget', // Base ID esc_html__('* Social', 'alico'), // Name array('description' => esc_html__('Social Widget', 'alico'),) // Args ); } function widget($args, $instance) { global $woocommerce; extract($args); if (!empty($instance['title'])) { $title = apply_filters('widget_title', empty($instance['title']) ? esc_html__('Social', 'alico' ) : $instance['title'], $instance, $this->id_base); } $icon_facebook = 'zmdi zmdi-facebook'; $link_facebook = isset($instance['link_facebook']) ? $instance['link_facebook'] : ''; $icon_rss = 'zmdi zmdi-rss'; $link_rss = isset($instance['link_rss']) ? $instance['link_rss'] : ''; $icon_youtube = 'zmdi zmdi-youtube'; $link_youtube = isset($instance['link_youtube']) ? $instance['link_youtube'] : ''; $icon_twitter = 'zmdi zmdi-twitter'; $link_twitter = isset($instance['link_twitter']) ? $instance['link_twitter'] : ''; $icon_google = 'zmdi zmdi-google-plus'; $link_google = isset($instance['link_google']) ? $instance['link_google'] : ''; $icon_skype = 'zmdi zmdi-skype'; $link_skype = isset($instance['link_skype']) ? $instance['link_skype'] : ''; $icon_dribbble = 'zmdi zmdi-dribbble'; $link_dribbble = isset($instance['link_dribbble']) ? $instance['link_dribbble'] : ''; $icon_flickr = 'zmdi zmdi-flickr'; $link_flickr = isset($instance['link_flickr']) ? $instance['link_flickr'] : ''; $icon_linkedin = 'zmdi zmdi-linkedin'; $link_linkedin = isset($instance['link_linkedin']) ? $instance['link_linkedin'] : ''; $icon_vimeo = 'zmdi zmdi-vimeo'; $link_vimeo = isset($instance['link_vimeo']) ? $instance['link_vimeo'] : ''; $icon_pinterest = 'zmdi zmdi-pinterest'; $link_pinterest = isset($instance['link_pinterest']) ? $instance['link_pinterest'] : ''; $icon_bloglovin = 'zmdi zmdi-blogger'; $link_bloglovin = isset($instance['link_bloglovin']) ? $instance['link_bloglovin'] : ''; $icon_instagram = 'zmdi zmdi-instagram'; $link_instagram = isset($instance['link_instagram']) ? $instance['link_instagram'] : ''; // no 'class' attribute - add one with the value of width if( strpos($before_widget, 'class') === false ) { $before_widget = str_replace('>', $before_widget); } echo ''.$before_widget; if (!empty($title)) echo ''.$before_title . $title . $after_title; echo "<ul class='ct-social'>"; if ($link_facebook != '') { echo '<li><a class="social-facebook" target="_blank" href="'.esc_url($link_facebook).'"><i class="'.$icon_facebook.'"></i></a></li>'; } if ($link_rss != '') { echo '<li><a class="social-rss" target="_blank" href="'.esc_url($link_rss).'"><i class="'.$icon_rss.'"></i></a></li>'; } if ($link_youtube != '') { echo '<li><a class="social-youtube" target="_blank" href="'.esc_url($link_youtube).'"><i class="'.$icon_youtube.'"></i></a></li>'; } if ($link_twitter != '') { echo '<li><a class="social-twitter" target="_blank" href="'.esc_url($link_twitter).'"><i class="'.$icon_twitter.'"></i></a></li>'; } if ($link_google != '') { echo '<li><a class="social-google" target="_blank" href="'.esc_url($link_google).'"><i class="'.$icon_google.'"></i></a></li>'; } if ($link_skype != '') { echo '<li><a class="social-skype" target="_blank" href="'.esc_url($link_skype).'"><i class="'.$icon_skype.'"></i></a></li>'; } if ($link_dribbble != '') { echo '<li><a class="social-dribbble" target="_blank" href="'.esc_url($link_dribbble).'"><i class="'.$icon_dribbble.'"></i></a></li>'; } if ($link_flickr != '') { echo '<li><a class="social-flickr" target="_blank" href="'.esc_url($link_flickr).'"><i class="'.$icon_flickr.'"></i></a></li>'; } if ($link_linkedin != '') { echo '<li><a class="social-linkedin" target="_blank" href="'.esc_url($link_linkedin).'"><i class="'.$icon_linkedin.'"></i></a></li>'; } if ($link_vimeo != '') { echo '<li><a class="social-vimeo" target="_blank" href="'.esc_url($link_vimeo).'"><i class="'.$icon_vimeo.'"></i></a></li>'; } if ($link_pinterest != '') { echo '<li><a class="social-pinterest" target="_blank" href="'.esc_url($link_pinterest).'"><i class="'.$icon_pinterest.'"></i></a></li>'; } if ($link_bloglovin != '') { echo '<li><a class="social-bloglovin" target="_blank" href="'.esc_url($link_bloglovin).'"><i class="'.$icon_bloglovin.'"></i></a></li>'; } if ($link_instagram != '') { echo '<li><a class="social-instagram" target="_blank" href="'.esc_url($link_instagram).'"><i class="'.$icon_instagram.'"></i></a></li>'; } echo "</ul>"; echo ''.$after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['link_facebook'] = strip_tags($new_instance['link_facebook']); $instance['link_rss'] = strip_tags($new_instance['link_rss']); $instance['link_youtube'] = strip_tags($new_instance['link_youtube']); $instance['link_twitter'] = strip_tags($new_instance['link_twitter']); $instance['link_google'] = strip_tags($new_instance['link_google']); $instance['link_skype'] = strip_tags($new_instance['link_skype']); $instance['link_dribbble'] = strip_tags($new_instance['link_dribbble']); $instance['link_flickr'] = strip_tags($new_instance['link_flickr']); $instance['link_linkedin'] = strip_tags($new_instance['link_linkedin']); $instance['link_vimeo'] = strip_tags($new_instance['link_vimeo']); $instance['link_pinterest'] = strip_tags($new_instance['link_pinterest']); $instance['link_bloglovin'] = strip_tags($new_instance['link_bloglovin']); $instance['link_instagram'] = strip_tags($new_instance['link_instagram']); return $instance; } function form( $instance ) { $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; $link_facebook = isset($instance['link_facebook']) ? esc_attr($instance['link_facebook']) : ''; $link_rss = isset($instance['link_rss']) ? esc_attr($instance['link_rss']) : ''; $link_youtube = isset($instance['link_youtube']) ? esc_attr($instance['link_youtube']) : ''; $link_twitter = isset($instance['link_twitter']) ? esc_attr($instance['link_twitter']) : ''; $link_google = isset($instance['link_google']) ? esc_attr($instance['link_google']) : ''; $link_skype = isset($instance['link_skype']) ? esc_attr($instance['link_skype']) : ''; $link_dribbble = isset($instance['link_dribbble']) ? esc_attr($instance['link_dribbble']) : ''; $link_flickr = isset($instance['link_flickr']) ? esc_attr($instance['link_flickr']) : ''; $link_linkedin = isset($instance['link_linkedin']) ? esc_attr($instance['link_linkedin']) : ''; $link_vimeo = isset($instance['link_vimeo']) ? esc_attr($instance['link_vimeo']) : ''; $link_pinterest = isset($instance['link_pinterest']) ? esc_attr($instance['link_pinterest']) : ''; $link_bloglovin = isset($instance['link_bloglovin']) ? esc_attr($instance['link_bloglovin']) : ''; $link_instagram = isset($instance['link_instagram']) ? esc_attr($instance['link_instagram']) : ''; ?> <p><label for="<?php echo esc_url($this->get_field_id('title')); ?>"><?php esc_html_e( 'Title:', 'alico' ); ?></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('link_facebook')); ?>"><?php esc_html_e( 'Link Facebook:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_facebook') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_facebook') ); ?>" type="text" value="<?php echo esc_attr( $link_facebook ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_rss')); ?>"><?php esc_html_e( 'Link Rss:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_rss') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_rss') ); ?>" type="text" value="<?php echo esc_attr( $link_rss ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_youtube')); ?>"><?php esc_html_e( 'Link Youtube:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_youtube') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_youtube') ); ?>" type="text" value="<?php echo esc_attr( $link_youtube ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_twitter')); ?>"><?php esc_html_e( 'Link Twitter:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_twitter') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_twitter') ); ?>" type="text" value="<?php echo esc_attr( $link_twitter ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_google')); ?>"><?php esc_html_e( 'Link Google:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_google') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_google') ); ?>" type="text" value="<?php echo esc_attr( $link_google ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_skype')); ?>"><?php esc_html_e( 'Link Skype:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_skype') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_skype') ); ?>" type="text" value="<?php echo esc_attr( $link_skype ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_dribbble')); ?>"><?php esc_html_e( 'Link Dribbble:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_dribbble') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_dribbble') ); ?>" type="text" value="<?php echo esc_attr( $link_dribbble ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_flickr')); ?>"><?php esc_html_e( 'Link Flickr:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_flickr') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_flickr') ); ?>" type="text" value="<?php echo esc_attr( $link_flickr ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_linkedin')); ?>"><?php esc_html_e( 'Link Linkedin:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_linkedin') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_linkedin') ); ?>" type="text" value="<?php echo esc_attr( $link_linkedin ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_vimeo')); ?>"><?php esc_html_e( 'Link Vimeo:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_vimeo') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_vimeo') ); ?>" type="text" value="<?php echo esc_attr( $link_vimeo ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_pinterest')); ?>"><?php esc_html_e( 'Link Pinterest:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_pinterest') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_pinterest') ); ?>" type="text" value="<?php echo esc_attr( $link_pinterest ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_bloglovin')); ?>"><?php esc_html_e( 'Link Bloglovin:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_bloglovin') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_bloglovin') ); ?>" type="text" value="<?php echo esc_attr( $link_bloglovin ); ?>" /></p> <p><label for="<?php echo esc_attr($this->get_field_id('link_instagram')); ?>"><?php esc_html_e( 'Link Instagram:', 'alico' ); ?></label> <input class="widefat" id="<?php echo esc_attr( $this->get_field_id('link_instagram') ); ?>" name="<?php echo esc_attr( $this->get_field_name('link_instagram') ); ?>" type="text" value="<?php echo esc_attr( $link_instagram ); ?>" /></p> <?php } } /** * Class CS_Social_Widget */ function register_social_widget() { if(function_exists('ct_register_wp_widget')) { ct_register_wp_widget('CS_Social_Widget'); } } add_action('widgets_init', 'register_social_widget'); ?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002