Changeset 55791 for branches/5.0/src/wp-includes/formatting.php
- Timestamp:
- 05/16/2023 04:02:16 PM (3 years ago)
- File:
-
- 1 edited
-
branches/5.0/src/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/formatting.php
r52473 r55791 2114 2114 */ 2115 2115 return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback ); 2116 } 2117 2118 /** 2119 * Strips out all characters not allowed in a locale name. 2120 * 2121 * @since 6.2.1 2122 * 2123 * @param string $locale_name The locale name to be sanitized. 2124 * @return string The sanitized value. 2125 */ 2126 function sanitize_locale_name( $locale_name ) { 2127 // Limit to A-Z, a-z, 0-9, '_', '-'. 2128 $sanitized = preg_replace( '/[^A-Za-z0-9_-]/', '', $locale_name ); 2129 2130 /** 2131 * Filters a sanitized locale name string. 2132 * 2133 * @since 6.2.1 2134 * 2135 * @param string $sanitized The sanitized locale name. 2136 * @param string $locale_name The locale name before sanitization. 2137 */ 2138 return apply_filters( 'sanitize_locale_name', $sanitized, $locale_name ); 2116 2139 } 2117 2140
Note: See TracChangeset
for help on using the changeset viewer.