-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add option to skip PublishSidebar on publishing #9760
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
Changes from 1 commit
b7cc241
e3f0c24
85edadc
0488595
14ea423
f4c237e
1a00c13
c659529
e888220
b3e9fa8
f78a332
3e2877f
dbd6090
ea5dc6a
afae18d
2f45e20
7bfc2a5
c65ea7c
18036e2
c37b6a8
d1c69c5
1be0b54
79ced01
78ebeec
87b372d
acffe70
37900cc
6637b7e
d7c7151
b50ca1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { PostPublishPanelToggle, PostPublishButton } from '@wordpress/editor'; | ||
|
|
||
| const PublishButton = function( { | ||
|
||
| isSidebarOpen, | ||
| isSidebarEnabled, | ||
| onToggle, | ||
| forceIsDirty, | ||
| forceIsSaving } ) { | ||
|
||
| if ( isSidebarEnabled ) { | ||
| return ( | ||
| <PostPublishPanelToggle | ||
| isSidebarOpen={ isSidebarOpen } | ||
| onToggle={ onToggle } | ||
| forceIsDirty={ forceIsDirty } | ||
| forceIsSaving={ forceIsSaving } | ||
| /> | ||
| ); | ||
| } | ||
| return <PostPublishButton | ||
| forceIsDirty={ forceIsDirty } | ||
| forceIsSaving={ forceIsSaving } | ||
| />; | ||
| }; | ||
|
|
||
| export default PublishButton; | ||
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.
Any reason for using
function() {over() => {? We just tend toward fat-arrow functions in the codebase, so it stood out.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.
4acd0c5