Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
T5 Preset editor post content
* Plugin Name: T5 Preset editor post content
* Description: Default text for post content.
* Author: Thomas Scholz
* Author URI:
* Version: 2012.04.17.2
* See wp-admin/includes/post.php function get_default_post_to_edit()
* There are also the filters 'default_title' and 'default_excerpt'
add_filter( 'default_content', 't5_preset_editor_content', 10, 2 );
* Fills the default content for post type 'post' if it is not empty.
* @param string $content
* @param object $post
* @return string
function t5_preset_editor_content( $content, $post )
if ( '' !== $content or 'post' !== $post->post_type )
return $content;
return 'This is the <em>default</em> content. You may customize it.';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.