Share/Synch settings between widget and admin menu (1 post)

  1. Loni2Shoes
    Posted 4 years ago #


    I am developing a plugin that includes a sidebar widget as well as a shortcode to be used on a page for a more detailed summary of information. For the user's convenience, I would like them to be able to customize some fields of information specifically relevant to the widget upon dragging the widget into their sidebar -- but to also make changes and additions to that information on the page I create within the Settings menu. Both items are working independently and appear to save their options, but I can't seem to get the "guild_level" or "perks_page" options to synchronize between the two of them. In fact, when I try to force both to use the same wp_option entry, the settings from the widget appear to be appended onto the settings for the admin page -- with the same names. Here's an example of what I mean:

    'a:4:{i:2;a:5:{s:7:"version";s:5:"1.0.0";s:12:"widget_title";s:19:"Current Guild Level";s:11:"guild_level";s:1:"1";s:10:"perks_page";s:0:"";s:13:"show_inactive";s:3:"yes";}s:12:"_multiwidget";i:1;s:11:"guild_level";s:1:"1";s:10:"perks_page";s:0:"";}'

    You will see above two instances of the perks_page and guild_level option. Is there any way to get these two different sets of settings to cooperate and synchronize?

Topic Closed

This topic has been closed to new replies.

About this Topic