vip-scanner icon indicating copy to clipboard operation
vip-scanner copied to clipboard

Notify/warn about Jetpack::is_module_active

Open kraftbj opened this issue 10 years ago • 1 comments

In the dev environment, to check if Photon is active, Jetpack::is_module_active() is used since the Photon functions are always available.

On WP.com, that function doesn't exist and will fatal. Idea: Throw a note to remind devs of this?

kraftbj avatar Nov 20 '14 16:11 kraftbj

Just a note that this is what I've had to do to ensure the code runs fine on dev environments and .com:

if ( class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'photon' ) ) {

philiparthurmoore avatar Dec 29 '14 05:12 philiparthurmoore