From the documentation:
Prepend and append to the panel contents:
var el = wp.element.createElement; function wrapPostFeaturedImage( OriginalComponent ) { return function( props ) { return ( el( wp.element.Fragment, {}, 'Prepend above', el( OriginalComponent, props ), 'Append below' ) ); } } wp.hooks.addFilter( 'editor.PostFeaturedImage', 'my-plugin/wrap-post-featured-image', wrapPostFeaturedImage );
So did you intentionally not using wp.element.Fragment
?
You may also want to check the example here:
Related Posts:
- Gutenberg disable the “block” tab in right sidebar
- How to change the order of HTML output of a core block?
- Gutenberg – Add align controls to a custom block
- Better extend a class or use add filter/action hooks?
- Detect when gutenberg editor title is available in Dom after editor load
- Set default value for “Additional CSS class(es)” for specific block types
- How to check which submission button was clicked?
- “Invalid parameter(s): attributes” issue in context of “blocks.registerBlockType” filter
- Core/Image access caption in render_template and in wp.hooks
- Ship block templates or block template parts with plugins
- How can I output all apply_filters and do_action?
- Is it possible to bind a function to a filter hook via Ajax?
- Disadvantage of using filters & hooks multiple times
- How do I hook my function to run only after submitting login form
- Admin post list – adding an option to the date filter dropdown
- Modify message displayed on post save
- How to add a filter to the get_body_class function?
- Prepending character(s) to a custom tag title?
- Change custom post type GUID in RSS
- Pass debug_backtrace() in WordPress filter
- How to hide/remove GhostKit component panel in gutenberg block inspector
- filter hook to load a different post/page on current post/page
- Modify existing plugin function with add_filter
- How to override include_once pointed file using add_filter?
- Filter for author list in gutenberg core editor
- Remove actions/filters that are set with create_function()
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- Remove tags without a specific meta key from “choose from the most used tags”
- Redirect to woocommerce checkout after adding to cart – item already in cart
- comment_for() Custom fields not visible when user is logged in
- How to access page variable inside action hook
- What is the action hook to use if you want to capture the new password during password change?
- How to append custom text to the output of ‘categories widget’?
- I need to hook and change language of facebook sdk
- Use has_filter on comment_post
- How can I edit comment meta value before it is saved?
- How To Get Search Term and Use in Function
- Renaming wordpress login and get new password button
- Is this hook really deprecated? ( manage_{$taxonomy}_custom_column )
- Hook in a sidebar widget and add some markup
- an action hook when a post reaches a certain number of views
- WordPress overwrites UNC
- Action hook to control access to certain parts of my site
- Need to return shortcode text instead of the output
- Where exactly does the edit_{taxonomy} hook fire?
- BuddyPress – A hook available to hide custom born date on public profile view?
- Is there any reason for the nested filters to be applied on the first case and not in the second one?
- Same URL for portfolio and for a page creates 404 error. Is there any filter that i can use for a child page?
- Replace Data In Post & Update Meta Field Post Is Saved
- Filter Media by attached page or blog post in Library
- ‘manage_users_custom_column’ is a filter, but ‘manage_posts_custom_column’ is an action. Why?
- How to optionally append components to the output of a gutenberg block?
- How do I add a line break to a string that is output by PHP?
- Scanning for custom embed and prefetching
- The gettext hook doesnt work on text with links
- How to make WordPress search page use a relative path
- Problem width wp_insert_post_data and Gutenberg block editor
- Filter widget_posts_args not working
- How to add custom media library mime icons?
- Filter the title to only affect the_title() template function
- Remove and replace woocommerce add to cart button [closed]
- style_loader_tag not changing stylesheet to preload
- How can I filter the comment action links so that I can display the actions links based on user capabilities?
- WordPress Gutenberg core/heading block (wp-block-heading)
- Changing the category for existing Gutenberg blocks
- Hook to change the site URL
- Save_post – Warning: Cannot modify header information
- How do I check if I can use the allowed_block_types filter?
- Modify WordPress Page Title ()
- Add an attribute to the root from functions.php with add_filter
- Would like to use hook or filters to customize email templates
- Hook to add content after date in post?
- How to add lazy field in content endpoint using Gutenberg blocks
- Is it possible to assign a css id to a row in plugins list table?
- Right filter for rewriting page statuscode
- Add filter return false not working
- Add Index to Item in WordPress Gallery
- Remove image of srcset
- Re-order search results with posts_orderby filter and post meta value
- Security question – Display a General Custom Login Error Message
- Customize plugin templates
- Filter wp_mail based on content type
- Add HTML to the bottom of each post in a post list
- get_the_archive_title hook unwanted changes!
- How to append the excerpt to the content in the single post page?
- How to filter wp_get_recent_posts() to only posts that have thumbnails?
- Hook inside a hook
- Incrementing content with extra text after save/publish
- Adding user filter – Not updating data in URL
- wp_editor customization
- Converting restricted html in comments to bbcode
- Why none of xmlrpc filters work
- WP Dashboard -> Posts-> Filter by Category -> Form Method Change : Which Hook
- How to add a class to Buddypress avatars in the Activity stream? [closed]
- Hide H1 Title using the_title filter
- Add class to all parent elements inside the_content
- Which hook should be used in this case?
- Filter dashboard custom post listing by user
- Getting entry ID from frm_email_message filter in formidable
- WooCommerce comments_template Filter Not Firing