Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#37659 closed feature request (wontfix)

Constant to disable 3rd party loading

Reported by: tazotodua's profile tazotodua Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: HTTP API Keywords:
Focuses: Cc:

Change History (4)

#1 @swissspidy
8 years ago

  • Summary changed from CONSTANT to Disable 3rd party loading to Constant to disable 3rd party loading

Copying my answer from WPSE here:

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.

#2 @SergeyBiryukov
8 years ago

  • Component changed from General to Bootstrap/Load

Previously: #29619

#3 @SergeyBiryukov
8 years ago

  • Component changed from Bootstrap/Load to HTTP API

#4 @pento
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

@swissspidy's comment is correct - this feature isn't appropriate for Core, there are several plugins that will do what you need.

Note: See TracTickets for help on using tickets.