AdvancedCustomFields / AdvancedCustomFields/acf

Excluding ACF JS/CSS files from certain admin pages

Open
#55 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.