Skip to content

Instantly share code, notes, and snippets.

@ekka21
Created May 26, 2012 14:01
Show Gist options
  • Save ekka21/2794063 to your computer and use it in GitHub Desktop.
Save ekka21/2794063 to your computer and use it in GitHub Desktop.
Wordpress: virtual editor
<?php
//Set the Visual Editor Width Relative to Your Themes Content Width
add_action( 'after_setup_theme', 'wptuts_theme_setup' );
function wptuts_theme_setup() {
set_user_setting( 'dfw_width', 1000 );//In this example the full width will be 1000 pixels.
}
add_action( 'after_setup_theme', 'wptuts_theme_setup' );
function wptuts_theme_setup() {
// /wp-content/themes/theme-name/css/my-first-style.css
add_editor_style( array( 'css/my-first-style.css', 'css/my-second-style.css' ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment