Skip to content
Snippets Groups Projects
Commit 50039745 authored by ale's avatar ale
Browse files

Add force-cdn-settings plugin

Set some WP SuperCache CDN options site-wide (to hard-coded constants
-- this is improvable).

See issue noblogs-composer#24 for further details.
parent 09be19c6
No related branches found
Tags v0.4.8
No related merge requests found
Pipeline #31833 passed
<?php
/*
* Plugin Name: A/I - Force CDN settings
* Description: Forces the WP SuperCache CDN settings to be the same for all sites.
* Version: 0.0.1
* Author: Autistici/Inventati
* Author URI: https://autistici.org
*/
function force_cdn_setting_url() {
return 'https://noblogs.ai-cdn.net';
}
add_filter('pre_option_ossdl_off_cdn_url', 'force_cdn_setting_url');
function force_cdn_setting_include_dirs() {
return 'wp-content,wp-includes';
}
add_filter('pre_option_ossdl_include_dirs', 'force_cdn_setting_include_dirs');
function force_cdn_setting_exclude() {
return '.php,blogs.dir,openpgp';
}
add_filter('pre_option_ossdl_exclude', 'force_cdn_setting_exclude');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment