[wp-trac] [WordPress Trac] #37659: Constant to disable 3rd party loading (was: CONSTANT to Disable 3rd party loading)

WordPress Trac noreply at wordpress.org
Sun Aug 14 17:50:00 UTC 2016


#37659: Constant to disable 3rd party loading
-----------------------------+------------------------------
 Reporter:  tazotodua        |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------

Comment (by swissspidy):

 Copying [http://wordpress.stackexchange.com/questions/235933/disable-
 external-3rd-party-call-images-fonts-in-dashboard/235934#235934 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 [https://wordpress.org/about/philosophy/ the project's
 philosophies] and better left to plugins.

 For example, [https://github.com/norcross/airplane-mode 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 [https://wordpress.org/plugins/wp-local-
 toolbox/ WP Local Toolbox] plugin has such a feature. Just put this in
 your wp-config.php file.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37659#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list