WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 12 months ago

#24889 new defect (bug)

Widget ID number in the database starts from 2

Reported by: alexvorn2 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: trivial Version:
Component: Widgets Keywords:
Focuses: Cc:

Description

Steps to replicate:

  1. Fresh install of WordPress
  2. print_r( get_option('sidebars_widgets') );

you will get this:

Array
(
    [wp_inactive_widgets] => Array
        (
        )

    [sidebar-1] => Array
        (
            [0] => search-2
            [1] => recent-posts-2
            [2] => recent-comments-2
            [3] => archives-2
            [4] => categories-2
            [5] => meta-2
        )

    [sidebar-2] => Array
        (
        )

    [array_version] => 3
)

I think instead 2 we should see 1 because no more widgets were created.

maybe be use 0 instead of 1, but not definitely 2.

Change History (2)

comment:1 follow-up: markoheijnen12 months ago

  • Severity changed from normal to trivial

I can't remember I ever had this issue. That said it isn't something important as long as the ids are unique.

comment:2 in reply to: ↑ 1 alexvorn212 months ago

Replying to markoheijnen:

I can't remember I ever had this issue. That said it isn't something important as long as the ids are unique.

Agree, but why their id starts from 2?

Last edited 12 months ago by alexvorn2 (previous) (diff)
Note: See TracTickets for help on using tickets.