| Server IP : 119.59.104.26 / Your IP : 216.73.217.169 Web Server : Apache/2 System : Linux ns69.hostinglotus.net 4.18.0-553.141.2.el8_10.x86_64 #1 SMP Wed Jul 8 10:28:18 EDT 2026 x86_64 User : com12370 ( 1517) PHP Version : 7.2.34 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/com12370/public_html/wp-content/themes/titan/admin/widgets/plugins/ |
Upload File : |
<?php
/**
* Follow Us
* Created by ninhle - wiloke team
*/
class piFollow extends WP_Widget
{
public $aDef = array('title'=>'', 'description'=>'');
public function __construct()
{
parent::__construct('pi_follow', PI_THEMENAME . 'Follow', array('classname'=>'pi_follow'));
}
public function form($aInstance)
{
$this->aDef = array_merge($this->aDef, piConfigs::$aConfigs['pi_options']['follow']);
$aInstance = wp_parse_args($aInstance, $this->aDef);
piWidgets::pi_text_field( 'Title', $this->get_field_id('title'), $this->get_field_name('title'), $aInstance['title']);
foreach ( piConfigs::$aConfigs['configs']['rest']['follow'] as $key => $aInfo )
{
piWidgets::pi_text_field( $aInfo[1], $this->get_field_id($key), $this->get_field_name($key), $aInstance[$key], '', true);
}
}
public function update($aNewinstance, $aOldinstance)
{
$aInstance = $aOldinstance;
foreach ( $aNewinstance as $key => $val )
{
if ( $key == 'title' || $key == 'description' )
{
$aInstance[$key] = strip_tags($val);
}else{
$aInstance[$key] = esc_url($val);
}
}
return $aInstance;
}
public function widget($atts, $aInstance)
{
$this->aDef = array_merge($this->aDef, piConfigs::$aConfigs['pi_options']['follow']);
$aInstance = wp_parse_args($aInstance, $this->aDef);
print $atts['before_widget'];
if ( !empty($aInstance['title']) )
{
print $atts['before_title'] . esc_html($aInstance['title']) . $atts['after_title'];
}
echo '<div class="pi-social-square">';
foreach ( piConfigs::$aConfigs['configs']['rest']['follow'] as $key => $aInfo )
{
if ( !empty($aInstance[$key]) )
{
echo '<a target="_blank" href="'.esc_url($aInstance[$key]).'"><i class="'.esc_attr($aInfo[0]).'"></i></a>';
}
}
echo '</div>';
print $atts['after_widget'];
}
}
?>