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=""> - + + +