From d45a068bf6fc5e4fe4c2a6be313a5343053f213a Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Sat, 24 Dec 2022 20:06:36 +0100 Subject: [PATCH] spacing" --- cdn-loader.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cdn-loader.php b/cdn-loader.php index 9211b9a..7a816ac 100644 --- a/cdn-loader.php +++ b/cdn-loader.php @@ -5,7 +5,7 @@ Description: This plugin will load your assets from a given CDN instead of the l Author: Danny van Kooten Version: 1.0.1 Author URI: https://dannyvankooten.com/ - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,28 +22,28 @@ along with this program. If not, see . */ if( ! defined( 'ABSPATH' ) ) { - exit; + exit; } add_action( 'template_redirect', function() { - // Don't run if SCRIPT_DEBUG is set to true - if( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { - return; - } + // Don't run if SCRIPT_DEBUG is set to true + if( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { + return; + } - if( ! defined( 'DVK_CDN_URL' ) ) { - return; - } + if( ! defined( 'DVK_CDN_URL' ) ) { + return; + } - // get url of cdn & site - $cdn_url = DVK_CDN_URL; - $site_url = get_home_url(); + // get url of cdn & site + $cdn_url = DVK_CDN_URL; + $site_url = get_home_url(); $url_replacer = function( $url ) use ( $cdn_url, $site_url ) { return str_replace( $site_url, $cdn_url, $url ); }; - // add rewrite filters for plugin & theme assets + // add rewrite filters for plugin & theme assets add_filter( 'theme_root_uri', $url_replacer, 99, 1 ); add_filter( 'plugins_url', $url_replacer, 99, 1 ); -- 2.45.2