Skip to content

Feature/enable chapter nav for drafts#28

Merged
william-man merged 2 commits into
mainfrom
feature/enable-chapter-nav-for-drafts
Apr 29, 2026
Merged

Feature/enable chapter nav for drafts#28
william-man merged 2 commits into
mainfrom
feature/enable-chapter-nav-for-drafts

Conversation

@william-man
Copy link
Copy Markdown
Contributor

Description of changes

This PR changes ChapterNavigation->getItems to also get draft posts for users that have the edit_posts capability so that drafts that are in preview can show their full chapter/page navigation of all posts related to each other.

To test:

  1. Fetch this branch feature/enable-chapter-nav-for-drafts.
  2. In admin create some users that can edit posts and optionally a subscriber.
  3. Create some draft posts and set a parent for them. Use the Preview link in the editor to view the draft and check that it displays all chapters in the page nav as a user who can edit posts.
  4. Publish a post, the post should still display all posts.
  5. Switch to a user that can't edit posts or log out of current user and check the published post again. It should only show chapters of published posts.

Checklist

  • Changelog updated
  • If new release: major version tag to be bumped after release (see docs)

Copy link
Copy Markdown
Contributor

@sbrody sbrody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well locally

@william-man william-man merged commit 8902e1b into main Apr 29, 2026
2 checks passed
@william-man william-man deleted the feature/enable-chapter-nav-for-drafts branch April 29, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants