Jetpack Bildiğiniz Üzere Aşırı Derecede Sistemi Yoran ve Kaynak Tüketen Bir Eklenti Ancak İçerisindeki Ücretsiz CDN Özelliği Gerçekten Çok Faydalı.

Sadece CDN'i Kullanabileceğiniz bir Eklentiyi Aşşağıya Bırakıyorum.




KURULUM :
Aşşağıdaki kodu bir php dosyasına kaydedin.
Kaydettiğiniz PHP Dosyasını Zipleyip Wordpress'den Eklenti Yükleden Yükleyin ve Aktifleştirin.




Ben Beceremem Diyenler İçin


Eklentiyi İndir :
İNDİR


<?php
/**
 * Plugin Name: Ücretsiz Photon CDN
 * Version:     1.5
 * Description: Jetpacksiz Ücretsiz CDN
 * Author:      ReckRaez
 */
namespace zacscott;
/**
 *
 * @author https://www.r10.net/profil/110992-reckraez.html
 */
class PhotonCDN {

    const MAXSRV = 4;
    function __construct() {
        add_action( 'wp_head', array( $this, 'dns_prefetch' ) );
        add_action( 'template_redirect', array( $this, 'start_buffering' ) );
    }
    function dns_prefetch() {
        for ( $srv = 0; $srv < self::MAXSRV; $srv++ ) :
            $domain = "i{$srv}.wp.com";
            ?>
            <link rel='dns-prefetch' href='//<?php echo esc_attr( $domain ) ?>' />
            <?php
        endfor;
    }
    function start_buffering() {
        ob_start( array( $this, 'process_output' ) );
    }
    function process_output( $buffer ) {
        $content_url = content_url();
        $content_url = str_replace( 'http://', '', $content_url );
        $content_url = str_replace( 'https://', '', $content_url );
        return preg_replace_callback(
            '{'. $content_url .'/.+\.(jpg|jpeg|png|gif|ico|bmp)}i',
            array( $this, 'replace' ),
            $buffer
        );
    }
    function replace( $matches ) {
        $url = isset( $matches[0] ) ? $matches[0] : '';
        srand( crc32( $url ) );
        $server = rand( 0, self::MAXSRV-1 );
        return "i{$server}.wp.com/{$url}";
    }
}
new PhotonCDN();