diff --git a/inc/roots-cleanup.php b/inc/roots-cleanup.php index 7459c73..c055b33 100644 --- a/inc/roots-cleanup.php +++ b/inc/roots-cleanup.php @@ -392,15 +392,29 @@ add_filter('comment_id_fields', 'roots_remove_self_closing_tags'); // show an admin notice to update if it hasn't been changed // you want to change this or remove it because it's used as the description in the RSS feed function roots_notice_tagline() { - echo '
'; - echo '

', sprintf(__('Please update your site tagline', 'roots'), admin_url('options-general.php')), '

'; - echo '
'; + global $current_user; + $user_id = $current_user->ID; + if (!get_user_meta($user_id, 'ignore_tagline_notice')) { + echo '
'; + echo '

', sprintf(__('Please update your site tagline Hide Notice', 'roots'), admin_url('options-general.php'), '?tagline_notice_ignore=0'), '

'; + echo '
'; + } } if (get_option('blogdescription') === 'Just another WordPress site') { add_action('admin_notices', 'roots_notice_tagline'); } +function roots_notice_tagline_ignore() { + global $current_user; + $user_id = $current_user->ID; + if (isset($_GET['tagline_notice_ignore']) && '0' == $_GET['tagline_notice_ignore']) { + add_user_meta($user_id, 'ignore_tagline_notice', 'true', true); + } +} + +add_action('admin_init', 'roots_notice_tagline_ignore'); + // set the post revisions to 5 unless the constant // was set in wp-config.php to avoid DB bloat if (!defined('WP_POST_REVISIONS')) define('WP_POST_REVISIONS', 5); diff --git a/inc/roots-htaccess.php b/inc/roots-htaccess.php index 726d66d..ca24a73 100644 --- a/inc/roots-htaccess.php +++ b/inc/roots-htaccess.php @@ -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 '

" . sprintf(__('Please make sure your .htaccess file is writeable ', 'roots'), admin_url('options-permalink.php')) . "

';")); + if (current_user_can('administrator')) { + add_action('admin_notices', create_function('', "echo '

" . sprintf(__('Please make sure your .htaccess file is writable ', 'roots'), admin_url('options-permalink.php')) . "

';")); + } }; }