Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
87f0388
Use null coalescing operator for remaining uses of isset()
westonruter Dec 23, 2025
9021455
Merge branch 'trunk' into trac-63430-null-coalescing
westonruter Jan 3, 2026
401b338
Replace remaining instances outside of ID3 and block-library
westonruter Jan 3, 2026
5a69db2
Revert erroneous replacements
westonruter Jan 3, 2026
59ccd14
Revert change to class-wp-block-parser-frame.php since comes from Gut…
westonruter Jan 3, 2026
362c178
Move line-initial null coalescing operator to end of previous line
westonruter Jan 3, 2026
0be1779
Merge branch 'trunk' @ r61424 into trac-63430-null-coalescing
westonruter Jan 3, 2026
d4ef0ca
Merge branch 'trunk' into trac-63430-null-coalescing
westonruter Jan 5, 2026
d37d630
Apply REST API changes from https://github.com/WordPress/wordpress-de…
westonruter Jan 5, 2026
357f21d
Merge branch 'trunk' @ r61429 of https://github.com/WordPress/wordpre…
westonruter Jan 5, 2026
b9cd4f7
Merge branch 'trunk' @ r61430 into trac-63430-null-coalescing
westonruter Jan 5, 2026
a4e428e
Remove needless parentheses and line breaks
westonruter Jan 5, 2026
35f17d6
Fix syntax error
westonruter Jan 5, 2026
ac277b2
Merge branch 'trunk' @ r61431 into trac-63430-null-coalescing
westonruter Jan 5, 2026
1a2a173
Merge branch 'trunk' @ r61432 into trac-63430-null-coalescing
westonruter Jan 5, 2026
92eae34
Merge branch 'trunk' @ r61433 into trac-63430-null-coalescing
westonruter Jan 5, 2026
ef8a226
Merge branch 'trunk' @ r61435 into trac-63430-null-coalescing
westonruter Jan 5, 2026
13bacde
Merge branch 'trunk' @ r61436 into trac-63430-null-coalescing
westonruter Jan 5, 2026
dabecc8
Merge branch 'trunk' into trac-63430-null-coalescing
westonruter Jan 6, 2026
17ff1af
Merge branch 'trunk' @ r61442 of https://github.com/WordPress/wordpre…
westonruter Jan 6, 2026
802c25f
Merge branch 'trunk' @ r61443 of https://github.com/WordPress/wordpre…
westonruter Jan 6, 2026
b20e3ea
Remove extraneous parentheses
westonruter Jan 6, 2026
a1053fb
Merge branch 'trunk' @ r61444 of https://github.com/WordPress/wordpre…
westonruter Jan 6, 2026
96989e7
Merge branch 'trunk' @ r61445 into trac-63430-null-coalescing
westonruter Jan 6, 2026
15e1eba
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develo…
westonruter Jan 9, 2026
f79b05c
Merge branch 'trunk' @ r61453 into trac-63430-null-coalescing
westonruter Jan 9, 2026
f7dc7e8
Remove extraneous parentheses
westonruter Jan 9, 2026
7bbe68c
Update get_pagenum_link()
westonruter Jan 9, 2026
e72bccd
Merge branch 'trunk' @ r61454 into trac-63430-null-coalescing
westonruter Jan 9, 2026
bbb4e02
Merge branch 'trunk' @ r61455 into trac-63430-null-coalescing
westonruter Jan 9, 2026
b2e4bf6
Remove extraneous parens
westonruter Jan 9, 2026
def4634
Merge branch 'trunk' @ r61456 of https://github.com/WordPress/wordpre…
westonruter Jan 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/wp-includes/IXR/class-IXR-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function __construct( $server, $path = false, $port = 80, $timeout = 15 )
// Assume we have been given a URL instead
$bits = parse_url($server);
$this->server = $bits['host'];
$this->port = isset($bits['port']) ? $bits['port'] : 80;
$this->path = isset($bits['path']) ? $bits['path'] : '/';
$this->port = $bits['port'] ?? 80;
$this->path = $bits['path'] ?? '/';

