Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_iso_descrambler ›

Da1.2.0
Deprecaton/a
wp_iso_descrambler ( $string )
Parametri:
  • (string) $string Subject line
    Richiesto:
Ritorna:
  • (string) Converted string to ASCII
Definito a:
Codex:

Convert to ASCII from email subjects.



Sorgenti

function wp_iso_descrambler( $string ) {
	/* this may only work with iso-8859-1, I'm afraid */
	if ( ! preg_match( '#\=\?(.+)\?Q\?(.+)\?\=#i', $string, $matches ) ) {
		return $string;
	} else {
		$subject = str_replace( '_', ' ', $matches[2] );
		return preg_replace_callback( '#\=([0-9a-f]{2})#i', '_wp_iso_convert', $subject );
	}
}