• Plugin Contributor pingram

    (@pingram3541)


    I noticed if I leave the editor pane “open” (whether right or down positioned) and do not close it when I go into wp admin area (anywhere) it also tries to open the pane and, at least in chrome, crashes the page. If I go back to the post/page and close the editor pane so it is hidden I can then return to the admin area normally.

    p.s. I know I’ve posted a lot of stuff but this is a really great idea and I’d like to see it well polished. I may even help you out with a few of these…if time permits. Keep it up =)

    http://wordpress.org/extend/plugins/wp-live-css-editor/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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');
        	}
    
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘editor left "open" causes admin to break’ is closed to new replies.