??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/mayshine.co.uk/wp-content/themes/wise-news/inc/custom-widgets/social-widget.php
⬅ Kembali
<?php
if ( ! class_exists( 'Wise_News_Social_Widget' ) ) {
/**
* Adds Wise News Social Widget.
*/
class Wise_News_Social_Widget extends WP_Widget {
/**
* Register widget with WordPress.
*/
public function __construct() {
$wise_news_social_widget = array(
'classname' => 'wise-news-widget social-widget style-2',
'description' => __( 'Retrive Social Widget', 'wise-news' ),
);
parent::__construct(
'wise_news_social_widget',
__( 'Artify Widget: Social Widget', 'wise-news' ),
$wise_news_social_widget
);
}
/**
* Front-end display of widget.
* @see WP_Widget::widget()
* @param array $args Widget arguments.
* @param array $instance Saved values from database.
*/
public function widget( $args, $instance ) {
if ( ! isset( $args['widget_id'] ) ) {
$args['widget_id'] = $this->id;
}
$section_title = ! empty( $instance['title'] ) ? $instance['title'] : '';
$section_title = apply_filters( 'widget_title', $section_title, $instance, $this->id_base );
echo $args['before_widget'];
if ( ! empty( $section_title ) ) {
echo $args['before_title'] . esc_html( $section_title ) . $args['after_title'];
}
?>
<div class="widget-content-area">
<div class="social-feed-widgets-wrap author-social-contacts">
<?php
for ( $i = 1; $i <= 4; $i++ ) {
$link = ( ! empty( $instance[ 'link-' . $i ] ) ) ? $instance[ 'link-' . $i ] : '';
if ( ! empty( $link ) ) :
?>
<a href="<?php echo esc_url( $link ); ?>"></a>
<?php
endif;
}
?>
</div>
</div>
<?php
echo $args['after_widget'];
}
/**
* Back-end widget form.
* @see WP_Widget::form()
* @param array $instance Previously saved values from database.
*/
public function form( $instance ) {
$section_title = isset( $instance['title'] ) ? $instance['title'] : '';
?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Section Title:', 'wise-news' ); ?></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( $section_title ); ?>" />
</p>
<?php
for ( $i = 1; $i <= 4; $i++ ) {
$link = isset( $instance[ 'link-' . $i ] ) ? $instance[ 'link-' . $i ] : '';
?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'link-' . $i ) ); ?>"><?php echo sprintf( esc_html__( 'Link %d :', 'wise-news' ), $i ); ?></label>
<input type="url" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'link-' . $i ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'link-' . $i ) ); ?>" value="<?php echo esc_url( $link ); ?>"/>
</p>
<?php } ?>
<?php
}
/**
* Sanitize widget form values as they are saved.
* @see WP_Widget::update()
* @param array $new_instance Values just sent to be saved.
* @param array $old_instance Previously saved values from database.
* @return array Updated safe values to be saved.
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = sanitize_text_field( $new_instance['title'] );
for ( $i = 1; $i <= 4; $i++ ) {
$instance[ 'link-' . $i ] = esc_url_raw( $new_instance[ 'link-' . $i ] );
}
return $instance;
}
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📄 .htaccess
htaccess
237 B
2026-06-23 08:04
🐘 grid-list-posts-widget.php
php
7.3 KB
2026-05-26 02:02
🐘 grid-posts-widget.php
php
7 KB
2026-05-26 02:02
🐘 list-posts-widget.php
php
7 KB
2026-05-26 02:02
🐘 mini-list-widget.php
php
7.7 KB
2026-05-26 02:02
🐘 social-widget.php
php
3.5 KB
2026-05-26 02:02
🐘 tile-posts-widget.php
php
7 KB
2026-05-26 02:02
🐘 widgets.php
php
1.1 KB
2026-05-26 02:02