diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php
index 66a6bbfc25..e200b29621 100644
--- a/wp-admin/edit-form-blocks.php
+++ b/wp-admin/edit-form-blocks.php
@@ -31,7 +31,7 @@
// Default to is-fullscreen-mode to avoid jumps in the UI.
add_filter(
'admin_body_class',
- static function( $classes ) {
+ static function ( $classes ) {
return "$classes is-fullscreen-mode";
}
);
diff --git a/wp-admin/includes/class-wp-community-events.php b/wp-admin/includes/class-wp-community-events.php
index 09557c86a4..008611af21 100644
--- a/wp-admin/includes/class-wp-community-events.php
+++ b/wp-admin/includes/class-wp-community-events.php
@@ -483,7 +483,7 @@ protected function trim_events( array $events ) {
$future_wordcamps = array_filter(
$future_events,
- static function( $wordcamp ) {
+ static function ( $wordcamp ) {
return 'wordcamp' === $wordcamp['type'];
}
);
diff --git a/wp-admin/includes/class-wp-site-health-auto-updates.php b/wp-admin/includes/class-wp-site-health-auto-updates.php
index d1655eb1d8..f8521ab2b0 100644
--- a/wp-admin/includes/class-wp-site-health-auto-updates.php
+++ b/wp-admin/includes/class-wp-site-health-auto-updates.php
@@ -42,7 +42,7 @@ public function run_tests() {
$tests = array_filter( $tests );
$tests = array_map(
- static function( $test ) {
+ static function ( $test ) {
$test = (object) $test;
if ( empty( $test->severity ) ) {
diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php
index aa8e25c8ed..6531736bd9 100644
--- a/wp-admin/includes/file.php
+++ b/wp-admin/includes/file.php
@@ -2726,7 +2726,7 @@ function wp_opcache_invalidate_directory( $dir ) {
* with sub-directories represented as nested arrays.
* @param string $path Absolute path to the directory.
*/
- $invalidate_directory = static function( $dirlist, $path ) use ( &$invalidate_directory ) {
+ $invalidate_directory = static function ( $dirlist, $path ) use ( &$invalidate_directory ) {
$path = trailingslashit( $path );
foreach ( $dirlist as $name => $details ) {
diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php
index 6085b02c8f..fdb522c889 100644
--- a/wp-admin/includes/update-core.php
+++ b/wp-admin/includes/update-core.php
@@ -1805,7 +1805,7 @@ function _upgrade_422_find_genericons_files_in_folder( $directory ) {
$dirs = glob( $directory . '*', GLOB_ONLYDIR );
$dirs = array_filter(
$dirs,
- static function( $dir ) {
+ static function ( $dir ) {
/*
* Skip any node_modules directories.
*
diff --git a/wp-admin/options-privacy.php b/wp-admin/options-privacy.php
index 5c22d39d5d..1afb8c0601 100644
--- a/wp-admin/options-privacy.php
+++ b/wp-admin/options-privacy.php
@@ -23,7 +23,7 @@
add_filter(
'admin_body_class',
- static function( $body_class ) {
+ static function ( $body_class ) {
$body_class .= ' privacy-settings ';
return $body_class;
diff --git a/wp-admin/privacy-policy-guide.php b/wp-admin/privacy-policy-guide.php
index 7e92a4dea6..b8f303aa7f 100644
--- a/wp-admin/privacy-policy-guide.php
+++ b/wp-admin/privacy-policy-guide.php
@@ -22,7 +22,7 @@
add_filter(
'admin_body_class',
- static function( $body_class ) {
+ static function ( $body_class ) {
$body_class .= ' privacy-settings ';
return $body_class;
diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php
index b7cdfbe0df..2da7222d7c 100644
--- a/wp-admin/site-editor.php
+++ b/wp-admin/site-editor.php
@@ -42,7 +42,7 @@
// Default to is-fullscreen-mode to avoid jumps in the UI.
add_filter(
'admin_body_class',
- static function( $classes ) {
+ static function ( $classes ) {
return "$classes is-fullscreen-mode";
}
);
diff --git a/wp-admin/upload.php b/wp-admin/upload.php
index 13b54c5840..6d8c8462b7 100644
--- a/wp-admin/upload.php
+++ b/wp-admin/upload.php
@@ -144,7 +144,7 @@
// Remove the error parameter added by deprecation of wp-admin/media.php.
add_filter(
'removable_query_args',
- function() {
+ function () {
return array( 'error' );
},
10,
diff --git a/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php b/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php
index dedcb37882..8a560a8d49 100644
--- a/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php
+++ b/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php
@@ -187,7 +187,7 @@ public static function register( $wp_customize ) {
'settings' => 'accent_hue',
'description' => __( 'Apply a custom color for links, buttons, featured images.', 'twentytwenty' ),
'mode' => 'hue',
- 'active_callback' => static function() use ( $wp_customize ) {
+ 'active_callback' => static function () use ( $wp_customize ) {
return ( 'custom' === $wp_customize->get_setting( 'accent_hue_active' )->value() );
},
)
diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php
index d3af05ec42..903334089d 100644
--- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php
+++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php
@@ -92,7 +92,7 @@ public function register( $wp_customize ) {
array(
'capability' => 'edit_theme_options',
'default' => 'excerpt',
- 'sanitize_callback' => static function( $value ) {
+ 'sanitize_callback' => static function ( $value ) {
return 'excerpt' === $value || 'full' === $value ? $value : 'excerpt';
},
)
diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
index 611ce3756f..39b3fb726f 100644
--- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
+++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
@@ -153,7 +153,7 @@ public function customizer_controls( $wp_customize ) {
array(
'section' => 'colors',
'priority' => 100,
- 'active_callback' => static function() {
+ 'active_callback' => static function () {
return 127 >= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
},
)
@@ -165,7 +165,7 @@ public function customizer_controls( $wp_customize ) {
array(
'capability' => 'edit_theme_options',
'default' => false,
- 'sanitize_callback' => static function( $value ) {
+ 'sanitize_callback' => static function ( $value ) {
return (bool) $value;
},
)
@@ -188,7 +188,7 @@ public function customizer_controls( $wp_customize ) {
'label' => esc_html__( 'Dark Mode support', 'twentytwentyone' ),
'priority' => 110,
'description' => $description,
- 'active_callback' => static function( $value ) {
+ 'active_callback' => static function ( $value ) {
return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
},
)
@@ -200,7 +200,7 @@ public function customizer_controls( $wp_customize ) {
array(
'selector' => '#dark-mode-toggler',
'container_inclusive' => true,
- 'render_callback' => function() {
+ 'render_callback' => function () {
$attrs = ( $this->switch_should_render() ) ? array() : array( 'style' => 'display:none;' );
$this->the_html( $attrs );
},
diff --git a/wp-includes/block-supports/layout.php b/wp-includes/block-supports/layout.php
index 519574238d..89713c772d 100644
--- a/wp-includes/block-supports/layout.php
+++ b/wp-includes/block-supports/layout.php
@@ -789,7 +789,7 @@ function wp_restore_group_inner_container( $block_content, $block ) {
);
$updated_content = preg_replace_callback(
$replace_regex,
- static function( $matches ) {
+ static function ( $matches ) {
return $matches[1] . '
' . $matches[2] . '
' . $matches[3];
},
$block_content
diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php
index 590f3706f7..3c88f7b4c3 100644
--- a/wp-includes/blocks.php
+++ b/wp-includes/blocks.php
@@ -532,7 +532,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
*
* @return string Returns the block content.
*/
- $settings['render_callback'] = static function( $attributes, $content, $block ) use ( $template_path ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ $settings['render_callback'] = static function ( $attributes, $content, $block ) use ( $template_path ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
ob_start();
require $template_path;
return ob_get_clean();
diff --git a/wp-includes/blocks/index.php b/wp-includes/blocks/index.php
index a966248c79..128a06bea2 100644
--- a/wp-includes/blocks/index.php
+++ b/wp-includes/blocks/index.php
@@ -87,7 +87,7 @@ static function ( $file ) {
}
}
- $register_style = static function( $name, $filename, $style_handle ) use ( $blocks_url, $suffix, $wp_styles, $files ) {
+ $register_style = static function ( $name, $filename, $style_handle ) use ( $blocks_url, $suffix, $wp_styles, $files ) {
$style_path = "{$name}/{$filename}{$suffix}.css";
$path = wp_normalize_path( BLOCKS_PATH . $style_path );
diff --git a/wp-includes/class-wp-customize-widgets.php b/wp-includes/class-wp-customize-widgets.php
index 41a57dc66b..93006ef916 100644
--- a/wp-includes/class-wp-customize-widgets.php
+++ b/wp-includes/class-wp-customize-widgets.php
@@ -982,10 +982,10 @@ public function get_setting_args( $id, $overrides = array() ) {
$args['transport'] = current_theme_supports( 'customize-selective-refresh-widgets' ) ? 'postMessage' : 'refresh';
} elseif ( preg_match( $this->setting_id_patterns['widget_instance'], $id, $matches ) ) {
$id_base = $matches['id_base'];
- $args['sanitize_callback'] = function( $value ) use ( $id_base ) {
+ $args['sanitize_callback'] = function ( $value ) use ( $id_base ) {
return $this->sanitize_widget_instance( $value, $id_base );
};
- $args['sanitize_js_callback'] = function( $value ) use ( $id_base ) {
+ $args['sanitize_js_callback'] = function ( $value ) use ( $id_base ) {
return $this->sanitize_widget_js_instance( $value, $id_base );
};
$args['transport'] = $this->is_widget_selective_refreshable( $matches['id_base'] ) ? 'postMessage' : 'refresh';
diff --git a/wp-includes/class-wp-http.php b/wp-includes/class-wp-http.php
index 87a9342a92..056680ba40 100644
--- a/wp-includes/class-wp-http.php
+++ b/wp-includes/class-wp-http.php
@@ -463,7 +463,7 @@ public static function normalize_cookies( $cookies ) {
if ( $value instanceof WP_Http_Cookie ) {
$attributes = array_filter(
$value->get_attributes(),
- static function( $attr ) {
+ static function ( $attr ) {
return null !== $attr;
}
);
diff --git a/wp-includes/class-wp-navigation-fallback.php b/wp-includes/class-wp-navigation-fallback.php
index fb97c643bb..bd9583d1fa 100644
--- a/wp-includes/class-wp-navigation-fallback.php
+++ b/wp-includes/class-wp-navigation-fallback.php
@@ -169,7 +169,7 @@ private static function get_fallback_classic_menu() {
private static function get_most_recently_created_nav_menu( $classic_nav_menus ) {
usort(
$classic_nav_menus,
- static function( $a, $b ) {
+ static function ( $a, $b ) {
return $b->term_id - $a->term_id;
}
);
diff --git a/wp-includes/class-wp-theme-json.php b/wp-includes/class-wp-theme-json.php
index 227398facd..95cbac23c3 100644
--- a/wp-includes/class-wp-theme-json.php
+++ b/wp-includes/class-wp-theme-json.php
@@ -2334,7 +2334,7 @@ public function get_styles_for_block( $block_metadata ) {
// Prepend the variation selector to the current selector.
$split_selectors = explode( ',', $shortened_selector );
$updated_selectors = array_map(
- static function( $split_selector ) use ( $clean_style_variation_selector ) {
+ static function ( $split_selector ) use ( $clean_style_variation_selector ) {
return $clean_style_variation_selector . $split_selector;
},
$split_selectors
@@ -2372,7 +2372,7 @@ static function( $split_selector ) use ( $clean_style_variation_selector ) {
$pseudo_matches = array_values(
array_filter(
$element_pseudo_allowed,
- static function( $pseudo_selector ) use ( $selector ) {
+ static function ( $pseudo_selector ) use ( $selector ) {
return str_contains( $selector, $pseudo_selector );
}
)
@@ -3733,7 +3733,7 @@ public static function resolve_variables( $theme_json ) {
$theme_vars = static::compute_theme_vars( $settings );
$vars = array_reduce(
array_merge( $preset_vars, $theme_vars ),
- function( $carry, $item ) {
+ function ( $carry, $item ) {
$name = $item['name'];
$carry[ "var({$name})" ] = $item['value'];
return $carry;
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index fddd2b1aa1..05084329d3 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -3259,7 +3259,7 @@ function wp_rel_nofollow( $text ) {
$text = stripslashes( $text );
$text = preg_replace_callback(
'||i',
- static function( $matches ) {
+ static function ( $matches ) {
return wp_rel_callback( $matches, 'nofollow' );
},
$text
@@ -3293,7 +3293,7 @@ function wp_rel_ugc( $text ) {
$text = stripslashes( $text );
$text = preg_replace_callback(
'||i',
- static function( $matches ) {
+ static function ( $matches ) {
return wp_rel_callback( $matches, 'nofollow ugc' );
},
$text
@@ -4756,7 +4756,7 @@ function esc_xml( $text ) {
$safe_text = (string) preg_replace_callback(
$regex,
- static function( $matches ) {
+ static function ( $matches ) {
if ( ! isset( $matches[0] ) ) {
return '';
}
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 6963de3a38..28975154c3 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -846,7 +846,7 @@ function wp_extract_urls( $content ) {
$post_links = array_unique(
array_map(
- static function( $link ) {
+ static function ( $link ) {
// Decode to replace valid entities, like &.
$link = html_entity_decode( $link );
// Maintain backward compatibility by removing extraneous semi-colons (`;`).
diff --git a/wp-includes/kses.php b/wp-includes/kses.php
index 7eeadca569..f6bd75741d 100644
--- a/wp-includes/kses.php
+++ b/wp-includes/kses.php
@@ -1183,7 +1183,7 @@ function wp_kses_attr( $element, $attr, $allowed_html, $allowed_protocols ) {
// Check if there are attributes that are required.
$required_attrs = array_filter(
$allowed_html[ $element_low ],
- static function( $required_attr_limits ) {
+ static function ( $required_attr_limits ) {
return isset( $required_attr_limits['required'] ) && true === $required_attr_limits['required'];
}
);
diff --git a/wp-includes/post.php b/wp-includes/post.php
index 2a8d6b41f6..e1af9227a5 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -6071,7 +6071,7 @@ function get_pages( $args = array() ) {
*/
$orderby = wp_parse_list( $parsed_args['sort_column'] );
$orderby = array_map(
- static function( $orderby_field ) {
+ static function ( $orderby_field ) {
$orderby_field = trim( $orderby_field );
if ( 'post_modified_gmt' === $orderby_field || 'modified_gmt' === $orderby_field ) {
$orderby_field = str_replace( '_gmt', '', $orderby_field );
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
index 81fc991ba9..4b960d6c6b 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-controller.php
@@ -625,7 +625,7 @@ public function get_fields_for_response( $request ) {
// Return the list of all requested fields which appear in the schema.
return array_reduce(
$requested_fields,
- static function( $response_fields, $field ) use ( $fields ) {
+ static function ( $response_fields, $field ) use ( $fields ) {
if ( in_array( $field, $fields, true ) ) {
$response_fields[] = $field;
return $response_fields;
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
index 4cbc5063e9..8d24b60db2 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
@@ -381,7 +381,7 @@ public function create_item( $request ) {
$installed_locales = apply_filters( 'plugins_update_check_locales', $installed_locales );
$language_packs = array_map(
- static function( $item ) {
+ static function ( $item ) {
return (object) $item;
},
$api->language_packs
@@ -389,7 +389,7 @@ static function( $item ) {
$language_packs = array_filter(
$language_packs,
- static function( $pack ) use ( $installed_locales ) {
+ static function ( $pack ) use ( $installed_locales ) {
return in_array( $pack->language, $installed_locales, true );
}
);
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php
index 18d67dc2dd..41e15337ad 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php
@@ -152,7 +152,7 @@ public function register_routes() {
array(
'methods' => 'GET',
'callback' => array( $this, 'get_directory_sizes' ),
- 'permission_callback' => function() {
+ 'permission_callback' => function () {
return $this->validate_request_permission( 'directory_sizes' ) && ! is_multisite();
},
)
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
index 9734ae6625..b01dd1649e 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php
@@ -85,7 +85,7 @@ public function register_routes() {
'form_data' => array(
'description' => __( 'Serialized widget form data to encode into instance settings.' ),
'type' => 'string',
- 'sanitize_callback' => static function( $form_data ) {
+ 'sanitize_callback' => static function ( $form_data ) {
$array = array();
wp_parse_str( $form_data, $array );
return $array;
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
index 267a75ffae..acbd88c489 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
@@ -861,7 +861,7 @@ public function get_item_schema() {
'type' => 'string',
'context' => array(),
'arg_options' => array(
- 'sanitize_callback' => static function( $form_data ) {
+ 'sanitize_callback' => static function ( $form_data ) {
$array = array();
wp_parse_str( $form_data, $array );
return $array;
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index d99cc9b035..b51569f40c 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -2453,7 +2453,7 @@ function wp_common_block_scripts_and_styles() {
function wp_filter_out_block_nodes( $nodes ) {
return array_filter(
$nodes,
- static function( $node ) {
+ static function ( $node ) {
return ! in_array( 'blocks', $node['path'], true );
},
ARRAY_FILTER_USE_BOTH
@@ -2655,7 +2655,7 @@ function enqueue_block_styles_assets() {
if ( wp_should_load_separate_core_block_assets() ) {
add_filter(
'render_block',
- static function( $html, $block ) use ( $block_name, $style_properties ) {
+ static function ( $html, $block ) use ( $block_name, $style_properties ) {
if ( $block['blockName'] === $block_name ) {
wp_enqueue_style( $style_properties['style_handle'] );
}
@@ -2917,7 +2917,7 @@ function wp_maybe_inline_styles() {
// Reorder styles array based on size.
usort(
$styles,
- static function( $a, $b ) {
+ static function ( $a, $b ) {
return ( $a['size'] <= $b['size'] ) ? -1 : 1;
}
);
@@ -3150,7 +3150,7 @@ function wp_enqueue_block_style( $block_name, $args ) {
* is to ensure the content exists.
* @return string Block content.
*/
- $callback = static function( $content ) use ( $args ) {
+ $callback = static function ( $content ) use ( $args ) {
// Register the stylesheet.
if ( ! empty( $args['src'] ) ) {
wp_register_style( $args['handle'], $args['src'], $args['deps'], $args['ver'], $args['media'] );
@@ -3188,7 +3188,7 @@ function wp_enqueue_block_style( $block_name, $args ) {
* @param array $block The full block, including name and attributes.
* @return string Block content.
*/
- $callback_separate = static function( $content, $block ) use ( $block_name, $callback ) {
+ $callback_separate = static function ( $content, $block ) use ( $block_name, $callback ) {
if ( ! empty( $block['blockName'] ) && $block_name === $block['blockName'] ) {
return $callback( $content );
}
diff --git a/wp-includes/update.php b/wp-includes/update.php
index c5349832ac..e2ac6b8b54 100644
--- a/wp-includes/update.php
+++ b/wp-includes/update.php
@@ -553,7 +553,7 @@ function wp_update_plugins( $extra_stats = array() ) {
}
}
- $sanitize_plugin_update_payload = static function( &$item ) {
+ $sanitize_plugin_update_payload = static function ( &$item ) {
$item = (object) $item;
unset( $item->translations, $item->compatibility );
diff --git a/wp-includes/user.php b/wp-includes/user.php
index aaba3a7e7e..fc40f4cd75 100644
--- a/wp-includes/user.php
+++ b/wp-includes/user.php
@@ -3899,7 +3899,7 @@ function wp_user_personal_data_exporter( $email_address ) {
// Remove items that use reserved names.
$extra_data = array_filter(
$_extra_data,
- static function( $item ) use ( $reserved_names ) {
+ static function ( $item ) use ( $reserved_names ) {
return ! in_array( $item['name'], $reserved_names, true );
}
);
diff --git a/wp-includes/version.php b/wp-includes/version.php
index f42d381eaf..8d2df4d68f 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.4-alpha-56558';
+$wp_version = '6.4-alpha-56559';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.