Created
May 2, 2020 14:00
-
-
Save dotherightthing/8d1832cca6ca0a02759682204db1e541 to your computer and use it in GitHub Desktop.
Default editor content #wordpress #cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add default content to the editor | |
* | |
* @param string $post_content Post content. | |
* @uses http://www.wpbeginner.com/wp-tutorials/how-to-add-default-content-in-your-wordpress-post-editor/ | |
* @see https://developer.wordpress.org/reference/hooks/default_content/ | |
* @example | |
* add_filter( 'default_content', 'wpdtrt_default_content' ); | |
*/ | |
function wpdtrt_default_content( $post_content ) { | |
$post_content = 'TODO'; | |
return $post_content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment