/** * Our photon hook prefix as this plugin supports both Jetpack Photon and My-Photon * @return string. (Either 'jetpack' or 'my'); */ function photonfill_hook_prefix() { // If photon module is active, then use it over my photon. if (class_exists('Jetpack') && Jetpack::is_module_active('photon')) { return 'jetpack'; } elseif (class_exists('My_Photon_Settings') && My_Photon_Settings::get('active')) { return 'my'; } return 'jetpack'; }
/** * Our photon hook prefix as this plugin supports both Jetpack Photon and My-Photon * @return string. (Either 'jetpack' or 'my'); */ function photonfill_hook_prefix() { // If photon module is active, then use it over my photon. $prefix = 'jetpack'; if (class_exists('Jetpack') && Jetpack::is_module_active('photon')) { $prefix = 'jetpack'; } elseif (class_exists('My_Photon_Settings') && My_Photon_Settings::get('active')) { $prefix = 'my'; } // This setting fails under certain circumstances, like with VIP Go mu-plugins, so a filter is necessary. return apply_filters('photonfill_hook_prefix', $prefix); }