Opened 6 years ago
Closed 6 years ago
#44746 closed defect (bug) (invalid)
Default title and content are not reflected in new editing.
Reported by: | tmatsuur | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.8 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
I set the initial content using the 'default_content' filter in my plugin, but it will not work as intended.
In the get_default_post_to_edit function, although run the 'default_content' filter after saving empty post data, it seems that this is not reflected in the new editor.
Experimentally, set 'Hello' to post_title, set 'World' to post_content and updated post data after 'default_title' filter.
As a result, the title of the new editor was left empty, but 'World' was reflected in the content part.
I thought that the 'default_content' and 'default_title' filters are not working properly with the new editor.
Change History (3)
#2
in reply to:
↑ 1
@
6 years ago
Replying to swissspidy:
I assume with new editor you are referring to Gutenberg?
If so, Gutenberg does not use
get_default_post_to_edit()
so your filters have no effect. It might be worth exploring though.
In any case, since Gutenberg isn't part of WordPress core yet, we're tracking issues on GitHub instead: https://github.com/WordPress/gutenberg. Feel free to open an issue there.
Thank you for comment.
As you pointed out, this will be a bug related to Gutenberg.
I follow the advice and I will look at the issue of GitHub.
I assume with new editor you are referring to Gutenberg?
If so, Gutenberg does not use
get_default_post_to_edit()
so your filters have no effect. It might be worth exploring though.In any case, since Gutenberg isn't part of WordPress core yet, we're tracking issues on GitHub instead: https://github.com/WordPress/gutenberg. Feel free to open an issue there.