[wp-trac] [WordPress Trac] #42612: Single post navigation bugs when adding posts in Starter Content
WordPress Trac
noreply at wordpress.org
Mon Jan 8 00:16:56 UTC 2018
#42612: Single post navigation bugs when adding posts in Starter Content
--------------------------+--------------------
Reporter: bduclos | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9.2
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+--------------------
Changes (by dlh):
* keywords: needs-patch => has-patch
Comment:
From what I've been able tell, the auto-drafts created for starter content
can have post dates assigned to them without issue. But it does look as if
this fix needs to happen in three places:
1. When creating the `auto-draft` in
`WP_Customize_Manager::import_theme_starter_content()`.
2. When bumping the post date in
`_wp_keep_alive_customize_changeset_dependent_auto_drafts()`.
3. When publishing the starter content in
`WP_Customize_Nav_Menus::save_nav_menus_created_posts()`.
The attached patch attempts to address those three changes.
There's an additional complication the patch doesn't cover: When the same
starter content post is reused among themes, it's no longer safe to assume
that the order of post IDs in `nav_menus_created_posts` matches the order
of posts as defined by the theme. The patch would need additional logic to
sync the number of seconds removed from the post date to the array of
starter content in the current theme.
Lastly, the patch doesn't attempt to cover sorting for attachments,
although it seems to happen anyway via changes (2) and (3).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42612#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list