Disable external (3rd party) CALL (images,fonts..) in Dashboard

There’s no such constant in WordPress core that would allow you to that. As plugins and themes can do pretty much anything, it’s hard to detect such external calls. Also, only very few users actually run WordPress on a local install (mainly developers). Thus, this is not suitable for core according to the project’s philosophies and better left to plugins.

For example, Airplane Mode by Andrew Norcross accomplishes this very well. Currently implemented:

  • removes external JS and CSS files from loading
  • replaces all instances of Gravatar with a local image to remove external call
  • removes all HTTP requests
  • disables all WP update checks for core, themes, and plugins
  • includes toggle in admin bar for quick enable / disable

If you want to toggle such an offline mode via a constant defined in PHP (instead of a UI toggle), the WP Local Toolbox plugin has such a feature. Just put this in your wp-config.php file.

define('WPLT_AIRPLANE', 'true');

tech