[wp-trac] [WordPress Trac] #40067: Add widgets settings to theme_mods option in database

WordPress Trac noreply at wordpress.org
Wed Mar 8 17:26:02 UTC 2017


#40067: Add widgets settings to theme_mods option in database
-------------------------+------------------------------
 Reporter:  alexvorn2    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Widgets      |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by alexvorn2):

 Replying to [comment:2 westonruter]:
 > is this not intended behavior? If it is not clear then the messaging
 should make it clear that the widgets in the Inactive Widgets area are
 both widgets that have been manually deactivated and also automatically
 deactivated due to theme switches, and that if they get removed then they
 will be deleted from the site.

 Maybe yes, but I think old approach is not good. If a sidebar was removed
 in the same theme, then all orphaned widgets will show in the Inactive
 Widgets sidebar, so why we need to show even more widgets from all other
 themes, so if you have one hundred themes and you switched all of them,
 then you will have maybe hundreds of widgets there, so it is not good.

 We need a new model to make it all look nice in the end, right?

 So storing widgets data in theme_mod_[theme_name] option is the best idea
 I can think of, so at the end after switching all your themes,
 manipulating a lot of sidebars and widgets options, in the end you will
 get what you will have to expect, the right number widgets you had in the
 sidebars, and not empty sidebars.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40067#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list