noptin_obfuscate_string( string $string )
This will replace the first half of a string with “*” characters.
Parameters Parameters
- $string
(string) (Required) The string to obfuscate.
Return Return
(string)
Source Source
File: includes/functions.php
function noptin_obfuscate_string( $string ) { $length = strlen( $string ); $obfuscated_length = ceil( $length / 2 ); $string = str_repeat( '*', $obfuscated_length ) . substr( $string, $obfuscated_length ); return $string; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.1.0 | Introduced. |