added ability to dismiss the tagline admin notice (thx http://wptheming.com/2011/08/admin-notices-in-wordpress/), made the htaccess notice only show for admins

This commit is contained in:
Ben Word
2011-08-28 14:41:54 -06:00
parent 031a886bb5
commit daff3bcb0b
2 changed files with 20 additions and 4 deletions

View File

@@ -3,7 +3,9 @@
if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) {
function roots_htaccess_writable() {
if (!is_writable(get_home_path() . '.htaccess')) {
add_action('admin_notices', create_function('', "echo '<div class=\"error\"><p>" . sprintf(__('Please make sure your <a href="%s">.htaccess</a> file is writeable ', 'roots'), admin_url('options-permalink.php')) . "</p></div>';"));
if (current_user_can('administrator')) {
add_action('admin_notices', create_function('', "echo '<div class=\"error\"><p>" . sprintf(__('Please make sure your <a href="%s">.htaccess</a> file is writable ', 'roots'), admin_url('options-permalink.php')) . "</p></div>';"));
}
};
}