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.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Set editor rendering mode by post type #62304
Feature: Set editor rendering mode by post type #62304
Changes from 18 commits
ab4b075
ca0de5d
3beef1e
9b276d2
a26a583
b538ae6
e3912d4
702a5be
964a148
aabbca8
c9f2274
298c858
d85f56c
9c631fe
de00c45
bf3fbca
5c98bf6
40c2fa3
c2b1f92
1f7ff09
40ce652
b361cd5
24118c7
a0a766c
882f69c
a2ac4b3
3496d55
65c264b
a27c07e
ac9556d
148837e
3619aed
b080013
c07a005
42bbbae
f38b926
5d9a3f4
4967bf0
e44556d
7e72459
1b18340
a55cd68
429b338
d523598
41601ec
05abd41
4904b5a
40d7324
c2d58a9
9e8e08c
b94e309
a742e4a
fcb1449
ec543c5
2aa288d
f0c680f
557ec18
9068ab1
4512fce
f282a47
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker, just a question - I'm assuming that this will be
wp_rendering_modes
orrendering_modes
when it eventually makes it to Core.What about making the name be more specific, e.g.,
gutenberg_post_type_rendering_modes
or evengutenberg_get_post_type_rendering_modes
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question, and I assume you're correct about it being renamed to
wp_rendering_modes
in Core.I think it makes sense to prefix it with post_type_ so the final function would be
wp_post_type_rendering_modes()
I'm also not opposed to using
get_
in the prefix, if the general that's the general consensus. In the meantime I've updated it to usegutenberg_post_type_rendering_modes()
-- happy to update again if necessary!Check failure on line 20 in lib/compat/wordpress-6.7/post.php
GitHub Actions / PHP coding standards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabiankaegy Is the addition of the dependencies here in relation to the current PR or was it done just to please the linter?
This is creating a bug when the post object is update, the setup happens again and initial edits are applied again even if they shouldn't be.