I want to add screen options to my plugin settings page, like the ones that are available in the Dashboard.
I tried using the add_option
method of the WP_Screen
object and found that it supports only two options. per_page
and layout_columns
.
Does anyone know what screen option to use to get options like the one in Dashboard page?
Edit:
Let me explain what I am trying to a little bit.
I have different sections in my Bulk Delete Plugin and each section let’s people delete posts based on some criteria (like category, tags, custom taxonomy etc). I want to let users choose which sections they want to use and which sections that they want to hide, similar to the Dashboard page, where users can choose which dashboard widgets they want to see and which ones to hide.
Now, to implement this, I want to show a list of checkboxes (one for each section) and let user choose which one to show.
To show the list of checkboxes, I had to call the add_option
method of the WP_Screen
object. When I was doing that, I figured out that currently add_option
function only supports these two types and the others are just ignored.
- per_page
- layout_columns
But, only in the dashboard page checkboxes are shown. I want to know how to replicate a similar thing in the screen options section of my custom admin page as well.