Created
February 16, 2015 23:35
-
-
Save LinzardMac/3529121636c2528bfede to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//each call to the function has the form type in the function params | |
csc_show_error_messages('reg'); | |
csc_show_error_messages('login'); | |
csc_show_error_messages('forgot'); | |
//set $form_type as the param | |
function csc_show_error_messages($form_type) { | |
//how do I make it so that the errors only output on the function call that has the proper form type | |
if($codes = csc_errors()->get_error_codes()) { | |
echo '<div class="csc_errors">'; | |
// Loop error codes and display errors | |
foreach($codes as $code){ | |
$message = csc_errors('forgot')->get_error_message($code); | |
echo '<span class="error"><strong>' . __('Error') . '</strong>: ' . $message . '</span><br/>'; | |
} | |
echo '</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment