Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPlugin: Populate demo content by default content filters #13553
Conversation
aduth
added some commits
Jan 28, 2019
aduth
added
the
[Component] Plugin
label
Jan 28, 2019
aduth
added this to In Progress
in Remove PHP
via automation
Jan 28, 2019
youknowriad
approved these changes
Jan 29, 2019
Works well on my testing |
youknowriad
added this to the 5.0 (Gutenberg) milestone
Jan 29, 2019
aduth
merged commit f84ceca
into
master
Jan 29, 2019
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
Remove PHP
automation
moved this from In Progress
to Done
Jan 29, 2019
aduth
deleted the
update/demo-initial-content-filters
branch
Jan 29, 2019
added a commit
that referenced
this pull request
Jan 30, 2019
Feb 4, 2019
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
aduth commentedJan 28, 2019
This pull request seeks to move handling of the demo content initialization from
gutenberg_editor_scripts_and_styles
to separate filter handlers in a new file dedicated for demo supports (one of the few PHP extensions Gutenberg will offer atop core from the initial 5.0 release). The reason for this change is to facilitate the removal ofgutenberg_editor_scripts_and_styles
. Core doesn't otherwise allow for filtering of the$initial_edits
it generates for editor initialization, but these can be alternatively provided through thedefault_content
anddefault_title
filters run byget_default_post_to_edit
(the function responsible for generating a new post to edit).Testing instructions:
Verify that the Gutenberg demo content is shown for a new post created via Gutenberg > Demo.
Verify that Gutenberg demo content is not shown for a new post created via Posts > Add New.
Verify that Gutenberg content is not considered even if manually adding a
&gutenberg-demo
query argument to the URL of any edited post.