admin_menu.php
13 years ago
admin_notices.php
13 years ago
delete_post.php
13 years ago
wp_loaded.php
13 years ago
admin_notices.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | function pmxi_admin_notices() { |
| 4 | // notify user if history folder is not writable |
| 5 | if ( ! is_dir(PMXI_Plugin::ROOT_DIR . '/history') or ! is_writable(PMXI_Plugin::ROOT_DIR . '/history')) { |
| 6 | ?> |
| 7 | <div class="error"><p> |
| 8 | <?php printf( |
| 9 | __('<b>%s Plugin</b>: History folder %s must be writable for the plugin to function properly. Please deactivate the plugin, set proper permissions to the folder and activate the plugin again.', 'pmxi_plugin'), |
| 10 | PMXI_Plugin::getInstance()->getName(), |
| 11 | PMXI_Plugin::ROOT_DIR . '/history' |
| 12 | ) ?> |
| 13 | </p></div> |
| 14 | <?php |
| 15 | } |
| 16 | |
| 17 | $input = new PMXI_Input(); |
| 18 | $messages = $input->get('pmxi_nt', array()); |
| 19 | if ($messages) { |
| 20 | is_array($messages) or $messages = array($messages); |
| 21 | foreach ($messages as $type => $m) { |
| 22 | in_array((string)$type, array('updated', 'error')) or $type = 'updated'; |
| 23 | ?> |
| 24 | <div class="<?php echo $type ?>"><p><?php echo $m ?></p></div> |
| 25 | <?php |
| 26 | } |
| 27 | } |
| 28 | } |