How to combine Save Settings and WP_List_Table bulk actions?
-
For a plugin I’m working on, I would like to combine several functionalities on a single page, separated by tabs to keep the UI clean and useable.
Some of the tabs are used to maintain the values of options for the plugin. I use the settings functions to generate the options and fields. There is a button “Save Settings” which can be used to store the changed values in the database.
This works fine as long as I only use option settings.Now for new functionality, I would like to use a WP_List_Table to maintain the list of new options I want to support.
I have used this approach already several times on a separate page for other plugins.The issue arises when I try to put the WP_List_Table in a tab on the same page as used to manage the option settings.
My analysis so far is that both are using the same hidden field to define the “action” _REQUEST parameter:
- For the option settings in file “wp-admin\includes\plugin.php” on line 1877:
echo ‘<input type=”hidden” name=”action” value=”update” />’; - For the wp_List_Table bulk_actions in file “wp-admin\includes\class-wp-list-table.php” on line 437:
echo “<select name=’action$two’ id=’bulk-action-selector-” . esc_attr( $which ) . “‘>\n”;
I would appreciate any suggestions on how to solve this issue.
Thanks! - For the option settings in file “wp-admin\includes\plugin.php” on line 1877:
- The topic ‘How to combine Save Settings and WP_List_Table bulk actions?’ is closed to new replies.