Tag Archives: wlw

Getting WordPress multisite work with Windows Live Writer

Windows Live Writer is configured for working with WordPress multi-site the same way as with normal single-site WordPress installation, but WordPress works a bit differently in multi-site and single-site configurations. The difference consists in a few lines of code in wp-includes/class-wp-xmlrpc-server.php:

function wp_getUsersBlogs( $args ) {
    global $current_site;
    // If this isn't on WPMU then just use blogger_getUsersBlogs
    if ( !is_multisite() ) {
        array_unshift( $args, 1 );
        return $this->blogger_getUsersBlogs( $args );
    }

    //single-site verion...
}

(more…)

Getting WordPress Syntax Highlighter work

WordPress has a very nice plugin called SyntaxHighlighter Evolved based on JavaScript package written by Alex Gorbatchev.

To make it work with Widows Live Writer I commented out a line of code in wp-includes/kses.php that installs some filter:

function kses_init_filters() {
	// Normal filtering.
	add_filter('pre_comment_content', 'wp_filter_kses');
	add_filter('title_save_pre', 'wp_filter_kses');

	// Post filtering
	//add_filter('content_save_pre', 'wp_filter_post_kses');
	add_filter('excerpt_save_pre', 'wp_filter_post_kses');
	add_filter('content_filtered_save_pre', 'wp_filter_post_kses');
}