blob: 9d5538734d7519ecc3af102af1b54b0b99b6fb02 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/**
* Top-level Publicize plugin for Gutenberg editor.
*
* Hooks into Gutenberg's PluginPrePublishPanel
* to display Jetpack's Publicize UI in the pre-publish flow.
*
* It also hooks into our dedicated Jetpack plugin sidebar and
* displays the Publicize UI there.
*/
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { PanelBody } from '@wordpress/components';
import { PluginPrePublishPanel } from '@wordpress/edit-post';
import { PostTypeSupportCheck } from '@wordpress/editor';
/**
* Internal dependencies
*/
import './editor.scss';
import './store';
import JetpackPluginSidebar from '../../shared/jetpack-plugin-sidebar';
import PublicizePanel from './panel';
export const name = 'publicize';
export const settings = {
render: () => (
<PostTypeSupportCheck supportKeys="publicize">
<JetpackPluginSidebar>
<PanelBody title={ __( 'Share this post', 'jetpack' ) }>
<PublicizePanel />
</PanelBody>
</JetpackPluginSidebar>
<PluginPrePublishPanel
initialOpen
id="publicize-title"
title={
<span id="publicize-defaults" key="publicize-title-span">
{ __( 'Share this post', 'jetpack' ) }
</span>
}
>
<PublicizePanel />
</PluginPrePublishPanel>
</PostTypeSupportCheck>
),
};
|