|
@@ -4,7 +4,7 @@ import { __ } from "@wordpress/i18n";
|
|
import { PanelBody, TextControl, TextareaControl } from "@wordpress/components";
|
|
import { PanelBody, TextControl, TextareaControl } from "@wordpress/components";
|
|
import { withSelect, withDispatch } from "@wordpress/data";
|
|
import { withSelect, withDispatch } from "@wordpress/data";
|
|
|
|
|
|
-let PluginMetaFields = (props) => {
|
|
|
|
|
|
+let PluginMetaFields_media_url = (props) => {
|
|
return (
|
|
return (
|
|
<>
|
|
<>
|
|
<PanelBody
|
|
<PanelBody
|
|
@@ -63,10 +63,10 @@ PluginMetaFields_poster_image_url = withSelect(
|
|
})(PluginMetaFields_poster_image_url);
|
|
})(PluginMetaFields_poster_image_url);
|
|
|
|
|
|
PluginMetaFields_poster_image_url = withDispatch(
|
|
PluginMetaFields_poster_image_url = withDispatch(
|
|
-(dispatch) => { return {
|
|
|
|
- onMetaFieldChange_poster_image_url: (value) => {
|
|
|
|
- dispatch('core/editor').editPost({meta: {dwp23_poster_url_meta: value}})
|
|
|
|
- }
|
|
|
|
|
|
+ (dispatch) => { return {
|
|
|
|
+ onMetaFieldChange_poster_image_url: (value) => {
|
|
|
|
+ dispatch('core/editor').editPost({meta: {dwp23_poster_url_meta: value}})
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})(PluginMetaFields_poster_image_url);
|
|
})(PluginMetaFields_poster_image_url);
|
|
|
|
|
|
@@ -84,8 +84,8 @@ registerPlugin( 'dwp-guten-sidebar', {
|
|
name="dwp-guten-sidebar"
|
|
name="dwp-guten-sidebar"
|
|
title={__('Post Meta', 'textdomain')}
|
|
title={__('Post Meta', 'textdomain')}
|
|
>
|
|
>
|
|
- <PluginMetaFields />
|
|
|
|
- <PluginMetaFields_featured_image_url />
|
|
|
|
|
|
+ <PluginMetaFields_media_url />
|
|
|
|
+ <PluginMetaFields_poster_image_url />
|
|
</PluginSidebar>
|
|
</PluginSidebar>
|
|
</>
|
|
</>
|
|
)}
|
|
)}
|