diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-admin/includes/misc.php --- a/wp/wp-admin/includes/misc.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-admin/includes/misc.php Fri Sep 05 18:40:08 2025 +0200 @@ -39,11 +39,12 @@ * @since 3.7.0 * * @global bool $is_nginx + * @global bool $is_caddy * * @return bool Whether the server supports URL rewriting. */ function got_url_rewrite() { - $got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || iis7_supports_permalinks() ); + $got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || $GLOBALS['is_caddy'] || iis7_supports_permalinks() ); /** * Filters whether URL rewriting is available. @@ -76,19 +77,19 @@ $state = false; foreach ( $markerdata as $markerline ) { - if ( false !== strpos( $markerline, '# END ' . $marker ) ) { + if ( str_contains( $markerline, '# END ' . $marker ) ) { $state = false; } if ( $state ) { - if ( '#' === substr( $markerline, 0, 1 ) ) { + if ( str_starts_with( $markerline, '#' ) ) { continue; } $result[] = $markerline; } - if ( false !== strpos( $markerline, '# BEGIN ' . $marker ) ) { + if ( str_contains( $markerline, '# BEGIN ' . $marker ) ) { $state = true; } } @@ -194,10 +195,10 @@ $found_end_marker = false; foreach ( $lines as $line ) { - if ( ! $found_marker && false !== strpos( $line, $start_marker ) ) { + if ( ! $found_marker && str_contains( $line, $start_marker ) ) { $found_marker = true; continue; - } elseif ( ! $found_end_marker && false !== strpos( $line, $end_marker ) ) { + } elseif ( ! $found_end_marker && str_contains( $line, $end_marker ) ) { $found_end_marker = true; continue; } @@ -403,7 +404,7 @@ $size = count( $tree ); foreach ( $tree as $label => $theme_file ) : - $index++; + ++$index; if ( ! is_array( $theme_file ) ) { wp_print_theme_file_tree( $theme_file, $level, $index, $size ); @@ -414,7 +415,12 @@ aria-level="" aria-setsize="" aria-posinset=""> - + + + $plugin_file ) : - $index++; + ++$index; if ( ! is_array( $plugin_file ) ) { wp_print_plugin_file_tree( $plugin_file, $label, $level, $index, $size ); @@ -511,7 +517,12 @@ aria-level="" aria-setsize="" aria-posinset=""> - + + +
- + + + $color_info ) : @@ -1023,17 +1038,15 @@ - - +
+ colors as $html_color ) { + ?> +
 
colors as $html_color ) { - ?> -
- - -
 
+ } + ?> + array( + 'metabox_loader_nonce' => wp_create_nonce( 'meta-box-loader' ), + '_wpnonce' => wp_create_nonce( 'update-post_' . $post_id ), + ), + ); + + return $response; +} + +/** + * Adds the latest Heartbeat and REST API nonce to the Heartbeat response. * * @since 5.0.0 * @@ -1348,6 +1396,15 @@ // Ensure we're using an absolute URL. $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); $filtered_url = remove_query_arg( $removable_query_args, $current_url ); + + /** + * Filters the admin canonical URL value. + * + * @since 6.5.0 + * + * @param string $filtered_url The admin canonical URL value. + */ + $filtered_url = apply_filters( 'wp_admin_canonical_url', $filtered_url ); ?>