wpaft_admin has a deprecated constructor
-
Hi all,
It’s problbem on php 7.1
Deprecated</b>: Methods with the same name as their class will not be constructors in a future version of PHP; wpaft_admin has a deprecated constructor in <b>/wp-content/plugins/wp-custom-taxonomy-meta/includes/options.php</b> on line <b>3
My solution to the problem :
.... protected static $_instance = null; public static function instance() { if ( is_null( self::$_instance ) ) : self::$_instance = new self(); endif; return self::$_instance; } function __construct() { // Load language file $locale = get_locale(); if ( !empty($locale) ) load_textdomain('wp-texonomy-meta', WPTM_ABSPATH.'lang/wp-texonomy-meta-'.$locale.'.mo'); add_action('admin_head', array(&$this, 'wpaft_options_style')); add_action('admin_head', array(&$this, 'wpaft_options_script')); add_action('admin_menu', array(&$this, 'wpaft_add_options_panel')); } .... wpaft_admin::instance();
- The topic ‘wpaft_admin has a deprecated constructor’ is closed to new replies.