Getting the entire options array, deleting the entire options array

Support MB Settings Page Getting the entire options array, deleting the entire options arrayResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18103
    maybeadevmaybeadev
    Participant

    Hi:

    If we wanted the entire options array for a particular settings page, do we just use the WordPress get_option function with the option page id to do that? What if we wanted to delete the entire options array (eg: when we uninstall a plugin and want to clean up our data)? Or are there MB functions that handle these actions as well?

    Thanks.

    #18104
    Anh TranAnh Tran
    Keymaster

    Hi,

    All the option is stored in a single option in the WP database. So you can just use get_option and delete_option functions to get and remove them. Just note that you need to pass the option_name, not settings page ID.

    #18110
    maybeadevmaybeadev
    Participant

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.