Last active
December 16, 2015 00:49
-
-
Save arelthia/5350925 to your computer and use it in GitHub Desktop.
Display Log Notices
This file contains 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
* | |
* Display the admin notices | |
* Based off of ??? | |
*/ | |
function pt_import_notices() { | |
global $gpt_log; | |
if (!empty($gpt_log)) { | |
?> | |
<div class="wrap"> | |
<?php if (!empty($gpt_log['error'])): ?> | |
<div class="error"> | |
<?php //display all error messages ?> | |
<?php foreach ($gpt_log['error'] as $error): ?> | |
<p><?php echo $error; ?></p> | |
<?php endforeach; ?> | |
</div> | |
<?php endif; ?> | |
<?php if (!empty($gpt_log['notice'])): ?> | |
<div class="updated fade"> | |
<?php //display all notices ?> | |
<?php foreach ($gpt_log['notice'] as $notice): ?> | |
<p><?php echo $notice; ?></p> | |
<?php endforeach; ?> | |
</div> | |
<?php endif; ?> | |
</div><!-- end wrap --> | |
<?php | |
$gpt_log = array(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment