WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#19692 closed defect (bug) (wontfix)

create_initial_post_types() called twice.

Reported by: mikeschinkel Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.1
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

create_initial_post_types() is called TWICE, first in /wp-settings.php (line 189 of wp33) and then on a zero (0) priority 'init' hook.

It should only be called once, and ideally on a replaceable init hook.

Related: #12539

Change History (6)

#1 follow-up: @nacin
8 years ago

This is done on purpose, for compatibility reasons. #12918 for post types, #9644 for taxonomies.

#2 in reply to: ↑ 1 @mikeschinkel
8 years ago

  • Cc mikeschinkel@… added
  • Version set to 3.3

Replying to nacin:

This is done on purpose, for compatibility reasons. #12918 for post types, #9644 for taxonomies.

Okay then, but shouldn't the 2nd time the code is run we check a flag and not run again? Or maybe just get rid of the hook, clearly it couldn't be used for its intended effect.

#3 follow-up: @scribu
8 years ago

It seems the second time is necesary for i18n: http://core.trac.wordpress.org/ticket/9644#comment:16

#4 @ocean90
8 years ago

  • Version changed from 3.3 to 2.8.1

#5 in reply to: ↑ 3 @mikeschinkel
8 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Replying to scribu:

It seems the second time is necesary for i18n: http://core.trac.wordpress.org/ticket/9644#comment:16

Ah well, so I guess it's a false alarm. Bummer that it has to run twice.

#6 @ocean90
8 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.