| Server IP : 119.59.104.26 / Your IP : 216.73.217.51 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
/**
* Customize about me
* @since 1.0
* created by ninhle - wiloke team
*/
class piAbout extends WP_Widget
{
public $aDef = array('title'=>'About me', 'image'=>'', 'description'=>'', 'name'=>'Richars Winters', 'signature'=>'');
public function __construct()
{
parent::__construct('pi_about', PI_THEMENAME . 'About', array('class'=>'pi_about'));
}
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']);
piWidgets::pi_upload_field('Image', $this->get_field_id('image'), $this->get_field_id('upload_button'), $this->get_field_name('image'), false, $aInstance['image']);
piWidgets::pi_text_field('Name', $this->get_field_id('name'), $this->get_field_name('name'), $aInstance['name']);
foreach ( piConfigs::$aConfigs['configs']['rest']['follow'] as $key => $aInfo )
{
piWidgets::pi_link_field($aInfo[1], $this->get_field_id($key), $this->get_field_name($key), $aInstance[$key]);
}
piWidgets::pi_textarea_field('Description', $this->get_field_id('description'), $this->get_field_name('description'), $aInstance['description'], 'Allows the html tags: <strong>, <i>, <a>');
piWidgets::pi_upload_field('Signature', $this->get_field_id('signature'), $this->get_field_id('upload_signature'), $this->get_field_name('signature'), false, $aInstance['signature']);
}
public function update($aNewinstance, $aOldinstance)
{
$aInstance = $aOldinstance;
foreach ( $aNewinstance as $key => $val )
{
if ( $key == 'description' )
{
$aInstance[$key] = strip_tags($val, '<a><strong><i>');
}else{
$aInstance[$key] = strip_tags($val);
}
}
return $aInstance;
}
public function widget($atts, $aInstance)
{
$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'];
}
?>
<div class="widget-about-content">
<div class="widget-about-content">
<div class="head">
<?php if ( !empty($aInstance['image']) ) : ?>
<div class="images">
<img src="<?php echo esc_url($aInstance['image']); ?>" alt="<?php echo esc_attr($aInstance['name']); ?>">
</div>
<?php endif; ?>
<div class="pos-a">
<?php
if ( !empty($aInstance['name']) )
{
echo '<h4 class="text-uppercase fs-14">'.$aInstance['name'].'</h4>';
}
echo '<div class="pi-social">';
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>';
?>
</div>
</div>
<?php if ( !empty($aInstance['description']) ) : ?>
<p><?php print wp_kses( wp_unslash($aInstance['description']), array( 'a'=>array('href'=>array(), 'title'=>array()), 'strong'=>array(''), 'i'=>array() ) ); ?></p>
<?php endif; ?>
<?php
if ( !empty($aInstance['signature']) )
{
echo '<div class="wp-caption alignright">';
echo '<img src="'.esc_url($aInstance['signature']).'" width="120" alt="Signature">';
echo '</div>';
}
?>
</div>
</div>
<?php
print $atts['after_widget'];
}
}
?>