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.


Top ↑

Return Return

(string)


Top ↑

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;
}

Top ↑

Changelog Changelog

Changelog
VersionDescription
1.1.0Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation