What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Remove a WordPress block style with the API that matches how it was registered: use PHP unregister_block_style() for a server-registered style, or JavaScript wp.blocks.unregisterBlockStyle() for a client-registered style, including most styles supplied to the editor by core. Run PHP after the registration callback and run JavaScript inside wp.domReady() so the editor has finished registering its styles.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
What a block style variation is
In WordPress terminology, a block style variation (often shortened to block style) is an alternate presentation attached to an existing block. Selecting the style changes the block wrapper, usually by adding a class such as is-style-fancy-quote. The block remains the same block and keeps its normal attributes and content.
As an Amazon Associate I earn from qualifying purchases.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThat is different from a block variation. A block variation can provide different default attributes, inner blocks, or markup and is registered and removed with a different API. It is also different from a global style variation, which changes site-wide design settings, and from a stylesheet: unregistering a style does not delete CSS files or rules.
The first step is therefore to identify both the registration mechanism and the exact identifier. A label shown in the editor, such as “Hand-drawn,” is not necessarily the value passed to the API; the API needs the style slug, such as hand-drawn.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
A style is a registry entry, not a separate block type. The same block can continue to be inserted, edited, and saved after one of its styles is removed. Only the availability of the matching style option changes. This distinction helps explain why unregistration is usually a small code change but may still require a separate content or CSS decision.
Choose the removal method
| How the item was registered | Removal API | When to run it | Scope |
|---|---|---|---|
PHP register_block_style() |
unregister_block_style() |
On init, after the registering callback; a later priority is commonly required |
Server-side block-style registry |
JavaScript registerBlockStyle() |
wp.blocks.unregisterBlockStyle() |
Inside wp.domReady(), after editor scripts have loaded |
Client-side editor registry |
| A style supplied by the core editor | Usually JavaScript wp.blocks.unregisterBlockStyle() |
Enqueue an editor script and call it from wp.domReady() |
Editor UI |
| A block variation rather than a block style | wp.blocks.unregisterBlockVariation() |
After the variation has been registered | Variation registry, not the style registry |
PHP cannot remove a style that exists only in the browser’s JavaScript registry, and JavaScript cannot remove a style that was registered only on the server. If the wrong API is used, the call may return a failure value or appear to do nothing.
Recommended Free Tools
Compare more than the language used in your own snippet. A PHP theme may be trying to remove a style that a plugin adds with JavaScript, while a script may be targeting a style that a theme registered on init. Trace the original registration first, then choose the matching removal side and timing.
Unregister a PHP-registered block style
Use the exact block name and style slug
The PHP signature is unregister_block_style( string $block_name, string $block_style_name ): bool. Supply the namespaced block name, such as core/image, and the style slug, such as hand-drawn. The function returns true when a matching registered style is removed and false when no matching style was found.
<?php
add_action( 'init', 'mytheme_unregister_block_styles', 999 );
function mytheme_unregister_block_styles() {
unregister_block_style( 'core/image', 'hand-drawn' );
}
Place this code in a plugin or in the active theme’s PHP code. A child theme is preferable when the code belongs to a parent theme, because a parent-theme update can overwrite direct edits. The function was introduced in WordPress 5.3.0, so an installation older than that does not provide this API.
The return value is useful when diagnosing a stubborn entry. A return value of false means that the requested block-and-style pair was not found in the server-side registry at the moment the function ran. It does not prove that no similarly labeled style exists in the browser; a client-side registration can have a different slug or registration source.
Free tools Windows power users keep installed
One-click scans. No signup required.
Why the priority matters
WordPress executes callbacks attached to the same hook in priority order; lower numbers run first. A registration callback using the normal priority must run before the unregistering callback. Priority 999 is the pattern shown in the Theme Handbook for removing a style registered at the default priority. If the original registration uses another priority, match that arrangement: schedule the removal at a numerically later priority than the registration.
If the original code runs at a priority later than yours, your callback can execute too soon even though both functions use init. Find the actual add_action() priority and place the removal after it. If you control the registering code, an even cleaner solution is to stop calling register_block_style() in the first place. The unregister call is useful when the registration comes from a theme, plugin, or other code that you cannot edit.
Find the identifier before changing code
- Look for the
register_block_style()call and copy its first two arguments. - Use the block’s namespace and name, not the label displayed in the style picker.
- Use the style slug, not a translated label or the CSS class with
is-style-prepended. - Check for spelling, capitalization, and punctuation differences; identifiers must match the registered values.
For example, if registration uses core/image and hand-drawn, passing Image, core-image, or Hand-drawn does not target that entry. The CSS class is also not the argument: remove hand-drawn, not is-style-hand-drawn.
Unregister a JavaScript-registered style in the editor
Enqueue an editor script
Styles registered with JavaScript must be removed in JavaScript. Add an editor-only script through enqueue_block_editor_assets and declare the WordPress packages it uses:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
<?php
add_action( 'enqueue_block_editor_assets', 'mytheme_block_editor_assets' );
function mytheme_block_editor_assets() {
wp_enqueue_script(
'mytheme-block-editor',
get_theme_file_uri( 'assets/js/block-editor.js' ),
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ),
filemtime( get_theme_file_path( 'assets/js/block-editor.js' ) )
);
}
The documented dependency set for this pattern is wp-blocks, wp-dom-ready, and wp-edit-post. The last dependency ensures the script is loaded with the post editor package in the standard editor context. If your build or WordPress setup uses additional packages, declare those as dependencies too rather than relying on load order.
Because this hook targets editor assets, the removal is intended for the block editor rather than arbitrary front-end markup. Keep the script in an editor asset file and verify that it is actually loaded in the editing screen where the unwanted style appears.
Remove the style after registration
In assets/js/block-editor.js, wait for the editor’s DOM-ready event:
wp.domReady( function () {
wp.blocks.unregisterBlockStyle( 'core/quote', 'large' );
} );
wp.domReady() is important because an immediate call can run before the code that registers the style. In that race, the unregister call executes successfully as JavaScript but finds nothing to remove; the style then appears when registration runs later. Waiting for DOM ready gives the editor’s normal registration scripts time to finish.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsUse the same exact block name and style slug that were supplied to registerBlockStyle(). For example, core/quote identifies the Quote block and large identifies the style slug in the example. The human-readable text in the style picker is not a safe substitute.
After changing the file, reload the editor rather than relying on an already-open tab. A JavaScript syntax error or an earlier runtime error can stop execution before the unregister call; the browser console is the quickest way to distinguish that problem from a wrong slug or registration race.
Removing a core editor style
Core styles shown in the block editor are generally registered on the client side, so the JavaScript method is normally the appropriate one. Enqueue the editor script as above and call wp.blocks.unregisterBlockStyle() from wp.domReady(). A PHP call will not reach a style that core adds only after the editor loads in the browser.
Remove only the style you intend to hide. A core style may be used by existing content, theme CSS, or editorial documentation. Unregistering it prevents the option from being offered for new selections; it does not rewrite saved post content or remove the class already stored in a post.
If the style is still visible, inspect whether another plugin or theme adds a second registration with a different slug. Similar labels do not guarantee identical identifiers. Also confirm that the script is enqueued in the same editor context you are testing.
Do not confuse a block style with a block variation
The two APIs have similar names but operate on different registries:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
| Question | Block style | Block variation |
|---|---|---|
| What changes? | Usually the wrapper class and presentation | Defaults, attributes, inner blocks, or structure |
| Registration function | register_block_style() or registerBlockStyle() |
Variation registration APIs |
| Removal function | unregister_block_style() or unregisterBlockStyle() |
wp.blocks.unregisterBlockVariation() |
| Typical editor symptom | An option in the Styles panel | A different block setup, transform, or inserter option |
If selecting the item changes inner blocks or block attributes rather than simply applying a style class, investigate it as a variation. Calling a block-style unregister function on that item will not remove it.
The distinction also affects testing. A style removal should be checked in the block’s Styles panel, while a variation removal may require checking the inserter, transforms, default attributes, or generated inner blocks. Use the API that corresponds to the behavior you are trying to change, not merely the wording used by a theme’s settings screen.
What unregistering does—and does not do
It changes the registered editor options
Successful unregistration removes the matching style from the relevant registry. In practice, that removes the option from the editor for the targeted block when the editor reflects that registry.
The change is selective: the block itself remains available, and other styles remain registered. This makes unregistration suitable for removing one unwanted option without disabling the entire block.
It does not clean existing posts
Posts that already contain a class such as is-style-fancy-quote keep that class in their saved markup. The APIs do not search post content, alter attributes, migrate blocks, or remove CSS. Existing blocks can continue to display according to theme or plugin CSS even after the style is no longer offered in the picker.
If the goal is a content migration, treat it as a separate operation: identify affected posts, decide which replacement style or markup is appropriate, back up the database, and run a controlled migration. Do not assume that hiding the editor option performs that cleanup.
It does not remove stylesheets or CSS rules
Unregistration changes registration metadata, not files. CSS attached to the former style can remain enqueued, and a class already present in content can still match those rules. Remove or revise CSS separately only after checking whether older posts depend on it.
Conversely, deleting CSS first does not unregister the picker option. If you need both outcomes, handle registry removal and stylesheet cleanup as two explicit changes and test old content between them.
Troubleshooting when the style remains
The PHP call returns false
- Confirm that the style was registered with PHP, not with JavaScript.
- Check the namespace and slug character for character.
- Verify that the unregister callback runs after the registration callback on
init. - Check that the code is in the active plugin or theme and that the installation is WordPress 5.3.0 or newer.
Do not silently change to a JavaScript solution just because the return value is false. First establish whether the server registry ever contained that exact pair. A client-only style will not produce a successful PHP removal.
The JavaScript call appears to do nothing
- Confirm that the script is loaded in the block editor through
enqueue_block_editor_assets. - Check that
wp-blocks,wp-dom-ready, andwp-edit-postare declared dependencies. - Put the call inside
wp.domReady()so it does not race the registration code. - Verify that the style is registered client-side and that both identifiers match the registration values.
- Reload the editor after changing the script and check the browser console for JavaScript errors that stop execution before the unregister call.
If the option appears only in one editor, compare the asset hooks and registration source used by that editor. An editor script affects the context in which it is enqueued; it does not automatically alter every custom interface or front-end rendering.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
The item is still visible in one editor context
Check whether another plugin or theme registers the same or a similarly labeled style later. Two registrations can use different slugs while displaying similar labels. Also verify that you are testing the intended editor: an editor script affects the block editor where it is enqueued, not arbitrary front-end markup or a separate custom interface that maintains its own registry.
The option is gone but the visual style remains
This is expected when the post already contains the style class or when CSS is still loaded. Inspect the block’s saved markup and the stylesheet separately. Registration removal controls availability in the editor; it is not a CSS or content cleanup command.
The style disappears, then returns after an update
A theme or plugin update can change registration timing, slugs, or the editor asset that adds the style. Recheck the current registration call and keep the removal code in a child theme or plugin rather than editing an updateable parent file directly.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.A practical implementation checklist
- Open the code that creates the item and determine whether it calls PHP
register_block_style()or JavaScriptregisterBlockStyle(). - Record the exact namespaced block name and style slug from that call.
- If it is PHP, add
unregister_block_style()oninitwith a priority later than the registration. - If it is JavaScript, enqueue an editor script with the documented package dependencies.
- Call
wp.blocks.unregisterBlockStyle()insidewp.domReady(). - If the item changes attributes, inner blocks, or structure, switch to
wp.blocks.unregisterBlockVariation()instead. - Test a new block in the editor and separately inspect an existing post that used the old style.
- Leave CSS and content migration decisions separate from registry removal, and back up content before any bulk migration.
For a controlled rollout, test first in a development or staging copy, record the original registration source and slug, and then verify both a fresh block and a legacy post. This catches the most common mismatch: a successful editor change being mistaken for a content migration.
Version and registration details to keep in mind
unregister_block_style() has been available since WordPress 5.3.0. Later block-style registration capabilities have expanded; the Block Editor Handbook documents style_data support in WordPress 6.6. That registration data does not change the basic decision: remove a server registration with the PHP API and a client registration with the JavaScript API, using the same identifiers and correct timing.
Because registration can come from core, a theme, or a plugin, the reliable way to diagnose a stubborn style is to locate its registration source rather than trying both APIs at random. Once the source, slug, and execution timing align, the removal call is small; most failures come from one of those three details.
Frequently asked questions
How do I unregister a block style in WordPress?
Find how the style was registered. Use unregister_block_style() on init for a PHP registration, or enqueue an editor script and call wp.blocks.unregisterBlockStyle() inside wp.domReady() for a JavaScript registration.
Why does unregister_block_style() not remove a core style?
Most core editor styles are registered in the browser. The PHP function only removes styles registered on the server with register_block_style(). Use the JavaScript API with the exact block name and style slug.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →What is the difference between unregisterBlockStyle() and unregisterBlockVariation()?
The first removes a style option that normally changes presentation through a wrapper class. The second removes a block variation that can change attributes, inner blocks, structure, transforms, or inserter behavior.
Will unregistering remove the style from existing posts?
No. Existing saved classes and markup remain. Unregistration changes the editor registry; content migration and CSS cleanup require separate, deliberate work.
Best Value
Do I remove the is-style- class in the API call?
No. Pass the registered style slug without the prefix. If the class is is-style-hand-drawn, the API argument is normally hand-drawn, subject to the slug used by the registration code.
What WordPress version introduced the PHP function?
unregister_block_style() was introduced in WordPress 5.3.0. Confirm the site meets that minimum before using the function.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchCan I unregister a style by its displayed label?
No. Labels can be translated or duplicated. Use the exact namespaced block name and style slug from the registration call.
Why does the style disappear only after refreshing?
The editor may have loaded the registration before your changed script. Refresh the editor and ensure the removal call runs inside wp.domReady(); also check the browser console for errors.
Frequently Asked Questions
How do I unregister a block style in WordPress?
Match the API to the registration source: use PHP unregister_block_style() after the PHP registration on init, or JavaScript wp.blocks.unregisterBlockStyle() inside wp.domReady() for a client-side style.
Why does unregister_block_style() not remove a core style?
Core editor styles are generally registered in JavaScript. Remove them with wp.blocks.unregisterBlockStyle(), using the exact block name and style slug.
Recommended Free Tools
What is the difference between unregisterBlockStyle and unregisterBlockVariation?
A block style changes presentation, usually through a wrapper class. A block variation can change attributes, inner blocks, structure, transforms, or inserter behavior, so it uses wp.blocks.unregisterBlockVariation().
Will unregistering a style change existing posts?
No. Existing classes and saved markup remain. Unregistration hides the registered editor option; any content migration or CSS removal must be handled separately.
What WordPress version supports unregister_block_style()?
The PHP function was introduced in WordPress 5.3.0.
The Bottom Line
Identify the registration source first. Remove PHP-registered styles with unregister_block_style() after registration, and remove JavaScript or core editor styles with wp.blocks.unregisterBlockStyle() inside wp.domReady(). Match the exact namespace and slug, use the variation API for variations, and treat existing content and CSS as separate cleanup tasks.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




