[wp-trac] [WordPress Trac] #46984: Theme Modification API - set_theme_mod for multiple items at once

WordPress Trac noreply at wordpress.org
Thu Apr 18 19:25:54 UTC 2019


#46984: Theme Modification API - set_theme_mod for multiple items at once
----------------------------+-----------------------------
 Reporter:  andreadragotta  |      Owner:  (none)
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Themes          |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 Hi,
 Using the Theme Modification API, when there is the need to update
 multiple theme modifications at the same time, the only way right now is
 to use the "set_theme_mod" function for each modification. In some
 situation this could cause a big impact on the DB. In our case, the whole
 server crashed because of this (the theme we used had many mods and it
 tried to update all of them).

 It would be useful to have a function like "set_theme_mods" (plural) to
 set multiple mods while hitting the database only once. I already had to
 implement this in our website at theme-level, but I thought that it would
 be nice to have it in the API...

 Does this looks good, or is there a better way?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46984>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list