Skip to content

Add unit tests for _wp_privacy_settings_filter_draft_page_titles() in…#11763

Open
pbearne wants to merge 3 commits intoWordPress:trunkfrom
pbearne:65203-misc-_wp_privacy_settings_filter_draft_page_titles
Open

Add unit tests for _wp_privacy_settings_filter_draft_page_titles() in…#11763
pbearne wants to merge 3 commits intoWordPress:trunkfrom
pbearne:65203-misc-_wp_privacy_settings_filter_draft_page_titles

Conversation

@pbearne
Copy link
Copy Markdown

@pbearne pbearne commented May 7, 2026

… wp-admin/includes/misc.php
Description:
This PR adds unit tests for the _wp_privacy_settings_filter_draft_page_titles() function in wp-admin/includes/misc.php. This function is responsible for appending "(Draft)" to the titles of draft pages when they are displayed in the privacy settings dropdown, ensuring that unpublished content is clearly identified.

The tests cover:

  • Successful appending of "(Draft)" to a draft page title on the privacy screen.
  • Verification that published page titles remain unchanged.
  • Verification that draft page titles remain unchanged when not on the privacy screen.
  • Verification that other non-draft statuses (like "pending") do not trigger the title modification.

Trac ticket: https://core.trac.wordpress.org/ticket/65202

AI Disclosure:

  • AI assistance: Yes
  • Tool(s): Junie (JetBrains)
  • Model(s): gemini-3-flash-preview
  • Used for: Code analysis, test implementation, and workflow management.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pbearne@git.wordpress.org.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props pbearne.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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.

1 participant