default_content WordPress Filter Hook

The default_content Wordpress hook is used to set the default content for new posts and pages. This hook is useful for setting a default template or content for new posts and pages.

apply_filters( 'default_content', string $post_content, WP_Post $post ) #

Filters the default post content initially used in the “Write Post” form.


Parameters

$post_content

(string)Default post content.

$post

(WP_Post)Post object.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More