duancui19840401 2016-03-16 14:28
浏览 94

调用未定义的函数convert_to_screen()(Wordpress)

i am developing a plugin where i did have to extend the class WP_List_Table. I have extended the class within my plugin-file (I don't know if this is the right way to do this?) and included WP_List_Table like this:

if(!class_exists('WP_List_Table')){
   require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}

Then comes the code for extending the class and then i do create an instance of my table class like this:

$wp_analyzes_table = new RAnalyzes_List_Table();
$wp_analyzes_table->prepare_items(); 

But when i do this, i do get this error:

Fatal error: Call to undefined function convert_to_screen() in C:\xampp\htdocs orskeanalyser\wp-admin\includes\class-wp-list-table.php on line 143

I did some research but did not understand how to fix it.

Does anybody knows how to fix this?

Thanks for your help!

Best regards.

  • 写回答

1条回答 默认 最新

  • douzhan3900 2019-07-22 09:19
    关注

    Add

    require_once(ABSPATH . 'wp-admin/includes/screen.php');
    

    to your theme/function.php. This will solve it.

    评论

报告相同问题?

悬赏问题

  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序