// Make absolutely sure we have a path
if (!$this->path) {
Expand Down
12 changes: 4 additions & 8 deletions src/wp-includes/class-wp-duotone.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private static function colord_parse_hue( $value, $unit = 'deg' ) {
'rad' => 360 / ( M_PI * 2 ),
);

$factor = isset( $angle_units[ $unit ] ) ? $angle_units[ $unit ] : 1;
$factor = $angle_units[ $unit ] ?? 1;

return (float) $value * $factor;
}
Expand Down Expand Up @@ -972,9 +972,7 @@ private static function get_selector( $block_type ) {
* If the experimental duotone support was set, that value is to be
* treated as a selector and requires scoping.
*/
$experimental_duotone = isset( $block_type->supports['color']['__experimentalDuotone'] )
? $block_type->supports['color']['__experimentalDuotone']
: false;
$experimental_duotone = $block_type->supports['color']['__experimentalDuotone'] ?? false;
if ( $experimental_duotone ) {
$root_selector = wp_get_block_css_selector( $block_type );
return is_string( $experimental_duotone )
Expand Down Expand Up @@ -1003,7 +1001,7 @@ private static function get_all_global_styles_presets() {
}
// Get the per block settings from the theme.json.
$tree = wp_get_global_settings();
$presets_by_origin = isset( $tree['color']['duotone'] ) ? $tree['color']['duotone'] : array();
$presets_by_origin = $tree['color']['duotone'] ?? array();

self::$global_styles_presets = array();
foreach ( $presets_by_origin as $presets ) {
Expand Down Expand Up @@ -1304,9 +1302,7 @@ public static function add_editor_settings( $settings ) {
* @return array Filtered block type settings.
*/
public static function migrate_experimental_duotone_support_flag( $settings, $metadata ) {
$duotone_support = isset( $metadata['supports']['color']['__experimentalDuotone'] )
? $metadata['supports']['color']['__experimentalDuotone']
: null;
$duotone_support = $metadata['supports']['color']['__experimentalDuotone'] ?? null;

if ( ! isset( $settings['supports']['filter']['duotone'] ) && null !== $duotone_support ) {
_wp_array_set( $settings, array( 'supports', 'filter', 'duotone' ), (bool) $duotone_support );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ public function offsetExists( $offset ) {
*/
#[ReturnTypeWillChange]
public function offsetGet( $offset ) {
return isset( $this->callbacks[ $offset ] ) ? $this->callbacks[ $offset ] : null;
return $this->callbacks[ $offset ] ?? null;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/class-wp-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) {
return;
}
// Set the parent. Pass the current instance so we can do the checks above and assess errors.
$this->parent = new WP_Theme( $this->template, isset( $theme_root_template ) ? $theme_root_template : $this->theme_root, $this );
$this->parent = new WP_Theme( $this->template, $theme_root_template ?? $this->theme_root, $this );
}

if ( wp_paused_themes()->get( $this->stylesheet ) && ( ! is_wp_error( $this->errors ) || ! isset( $this->errors->errors['theme_paused'] ) ) ) {
Expand Down Expand Up @@ -776,7 +776,7 @@ public function exists() {
* @return WP_Theme|false Parent theme, or false if the active theme is not a child theme.
*/
public function parent() {
return isset( $this->parent ) ? $this->parent : false;
return $this->parent ?? false;
}

/**
Expand Down Expand Up @@ -1397,7 +1397,7 @@ public function get_page_templates( $post = null, $post_type = 'page' ) {
}

$post_templates = $this->get_post_templates();
$post_templates = isset( $post_templates[ $post_type ] ) ? $post_templates[ $post_type ] : array();
$post_templates = $post_templates[ $post_type ] ?? array();

/**
* Filters list of page templates for a theme.
Expand Down
12 changes: 3 additions & 9 deletions src/wp-includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -4264,9 +4264,7 @@ function wp_render_duotone_filter_preset( $preset ) {
function wp_skip_border_serialization( $block_type ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );

$border_support = isset( $block_type->supports['__experimentalBorder'] )
? $block_type->supports['__experimentalBorder']
: false;
$border_support = $block_type->supports['__experimentalBorder'] ?? false;

return is_array( $border_support ) &&
array_key_exists( '__experimentalSkipSerialization', $border_support ) &&
Expand All @@ -4288,9 +4286,7 @@ function wp_skip_border_serialization( $block_type ) {
function wp_skip_dimensions_serialization( $block_type ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );

$dimensions_support = isset( $block_type->supports['__experimentalDimensions'] )
? $block_type->supports['__experimentalDimensions']
: false;
$dimensions_support = $block_type->supports['__experimentalDimensions'] ?? false;

return is_array( $dimensions_support ) &&
array_key_exists( '__experimentalSkipSerialization', $dimensions_support ) &&
Expand All @@ -4312,9 +4308,7 @@ function wp_skip_dimensions_serialization( $block_type ) {
function wp_skip_spacing_serialization( $block_type ) {
_deprecated_function( __FUNCTION__, '6.0.0', 'wp_should_skip_block_supports_serialization()' );

$spacing_support = isset( $block_type->supports['spacing'] )
? $block_type->supports['spacing']
: false;
$spacing_support = $block_type->supports['spacing'] ?? false;

return is_array( $spacing_support ) &&
array_key_exists( '__experimentalSkipSerialization', $spacing_support ) &&
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ function wp_validate_redirect( $location, $fallback_url = '' ) {
* @param string[] $hosts An array of allowed host names.
* @param string $host The host name of the redirect destination; empty string if not set.
*/
$allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array( $wpp['host'] ), isset( $lp['host'] ) ? $lp['host'] : '' );
$allowed_hosts = (array) apply_filters( 'allowed_redirect_hosts', array( $wpp['host'] ), $lp['host'] ?? '' );

if ( isset( $lp['host'] ) && ( ! in_array( $lp['host'], $allowed_hosts, true ) && strtolower( $wpp['host'] ) !== $lp['host'] ) ) {
$location = $fallback_url;
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ function get_theme_mod( $name, $default_value = false ) {
*/
function set_theme_mod( $name, $value ) {
$mods = get_theme_mods();
$old_value = isset( $mods[ $name ] ) ? $mods[ $name ] : false;
$old_value = $mods[ $name ] ?? false;

/**
* Filters the theme modification, or 'theme_mod', value on save.
Expand Down Expand Up @@ -3428,7 +3428,7 @@ function get_registered_theme_feature( $feature ) {
return null;
}

return isset( $_wp_registered_theme_features[ $feature ] ) ? $_wp_registered_theme_features[ $feature ] : null;
return $_wp_registered_theme_features[ $feature ] ?? null;
}

/**
Expand Down
Loading