Same problem for me, with the added burden that this deprecation warning is breaking the AJAX functionality of my plugin if WP_DEBUG is set to TRUE
This is the fix
class ujic_Widget extends WP_Widget {
protected $plugin_slug = 'uji-countdown';
/**
* Uji Countdown Init
*
* @since 2.0
*
* @var string
*/
// public function ujic_Widget() { // <--- Replace this...
public function __construct() { // <--- with this, and...
$widget_ops = array(
'classname' => 'uji_Widget',
'description' => 'Uji Countdown widget.'
);
// $this->WP_Widget( 'uji_Widget', 'Uji Countdown', $widget_ops ); // <--- this...
parent::__construct( 'uji_Widget', 'Uji Countdown', $widget_ops ); // <--- with this.
//actions
add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
add_action( 'admin_enqueue_scripts', array( &$this, 'admin_widgets_scripts_styles' ) );
}
Thanks caraffande,
Only when use PHP7+
It will be fixed in the next update.