Move HTML5 Boilerplate's .htaccess to a plugin
https://github.com/retlehs/wp-h5bp-htaccess
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user