[wp-trac] [WordPress Trac] #24889: Widget ID number in the database starts from 2

WordPress Trac noreply at wordpress.org
Sat Mar 7 16:28:16 UTC 2015


#24889: Widget ID number in the database starts from 2
--------------------------+------------------------------
 Reporter:  alexvorn2     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Widgets       |     Version:
 Severity:  trivial       |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by azaozz):

 * keywords:   => close


Comment:

 When support for multi-use widgets was introduced, a lot of widgets got
 converted from "single" to "multi" at the same time.

 To keep backward compatibility and not break the existing widgets, there
 was some conversion code that would set the "single" widgets instances to
 `*-1` (not sure why not `*-0`, it was a long time ago). In order to not
 overwrite the converted data, the new multi-widgets instances had to start
 form `2`.

 As @tyxla mentions, this doesn't break anything and if changed to `-0`, in
 theory can still overwrite someone's single widgets.

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


More information about the wp-trac mailing list