Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#19692 closed defect (bug) (wontfix)

create_initial_post_types() called twice.

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

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
15 years ago

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

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

  • Cc mikeschinkel@… added
  • Version3.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
15 years ago

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

#4 @ocean90
15 years ago

  • Version 3.32.8.1

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

  • Resolutionwontfix
  • Status newclosed

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
15 years ago

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