import { __ } from '@wordpress/i18n'; import { registerBlockType } from '@wordpress/blocks'; import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; import { CheckboxControl, PanelBody, RangeControl, SelectControl, TextControl } from '@wordpress/components'; import ServerSideRender from '@wordpress/server-side-render'; registerBlockType( 'friends/friend-posts', { apiVersion: 2, edit: function( { attributes, setAttributes } ) { const blockProps = useBlockProps(); return ( <> setAttributes( { author_name } ) } /> setAttributes( { author_avatar } ) } /> setAttributes( { author_inline } ) } /> setAttributes( { show_date } ) } /> setAttributes( { count } ) } min={ 1 } max={ 100 } /> setAttributes( { exclude_users } ) } /> setAttributes( { only_users } ) } /> setAttributes( { internal_link } ) } />
); }, save() { return null; }, } );