Commit c70e3d6
committed
Formatting: Rely on _wp_can_use_pcre_u() to detect UTF-8 PCRE support.
The `sanitize_file_name()` function attempts to detect UTF-8 PCRE support, but WordPress already provides a more robust method. It then caches its check in a static var, which WordPress already does in the canonical function `_wp_can_use_pcre_u()`.
This patch refactors `sanitize_file_name()` to call `_wp_can_use_pcre_u()` directly instead of (mostly) recreating and recaching Core’s detection algorithm.
Developed in #9678
Discussed in https://core.trac.wordpress.org/ticket/63863
Follow-up to [60694].
Props dmsnell.
See #63863.
git-svn-id: https://develop.svn.wordpress.org/trunk@60695 602fd350-edb4-49c9-b593-d223f7449a821 parent 6b006e9 commit c70e3d6
1 file changed
+1
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2195 | 2195 | | |
2196 | 2196 | | |
2197 | 2197 | | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | | - | |
2202 | | - | |
2203 | | - | |
2204 | | - | |
2205 | 2198 | | |
2206 | 2199 | | |
2207 | 2200 | | |
2208 | 2201 | | |
2209 | 2202 | | |
2210 | 2203 | | |
2211 | | - | |
| 2204 | + | |
2212 | 2205 | | |
2213 | 2206 | | |
2214 | 2207 | | |
| |||
0 commit comments