Plugin Contributor
pingram
(@pingram3541)
I was abel to get around this by editing wp-live-css-editor.php line 31
from:
add_action('wp_loaded', 'wp_live_css_editor_init');
function wp_live_css_editor_init(){
if( current_user_can('delete_themes') ) //current_user_can('manage_options')
{
add_action('wp_print_styles', 'wp_live_css_editor_enqueue_styles');
add_action('wp_print_scripts', 'wp_live_css_editor_enqueue_scripts');
add_action('wp_ajax_live_css_editor_SAVE', 'wp_live_css_editor_SAVE');
}
}
to:
add_action('wp_loaded', 'wp_live_css_editor_init');
function wp_live_css_editor_init(){
if(is_admin()) {
//do nothing if in admin area
} else{
if( current_user_can('delete_themes') ) //current_user_can('manage_options')
{
add_action('wp_print_styles', 'wp_live_css_editor_enqueue_styles');
add_action('wp_print_scripts', 'wp_live_css_editor_enqueue_scripts');
add_action('wp_ajax_live_css_editor_SAVE', 'wp_live_css_editor_SAVE');
}
}
}
Plugin Contributor
pingram
(@pingram3541)
oops, issues with saving the edited css, since we need admin to save, lets only exlcude the script and css files if in admin area
to:
add_action('wp_loaded', 'wp_live_css_editor_init');
function wp_live_css_editor_init(){
if( current_user_can('delete_themes') ) //current_user_can('manage_options')
{
if(is_admin()) {
//do nothing
} else {
add_action('wp_print_styles', 'wp_live_css_editor_enqueue_styles');
add_action('wp_print_scripts', 'wp_live_css_editor_enqueue_scripts');
}
add_action('wp_ajax_live_css_editor_SAVE', 'wp_live_css_editor_SAVE');
}
}