-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Create separate New Post / Demo submenus #1065
Conversation
* | ||
* @param {String} id Unique identifier for editor instance | ||
* @param {Object} post API entity for post to edit | ||
*/ |
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.
Should the documentation match the one changed above?
Bootstrapped post object
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.
Argh, I totally overlooked this comment. Yes, it probably should.
@@ -273,10 +273,12 @@ function gutenberg_register_vendor_script( $handle, $src, $deps = array() ) { | |||
* @param string $hook Screen name. | |||
*/ | |||
function gutenberg_scripts_and_styles( $hook ) { | |||
if ( 'toplevel_page_gutenberg' !== $hook ) { | |||
if ( ! preg_match( '/(toplevel|gutenberg)_page_gutenberg(-demo)?/', $hook, $page_match ) ) { |
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 100% sure but somehow my browser tried loading all of the Gutenberg scripts when not on Gutenberg, when logging into WP-Admin. I haven't been able to reproduce yet, so I will check this out again in a bit.
Update: Can't reproduce, should be fine.
Check, check, and check. 👍 |
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.
I think this is good to go 👍
Longer term, maybe we should drop the "Gutenberg Menu" and move these links under "Posts":
Posts
-> All (highlighted when editing on guteberg too)
-> Add New
-> Add New Gutenberg Post
-> Add New Gutenberg Demo Post
(Same for other Post Types)
Thanks both! |
Closes #1000
This pull request seeks to enable creating new posts, separating Demo to a submenu item of the top-level Gutenberg menu item.
Testing instructions:
Verify that...