You should be able to dequeue like normal. Despite the complexity of the function, it is really just enqueueing scripts and styles. Tested with the admin bar script on the front end:
add_action(
'wp_enqueue_scripts',
function() {
wp_dequeue_script('admin-bar');
}
);
You just want admin_enqueue_scripts
and set-post-thumbnail
:
add_action(
'admin_enqueue_scripts',
function() {
wp_dequeue_script('set-post-thumbnail');
}
);
I am not sure of the wisdom of dequeueing a Core script though. Be warned.
Related Posts:
- What are the benefits of using wp_enqueue_script?
- wp_register_script multiple identifiers?
- How do I enqueue(or delay loading of) tags in individual page posts?
- wp_enqueue_script adds only the first script
- Why is JavaScript being added to header as application/oembed?
- Javascript asset not enqueuing with the rest
- JavaScript Libraries in WordPress
- Setting Variable Path to Template Directory inside Script
- What does wp-embed.min.js do in WordPress 4.4?
- wp_add_inline_script without dependency
- How to use wordpress default Password Strength Meter script
- Register and enqueue conditional (browser-specific) javascript files?
- wp_enqueue_script() not working at all
- How to dequeue a script?
- Any advantage of using wp_scripts and is_IE when enqueuing scripts
- How to use wp_localize_script in custom page template?
- How to use Head JS with all enqueued scripts?
- wp_enqueue_script : how to change loading order of scripts?
- Remove extra Google Maps script
- What does wp-list.js do?
- Is it possible to enqueue the Youtube API script or does it have to be inline?
- Include jQuery UI as a whole
- How to echo JS right after enqueued script to put it into noConflict mode?
- Correct place to register and enqueue scripts
- Combine enqueue js without affecting dependencies
- How to get a jQuery script to run on a page?
- Load multiple Javascript scripts
- Editing Source Code in WordPress
- WP script versioning breaks cross-site caching?
- wp_localize_script with boolean and init
- require.js to load javascript
- wp_enqueue_script isn’t connecting my custom js file
- Including javascript for a shortcode
- TinyMCE in a div / textarea on frontend?
- How to add extra attributes to the script tag added via wp_localize_script()
- Javascript not included
- Include Javascript as Plain (No file inclusion)
- Move all the JS files to the bottom|footer, the right way
- Disable unneeded scripts in a wordpress installation
- Javascript not working?
- How to add JavaScript file using wp_enqueue_scripts?
- How to properly add Bootstrap and JQuery Javascripts?
- Is it mandatory to enqueue any kind of Javsacript?
- wp_enqueue_script & constants?
- Can the index.asset.php file be used with the enqueue_block_editor_assets action?
- My scripts-bundle.js file is getting sent to the browser as a stylesheet css file. Help!
- wp_enqueue_scripts is not working in my plugin
- How to place script in footer?
- Exclude JS file from 404 error page
- Why won’t my scripts load?
- Building a slide down search box in wordpress
- Enqueue script if screen is greater than 500
- Script Localization doesn’t work
- Enqueue Javascript After ALL Other Scripts (Including Async Scripts)
- Enqueue js script to footer
- Enqueueing a script and a style sheet not working
- Adding a Javascript slideshow to the home page
- Is there a way to check for an attribute of a script when using script_loader_tag?
- Enqueue scripts all over but not in single.php
- Media library not working with wp_editor() on the front end
- Override do_item() Function to Add Extra Attribute to Scripts
- Proper way to enqueue a generated script that isn’t in a .js file?
- Enqueue scripts based on browser width?
- wp_enqueue_script not loading my custom js file
- Correctly enqueue scripts of type=text/paperscript (PaperJs Library)
- Scripts not loading through function Method in WordPress Theme
- How to execute Javascript on a WordPress page?
- wp_enqueue_scripts not enqueing correctly
- Video script issue, JavaScript attribute remains ‘undefined’
- Javascript on Registration Page
- On click load iframe [closed]
- Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page [closed]
- Add crossorigin to SCRIPT tag
- Add script to page at certain location in wordpress
- WordPress wp_enqueue_script only adds text to top of page source
- Getting a variable inside foreach from PHP to JS after localization
- How do I know if I should enqueue JS code or just include it in ONE PHP function?
- Including Styles and JS files to work ON my plugin interface
- Linking wp_enqueue can’t find the javascript file (adds “?ver=x.x.x” to the src)
- Failing to load my script files in wordpress! i can’t figure out what i’m doing wrong
- wp_enqueue_script does not recognize my js file?
- Removing admin javascript
- wp_enqueue_script() not working
- What to include to use jQuery UI Auto Complete
- Bootstrap bundle present in page source but not working
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Get localize of a loaded javascript
- Dynamically add Js
- JS / jQuery in Elementor pages vs JS file
- Script widget works only in admin view but not in Public
- Load JavaScript on specific page with @wordpress compiler
- Add Paypal button redirect to a specific page after completing
- How to load Javascript code or functions.php later in a child theme?
- Enqueued script fails
- Script Loaded in WordPress but won’t run
- Error on clicking ‘Screen Options’ tab only at Products-related editor screen(s) and for specific user
- How to pass data to javascript in custom widget class
- Setting wp_enqueue_script correctly
- Why can I not deregister my style and script on custom post type?
- Loading two versions of same JS libary