AdvancedCustomFields / AdvancedCustomFields/acf
Excluding ACF JS/CSS files from certain admin pages
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
ACF includes large JS files such as tinymc and thickbox, they add about 1.5MB of code, which slows down admin pages.
I'm trying to find a way to exclude them on certain admin pages. I'm afraid that if I just do wp_dequeue_script('thickbox') and wp_dequeue_script('editor') it'll break your other code that depends on it and cause blocking JS error.
Do you have a recommendation on how to exclude ACF JS and CSS files from certain admin pages? Or disable ACF entirely on certain admin pages? Something like:
if ($_GET['no_acf'] ) {
disable_acf();
}
Many thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by tracing how ACF enqueues its admin JavaScript and CSS dependencies, then determine whether a supported per-page exclusion or full disable mechanism can be defined; done means a documented, dependency-safe approach for selected admin pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript, php, wordpress
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100