WordPress插件开发人员在管理面板中使用WP_List_Table类来构建HTML表.
但是,WordPress官方文档在here中有以下注释.
This class’s access is marked as private. That means it is not
intended for use by plugin and theme developers as it is subject to
change without warning in any future WordPress release. If you would
still like to make use of the class, you should make a copy to use and
distribute with your own project, or else use it at your own risk.
那么,在WordPress管理面板中构建HTML表的替代方法是什么?
解决方法:
除此之外别无选择.
但您可以做的是复制并重命名WP_List_Table类.因此,如果WordPress更改了类或类被弃用,它将不会受到影响.
标签:wordpress,php
来源: https://codeday.me/bug/20190710/1426979.html