From e9cac027248c036da8b360c523a58e99d4df2c7d Mon Sep 17 00:00:00 2001 From: Ben Word Date: Sun, 29 May 2011 23:41:14 -0600 Subject: [PATCH] cleaning up the part that checks to see if .htaccess is writable --- inc/roots-htaccess.php | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/inc/roots-htaccess.php b/inc/roots-htaccess.php index 92e726e..4de25ee 100644 --- a/inc/roots-htaccess.php +++ b/inc/roots-htaccess.php @@ -1,24 +1,12 @@

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

';")); + }; } -$home_path = roots_get_home_path(); - -if (!is_writable($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')) . "

';")); -}; +add_action('admin_init', 'roots_htaccess_writable'); // thanks to Scott Walkinshaw (scottwalkinshaw.com)