Reputation: 593
I need my plugin to save and edit multiple indexed sets of key/value pairs on my custom settings page and retrieve later them by their index on the Appearance>>Widgets page.
Is it best to create a custom table in the database for this or does the Settings API have two dimensional accommodation for this?
Upvotes: 1
Views: 34
Reputation: 593
I found that the short answer was to go ahead and expand the existing wordpress database. That is because the Settings API really only goes one dimensional and would be a very inefficient use of the database. https://pippinsplugins.com/custom-database-api-reasons-for-custom-tables-and-an-api/
EDIT: Pippin no longer offers this without a paid membership, but an older version is still available via the internet archive: http://web.archive.org/web/20160611220718/https://pippinsplugins.com/custom-database-api-reasons-for-custom-tables-and-an-api/ If Pippin helps you, I encourage you to try his membership. It has tons of useful wordpress goodies.
Upvotes: 1