What is the alternative to WP_List_Table CLASS in WordPress?

WordPress plugin developers use the class WP_List_Tableto create HTML tables in the admin panel.

But the official WordPress documentation contains the following note in here .

This class access is marked as private. This means that these are not intended for use by plugin developers and themes, since they are subject to action without warning in any future version of WordPress. If you still like to use the class, you must make a copy for use and distribute using your own project, or use it at your own risk.

Then, what is the alternative to creating HTML tables in the WordPress admin panel?

+4
source share
2 answers

There is no alternative to this.

But you can make a copy and rename the class WP_List_Table. That way, it won’t be affected if WordPress changes the class or the class becomes obsolete.

+1
source

You can create your own administration pages based on html pages such as "pages" or "post", create a view for adding, another for editing and for a list, obviously you need to create your own page using add_menu in functions.php and create your own file. When you have this file, you can do whatever you want. You can also work with your own tables in the wordpress database.

, , , - WP_List_Table Class.

-1

Source: https://habr.com/ru/post/1685948/


All Articles