Skip to content

Conversation

@Soean
Copy link
Member

@Soean Soean commented Jan 9, 2026

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


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

github-actions bot commented Jan 9, 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.

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

Props soean, westonruter.

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

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

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

You had to find more! 😅

Might as well remove some of these extraneous line breaks while we're at it.

@westonruter
Copy link
Member

@Soean I found some additional opportunities in de042b5. Take a look.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request modernizes WordPress code by replacing verbose if isset() return patterns with the more concise null coalescing operator (??), improving code readability and maintainability across the codebase.

Changes:

  • Refactored 21 instances across 17 files to use the null coalescing operator
  • Simplified conditional return statements while maintaining identical behavior
  • Reduced line count and improved code consistency

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/wp-includes/theme.php Simplified theme feature retrieval with null coalescing
src/wp-includes/post.php Streamlined post type support lookup
src/wp-includes/option.php Simplified option autoload result retrieval
src/wp-includes/nav-menu.php Condensed registered navigation menus getter
src/wp-includes/http.php Simplified HTTP response header retrieval
src/wp-includes/global-styles-and-settings.php Streamlined global styles result access
src/wp-includes/class-wp-user-query.php Simplified query variable getter
src/wp-includes/class-wp-user-meta-session-tokens.php Condensed session token retrieval
src/wp-includes/class-wp-query.php Simplified query variable and queried object ID getters
src/wp-includes/class-wp-plugin-dependencies.php Streamlined dependency data retrieval methods
src/wp-includes/class-wp-dependencies.php Simplified dependency query method
src/wp-includes/class-wp-comment.php Condensed child comment retrieval
src/wp-includes/class-wp-block-styles-registry.php Simplified block styles retrieval
src/wp-admin/includes/plugin.php Streamlined parent page file lookups with null coalescing
src/wp-admin/includes/file.php Simplified action parameter initialization for upload handlers
src/wp-admin/includes/class-wp-screen.php Condensed screen option retrieval
src/wp-admin/includes/class-wp-list-table.php Simplified pagination argument getter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! The changes looks good to me.

pento pushed a commit that referenced this pull request Jan 11, 2026
…ator.

Developed in #10703

Follow-up to [61464], [61463], [61457], [61456], [61455], [61454], [61453], [61445], [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props soean, westonruter, mukesh27.
See #58874.
Fixes #64488.


git-svn-id: https://develop.svn.wordpress.org/trunk@61470 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions
Copy link

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 61470
GitHub commit: 79c20d8

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions bot closed this Jan 11, 2026
markjaquith pushed a commit to WordPress/WordPress that referenced this pull request Jan 11, 2026
…ator.

Developed in WordPress/wordpress-develop#10703

Follow-up to [61464], [61463], [61457], [61456], [61455], [61454], [61453], [61445], [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props soean, westonruter, mukesh27.
See #58874.
Fixes #64488.

Built from https://develop.svn.wordpress.org/trunk@61470


git-svn-id: http://core.svn.wordpress.org/trunk@60782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 11, 2026
…ator.

Developed in WordPress/wordpress-develop#10703

Follow-up to [61464], [61463], [61457], [61456], [61455], [61454], [61453], [61445], [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props soean, westonruter, mukesh27.
See #58874.
Fixes #64488.

Built from https://develop.svn.wordpress.org/trunk@61470


git-svn-id: https://core.svn.wordpress.org/trunk@60782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@Soean Soean deleted the 64488 branch January 11, 2026 08:44
aaronjorbin pushed a commit to aaronjorbin/wordpress-develop that referenced this pull request Jan 12, 2026
…ator.

Developed in WordPress#10703

Follow-up to [61464], [61463], [61457], [61456], [61455], [61454], [61453], [61445], [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props soean, westonruter, mukesh27.
See #58874.
Fixes #64488.


git-svn-id: https://develop.svn.wordpress.org/trunk@61470 602fd350-edb4-49c9-b593-d223f7449a82
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.

3 participants