将这些功能的访问级别更改为 公共:
public display_tablenav()
public get_table_classes()
在qtranslate-x\admin\qtx_configuration.php 文件中。
你可以看到在这个版本中QTX_LanguageList
扩展了WP_List_Table
类,并且这个函数是公共的:
class QTX_LanguageList extends WP_List_Table
{
private $_clean_uri;
private $_language_names;
public function __construct($language_names,$clean_uri) {
parent::__construct(array('screen' => 'language'));
$this->_language_names = $language_names;
$this->_clean_uri = $clean_uri;
}
public function get_columns() {
return array(
'code' => _x('Code', 'Two-letter Language Code meant.', 'qtranslate'),
'flag' => __('Flag', 'qtranslate'),
'name' => __('Name', 'qtranslate'),
'action' => __('Action', 'qtranslate'),
'edit' => __('Edit', 'qtranslate'),
'stored' => __('Stored', 'qtranslate')
);
}
protected function column_default( $item, $column_name ) { return $item[$column_name]; }
protected function get_default_primary_column_name() { return 'name'; }
protected function display_tablenav($which){}
protected function get_table_classes() { return array( 'widefat', 'qtranxs-language-list' ); }
......
}