Opened 16 years ago
Closed 16 years ago
#12918 closed defect (bug) (fixed)
Register default post types before plugins and themes are loaded
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 3.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
Although correct behavior is to wait until init has fired to do anything, many themes call get_pages() prior to init. If the default post types have not been registered yet, get_pages() will fail because the "page" post type is not present. We can work around this in the same manner as we did for taxonomies by calling create_initial_post_types() before loading plugins and themes.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Works for me. Closing #12873 as a duplicate.