A few parameters need tweaking in midstory_fade_animation_script_register()
:
function midstory_fade_animation_script_register() {
// Handle, script location, dependecies, version, in footer boolean
wp_enqueue_script( 'midstory-animation-fade-block', plugin_dir_url( __FILE__ ) . '/midstory_animation_fade.js', array( 'wp-blocks', 'wp-i18n', 'wp-editor' ), '1.0.1', false );
}
- The script location needs a slash between the plugin folder and the filename.
- What you were calling “WordPress refresh?” is for a version number.
That will get your block showing up as an option to add in the Editor. Beyond that, you should look into wordpress/element rather than calling React directly as WordPress has built wrappers around its functionality.
Related Posts:
- How to use PanelColorSettings in custom Gutenberg block?
- Using Primary Color in Plugin Block
- ServerSideRender and Media Object: attributes passing image data object to php renderer even though it’s not set
- Where to save Gutenberg plugin data?
- Custom Gutenberg Block ‘Stylized List’ – Incorrect Rendering and Looping of List Items
- Is there documentation reference for forms in menu and setting pages?
- Gutenberg table block with Bootstrap .table class
- Enqueue script globally
- How to control an elements classes from multiple Gutenberg sidebar controls?
- How to modify files inside wp-includes directory in wordpress
- How should I go about registering JavaScript that isn’t a file? [duplicate]
- How to add a gradient component to a custom block
- Custom entity search and display
- How to set a cookie for logged in users to md5($user->ID . “my_secret”)?
- Plugin: database creation
- Loading Modernizr (or other JavaScript libraries) for use in a plugin
- How to only load css for used blocks on frontend
- Additional classes `undefined` after saving post in Gutenberg
- How do you submit a Gutenberg plugin?
- Show message from backend
- Why in this archive page that call query_posts() function show only the last 10 posts?
- Create Widget or Enable Shortcodes in Sidebar
- Catching Gutenberg sidebar switch event
- Invalid hook call on save, not edit when using swiper slider
- Proper way to use useSelect
- Use npm and wp-env to make production bundle
- How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
- How to save post meta as an array in Gutenberg?
- How to use apiFetch to get author information in Gutenberg properly?
- Gutenberg blocks error: Each child in a list should have a unique “key” prop
- Logout after clicking URL link results in “headers already sent” error
- How to properly package a block plugin
- Setting global block attribute value
- Developing the save function in Gutenberg blocks
- WordPress Gutenberg InnerBlocks renderAppender not showing with template
- Gutenberg – is it ok to load dependencies multiple times?
- Preventing double loading JS scripts (like React) when developing for Gutenberg
- how to save wp_editor html content in options table
- Converting core modification to a plugin
- How to use a WP_Customize_Control outside of the Customizer?
- How to replace settings in WordPress plugin from a theme
- How to remove/replace current page template?
- Setting a post’s category
- Extract Information from post content (using regex?)
- How to determine which capability to use?
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- Modify custom block plugin without losing content
- Customise Grouped Product display in Woocommerce with custom column
- Console errors in 6.0-RC1 Widget screen
- Custom Block Not Shown in Block Inserter
- How to override supports of innerBlocks?
- How to use attributes in competent of Gutenberg
- var(–text-color) in style.scss works once but not twitch
- Custom Endpoint – Does it possible to use PUT method with WP API Rest?
- Why won’t this submenu page show? – My First WordPress Plugin
- When setting styles to an extended block that was saved as a pattern, it doesn’t remove the style that was there
- wordpress full site editing problem when extending core blocks
- Pass custom props to
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- extraprops override existing props
- Trigger function on Remove block or add new block in Gutenberg JavaScript
- How to create a custom post-new.php page for plugin , no wp menu
- WPGut – Updating failed and shortcode?
- Rerender core Templates with with ToggleControl but it doesnt recognize block type
- Gutenberg – Call google map render function in save after DOM has been rendered
- Gutenberg block breaks when showing new data
- HTMLCollection not counting right in editor? / for loop not working on elements in DOM
- What happens/fires when you select a block in the editor?
- Want to know how to reveal a WordPress theme, considering the theme name is hidden?
- Is “document loaded” different on admin side than public side?
- How to re-render inspector controls?
- How to use setAttributes outside of the edit function return
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Where do I hook to have the server do something in PHP on block attribute change?
- Reading plugin settings in esnext wordpress block
- Get value of custom checkbox from Gutenberg sidebar in plugin
- Save meta box data from selected dropdown list in bbpress reply form
- Metabox types list
- WordPress how do I echo SUM from a column of a MySQL table by user id AND type_operation
- Rate limiting ajax requests in WordPress
- Gutenberg component in a plugin admin
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- How to integrate plugins into block editor
- Add custom html classes to gutenberg wrapper
- How to get access the ID of all posts of custom post type in Gutenberg editor
- How to prevent users from deleting their accounts?
- How to create save function for custom Gutenberg style block?
- Hiding class namespace from plugin’s extensions
- Set widget icon in Customizer?
- Create Customization panel for Plugins not for theme
- Determine if the current page, is being edited
- WordPress delete mysql rows with string
- external Integration with wordpress timeout error
- Add function to Dokan ajax class
- PHP includes with AJAX actions
- Making adding info to an overlay bio easy for average user?
- Implementing Select2 plugin into WordPress
- Custom Post Type and Functions
- Associating special meaning with user id 0
- Managing Custom Designed Content