Support » Plugin: PubExchange » Deprecated PHP Function

  • The function create_function() is deprecated in PHP 7.2. Please change line 34 of pubexchange_widget.php

    From

    if($this->settings->pubexchange_publication_id){
    		//register PubExchange widget
    		add_action('widgets_init', create_function('', 'return register_widget("WP_Widget_PubExchange");'));
    }

    To

    if($this->settings->pubexchange_publication_id){
    		//register PubExchange widget
    		add_action('widgets_init', function() {register_widget("WP_Widget_PubExchange");});
    }
  • The topic ‘Deprecated PHP Function’ is closed to new replies.