Move HTML5 Boilerplate's .htaccess to a plugin

https://github.com/retlehs/wp-h5bp-htaccess
This commit is contained in:
Ben Word
2013-04-30 21:35:18 -05:00
parent df0329f8d0
commit cab26194a3
10 changed files with 2 additions and 484 deletions

View File

@@ -85,20 +85,6 @@ function roots_title() {
}
}
/**
* Show an admin notice if .htaccess isn't writable
*/
function roots_htaccess_writable() {
if (!is_writable(get_home_path() . '.htaccess')) {
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>';"));
}
}
}
if (current_theme_supports('h5bp-htaccess')) {
add_action('admin_init', 'roots_htaccess_writable');
}
/**
* Return WordPress subdirectory if applicable
*/