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?
- add_action(), add_filter() before or after function
- How do filters and hooks really work in PHP
- Trouble understanding apply_filters()
- How would one modify the filtering Gutenberg applies to pasted content?
- Gutenberg: Is there a way to know if current block is inside InnerBlocks?
- How to add a custom CSS class to core blocks in Gutenberg editor?
- How many filter/action hooks are healthy?
- Filter specific shortcode output?
- Where to hook into post content?
- Valid characters for actions, hooks and filters
- How to hook into unregistering a widget instance?
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- What hook do I use to edit the post statuses option in admin?
- Filter hook before create order WooCommerce
- How to disable all WordPress emails modularly and programatically?
- apply_filters() slices away needed arguments
- How to add attribute to output with wp_video_shortcode add_filter
- How to change Woocommerce breadcrumbs content?
- Load different template file when condition met?
- How to enable visual editor when editing comments on the dashboard?
- Please explain me what the do_action does
- Filter all html output
- Can’t get wp_title filter working in twenty sixteen child theme
- Removing labels and tag on WordPress’s default login form
- How to trigger the core WPLANG to make automatically set a language when the theme is activated? [duplicate]
- How to add attributes to tag when template cannot be directly modified
- Too many actions/filters!
- Which hook is fired when inserting media into a post
- How does WordPress call functions attached to a certain action hook before calling functions attached to other hooks
- Customizing the default logout page of WordPress
- WordPress tag cloud add more links
- Use safety filters even if after applied intval?
- Why anything done on comments_array hook gets reset?
- How can I filter block registration based on post-type? (Block alignment settings)
- Is it possible to track down Actions and Filters?
- Yoast SEO hooks overriding themselves
- add filter login_redirect does not contain original requested redirect
- get_header and hook avoid normal call
- Question about how do wordpress filters/actions work
- How to center oEmbedded content
- How to add numeric slug for child page in WordPress 5.9?
- How to change the order (priority) of registered filters (or actions) (e.g. for the_content)?
- Filter taxonomy admin pagination
- WP action/filter to modify title before header output and article output?
- Using wp_handle_upload() to Direct Specific Path by Using $overrides
- Post Content, Special Characters and Filters
- How to filter for user registration, be able to throw error message
- Add default user field to WooCommerce checkout [closed]
- Customize title, description and focused keyword [closed]
- Filtering the post list in the admin area
- Proper after_setup_theme and wp_head cleanup
- How to check if a protected hook is hooked?
- How can I output all apply_filters and do_action?
- Disadvantage of using filters & hooks multiple times
- 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?
- Pass debug_backtrace() in WordPress filter
- How to override include_once pointed file using add_filter?
- Remove actions/filters that are set with create_function()
- Get The Caller (Plugin / Theme / Core) For All actions & Hook in WordPress
- comment_for() Custom fields not visible when user is logged in
- How to access page variable inside action hook
- I need to hook and change language of facebook sdk
- Use has_filter on comment_post
- 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
- BuddyPress – A hook available to hide custom born date on public profile view?
- ‘manage_users_custom_column’ is a filter, but ‘manage_posts_custom_column’ is an action. Why?
- 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
- Remove and replace woocommerce add to cart button [closed]
- 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
- Modify WordPress Page Title ()
- 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?
- Add Index to Item in WordPress Gallery
- Remove image of srcset
- Re-order search results with posts_orderby filter and post meta value
- How to append the excerpt to the content in the single post page?
- wp_editor customization
- Converting restricted html in comments to bbcode
- How to add a class to Buddypress avatars in the Activity stream? [closed]
- WooCommerce comments_template Filter Not Firing
- NextGEN Gallery: Adding drop-down menu widget to gallery view without modifying plugin code [closed]
- str_replace css meta tag?
- Can you call a filter hook by “add_action”?