WordPress.org

Make WordPress Core

Opened 9 months ago

Last modified 9 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: markoheijnen9 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 alexvorn29 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 their id starts from 2?

Version 0, edited 9 months ago by alexvorn2 (next)
Note: See TracTickets for help on using tickets.