Settings don't get removed

Support MB Settings Page Settings don't get removedResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38882
    Aaron KesslerAaron Kessler
    Participant

    I did a settings page called "theme" and assigned some custom fields to it.

    My goal is to access a settings page value in JS.

    I noticed that I can't get values inside wp_add_inline_script() or wp_localize_script() since rwmb_get_value('social', ['object_type' => 'setting'], 'theme') will return null values.

    However, I was able to access the settings values with get_option('theme'), but noticed that this is still true if I deactivate the meta box plugin.

    Once I declared a settings page custom field, it won't get removed from the theme options if I remove the custom field in MB AiO.

    How can I get rid of old settings page fields, so they don't get returned in get_option() ?

    #38887
    Long NguyenLong Nguyen
    Moderator

    Hi,

    That means the value is saved to the database, table wp_options, and deactivate Meta Box, MB AIO does not help to delete the value in the database. You can access the database and delete it manually or follow this documentation to use a WP function to delete it.
    https://developer.wordpress.org/reference/functions/delete_option/

    #38888
    Aaron KesslerAaron Kessler
    Participant

    Thank You! 👍

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