how does esc_html__
(the 2nd one) protect the $message
variable from being hacked ? what's the point to use this protection here (the second one with a plain text)?
<?php
function unknown(){
/* If the user input any text, escape it. */
if ( !empty ( $_POST['unknown'] ) )
$message = esc_html ( $_POST['unknown'] );
/* If no text was input, use a default, translated message. */
else
$message = esc_html__( 'No message input by the user.', 'unknown' );
return $message;
}
?>
Thanks