WordPress Jetpack Proton CDN
-
Can someone with access to the code repository patch this code? The changes make wp_cycle fetches images from the free Jetpack Proton CDN.
function wp_cycle($args = array(), $content = null) {
global $wp_cycle_settings, $wp_cycle_images;// possible future use
$args = wp_parse_args($args, $wp_cycle_settings);$newline = “\n”; // line break
echo ‘<div id=”‘.$wp_cycle_settings[‘div’].'”>’.$newline;
foreach((array)$wp_cycle_images as $image => $data) {
if($data[‘image_links_to’])
echo ‘‘;$cycle_url = $data[‘file_url’];
if (function_exists( ‘jetpack_photon_url’ )) {
if(class_exists( ‘Jetpack’ ) && method_exists( ‘Jetpack’, ‘get_active_modules’ ) && in_array( ‘photon’, Jetpack::get_active_modules() )) {
$cycle_url = str_replace(‘https://’, ‘https://i0.wp.com/’, $data[‘file_url’]);
}
}
echo ‘<img src=”‘. $cycle_url .'” width=”‘.$wp_cycle_settings[‘img_width’].'” height=”‘.$wp_cycle_settings[‘img_height’].'” class=”‘.$data[‘id’].'” alt=”” />’;if($data[‘image_links_to’])
echo ‘‘;echo $newline;
}echo ‘</div>’.$newline;
}
- The topic ‘WordPress Jetpack Proton CDN’ is closed to new replies.