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?
- Objective Best Practices for Plugin Development? [closed]
- How do i best handle custom plugin page actions?
- How to create an API for my plugin?
- Plugins in symlinked directories?
- Plugin Form Submission Best Practice
- check if Gutenberg is currently in use
- Where to put third party PHP library?
- How to integrate a PHP webmail script into the backend of WordPress?
- Is There A Hook To Process The Content Of The Text Widget?
- How to log plugin errors to plugin error_log file
- How to save block attributes when the output doesn’t change
- How to remove unwanted panels inside InspectorControls from core blocks in Gutenberg
- Gutenberg ServerSideRender is deprecated, how to work with new wp.serverSideRender component?
- Custom theme sufficient or custom plugin neccessary for this feature set?
- When to check if a function exists
- Create Element From Dynamic HTML String [closed]
- creating elements/innerblocks via rangecontrol
- How to Parse an Array of Elements in Gutenberg Block
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- Nuance in adding CPT and TAX to a submenu
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- Using the component outside the editor. select(‘core’) is null
- Gutenberg is there a way to know if the current block is reusable?
- How to allow core Gutenberg blocks selection only when you are inside a custom inner block
- Saving data from block editor to the database
- How to create multiple Gutenberg blocks in one plugin
- How to get color name in PanelColorSettings in custom Gutenberg block?
- Adding functions to hooks from within a class
- Applying OO patterns and principles to plugin development
- Gutenberg Block showing invalid content on edit
- Gutenberg blocks not getting styled on back end
- Is it possible to change a term slug before being saved to the database?
- Maximum lifetime for nonce
- Add code inside specific wordpress standard function
- Create a free scripts and styles template within a plugin
- How to setAttributes in Gutenberg block?
- Best way to save custom css for an block
- How can I listen to events in Gutenberg block?
- It’s possible to passing a ref to FormTokenField from parent component using forwardRef?
- How can I turn a custom wordpress page into a product page?
- WP Gutenberg Blocks – How to limit first/root blocks
- Incorporate small angular feature in my wordpress site
- Gutenberg: import dependency or assign from global variable?
- How to Bind one post object Type with other postobject Type in Advanced Custom field [closed]
- Search: how to extend the existing search to include a custom table
- 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 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
- Plugin: database creation
- Loading Modernizr (or other JavaScript libraries) for use in a plugin
- Why in this archive page that call query_posts() function show only the last 10 posts?
- How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
- Logout after clicking URL link results in “headers already sent” error
- How to properly package a block plugin
- Converting core modification to a plugin
- How to replace settings in WordPress plugin from a theme
- Setting a post’s category
- Serial Number from custom table not appear in woocommerce_email_before_order_table action
- Modify custom block plugin without losing content
- How to override supports of innerBlocks?
- When setting styles to an extended block that was saved as a pattern, it doesn’t remove the style that was there
- extraprops override existing props
- How to create a custom post-new.php page for plugin , no wp menu
- Gutenberg block breaks when showing new data
- 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?
- why is apiFetch throwing Unhandled Promise Rejection: TypeError: Object is not a function
- Save meta box data from selected dropdown list in bbpress reply form
- Metabox types list
- Gutenberg component in a plugin admin
- How to integrate plugins into block editor
- Add custom html classes to gutenberg wrapper
- Create Customization panel for Plugins not for theme
- Add function to Dokan ajax class
- Managing Custom Designed Content
- Adding Meta box to thrid-party plugin
- Client Profiles
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- Undo operation not working in Rich text [Gutenberg]
- How can i add insertion point between inner blocks in my custom block like core blocks
- Extend WP_List_Table class – Edit wp_usermeta – WPPB.me Boilerplate – Action error
- Help interpreting @wordpress/create-block-tutorial-template usage error
- How can I add a custom button to the post editor?
- Block Development: hamburger module throwing error in save function
- Adding a navigation with wp_nav_menu() to a custom block in the site editor
- Why isn’t custom sidebar panel not showing up in the Gutenberg Editor?
- REST API error in block editor for custom templates
- Reinitiate Gutenburg’s blocks using javascript
- Set srcset on a block image