Skip to content

Conversation

@westonruter
Copy link
Member

@westonruter westonruter commented Dec 23, 2025

This is a follow-up up to r61403.

I used PHPStorm's regex search and replace with the pattern ((?:return|echo|\(|,|\s=|\.=|=>)\s*)isset\(\s*(.+?)\s*\)\s*\?\s*\2(\s*): and the replacement $1$2$3??.

Paths omitted from replacement:

  • src/wp-content/themes (since older versions of PHP may need to be supported)
  • src/wp-includes/class-wp-block-parser-frame.php (synced from Gutenberg)
  • src/wp-includes/ID3 (external library)
  • src/wp-includes/blocks (synced from Gutenberg)

Trac ticket: https://core.trac.wordpress.org/ticket/58874
Trac ticket: https://core.trac.wordpress.org/ticket/63430


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

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 westonruter.

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

@westonruter westonruter changed the title Use null coalescing operator for remaining uses of isset() Use null coalescing operator (??) for remaining uses of isset() Dec 23, 2025
@github-actions
Copy link

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.

pento pushed a commit that referenced this pull request Jan 3, 2026
… place of `isset()` in ternaries.

Developed as a subset of #10654 

Follow-up to [61404], [61403].

See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61424 602fd350-edb4-49c9-b593-d223f7449a82
* trunk:
  Code Modernization: Update `tests` to use null coalescing operator in place of `isset()` in ternaries.
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 3, 2026
… place of `isset()` in ternaries.

Developed as a subset of WordPress/wordpress-develop#10654 

Follow-up to [61404], [61403].

See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 3, 2026
… place of `isset()` in ternaries.

Developed as a subset of WordPress/wordpress-develop#10654 

Follow-up to [61404], [61403].

See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@westonruter westonruter changed the title Use null coalescing operator (??) for remaining uses of isset() Use null coalescing operator (??) for remaining instances of isset() ternaries Jan 3, 2026
pento pushed a commit that referenced this pull request Jan 5, 2026
…f `isset()` in ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61429 602fd350-edb4-49c9-b593-d223f7449a82
…ss-develop into trac-63430-null-coalescing

* 'trunk' of https://github.com/WordPress/wordpress-develop:
  Code Modernization: REST API: Use null coalescing operator in place of `isset()` in ternaries.
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 5, 2026
…f `isset()` in ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 5, 2026
…f `isset()` in ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 5, 2026
…ead of `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61430 602fd350-edb4-49c9-b593-d223f7449a82
* trunk:
  Code Modernization: Block Supports: Use null coalescing operator instead of `isset()` ternaries.
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 5, 2026
…ead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 5, 2026
…ead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 5, 2026
…isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61431 602fd350-edb4-49c9-b593-d223f7449a82
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 5, 2026
…isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Jan 5, 2026
…f `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 5, 2026
… `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61434 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 5, 2026
… `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 5, 2026
… `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 5, 2026
…set()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61435 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 5, 2026
…set()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 5, 2026
…of `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61436 602fd350-edb4-49c9-b593-d223f7449a82
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 5, 2026
…set()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 5, 2026
…of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Jan 5, 2026
…of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 6, 2026
…ad of `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61442 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 6, 2026
…ad of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Jan 6, 2026
…ad of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…ss-develop into trac-63430-null-coalescing

* 'trunk' of https://github.com/WordPress/wordpress-develop:
  Code Modernization: Script Loader: Use null coalescing operator instead of `isset()` ternaries.
pento pushed a commit that referenced this pull request Jan 6, 2026
…ead of `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61443 602fd350-edb4-49c9-b593-d223f7449a82
…ss-develop into trac-63430-null-coalescing

* 'trunk' of https://github.com/WordPress/wordpress-develop:
  Code Modernization: Bootstrap/Load: Use null coalescing operator instead of `isset()` ternaries.
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 6, 2026
…ead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 6, 2026
…ead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 6, 2026
…Use null coalescing operator instead of `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61444 602fd350-edb4-49c9-b593-d223f7449a82
…ss-develop into trac-63430-null-coalescing

* 'trunk' of https://github.com/WordPress/wordpress-develop:
  Code Modernization: Site Health, Permalinks, I18N, Users, Multisite: Use null coalescing operator instead of `isset()` ternaries.
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 6, 2026
…Use null coalescing operator instead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Jan 6, 2026
…Use null coalescing operator instead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request Jan 6, 2026
…ery, General: Use null coalescing operator instead of `isset()` ternaries.

Developed as a subset of #10654
Initially developed in #4886

Follow-up to [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.


git-svn-id: https://develop.svn.wordpress.org/trunk@61445 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jan 6, 2026
…ery, General: Use null coalescing operator instead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@60757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Jan 6, 2026
…ery, General: Use null coalescing operator instead of `isset()` ternaries.

Developed as a subset of WordPress/wordpress-develop#10654
Initially developed in WordPress/wordpress-develop#4886

Follow-up to [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

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


git-svn-id: https://core.svn.wordpress.org/trunk@60757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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