I’m writing a plugin that creates posts in bulk. I provide a way for the user to set certain parameters of the created posts beforehand. But it would be useful to use the WordPress default “All Posts” (edit.php
) interface to fine-tune the details after the posts are created. I had a look at the class-wp-list-table.php
and duplicating its functionality is going to be a lot of work.
The best solution would be to just send the user to edit.php – limited only to the posts created by my plugin. I have the IDs of the posts, so I’m looking for a solution like edit.php?id=1&id=2
, revealing a nice list table with only the posts with those IDs.
It can be achieved using
pre_get_posts
.It is important to prefix all your variable names,
id
seems not be in the reserved terms list, but anyway this practice avoids any unforeseen bug.