Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#19692 closed defect (bug) (wontfix)

create_initial_post_types() called twice.

Reported by: mikeschinkel Owned by:
Priority: normal Milestone:
Component: Post Types Version: 2.8.1
Severity: normal Keywords:
Cc: mikeschinkel@…

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)

comment:1 follow-up: ↓ 2   nacin17 months ago

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

comment:2 in reply to: ↑ 1   mikeschinkel17 months 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.

comment:3 follow-up: ↓ 5   scribu17 months ago

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

  • Version changed from 3.3 to 2.8.1

comment:5 in reply to: ↑ 3   mikeschinkel17 months 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.

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