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

Add plugin to set default HTTPS siteurl for new blogs

parent 49e2dd7e
Branches
No related tags found
No related merge requests found
<?php
/*
* Plugin Name: A/I - Default HTTPS siteurl
* Description: Set the default siteurl to HTTPS for new blogs
* Version: 0.0.1
* Author: Autistici/Inventati
* Author URI: https://autistici.org
*/
add_filter('wp_initialize_site_args', function($args, $site) {
$url = untrailingslashit('https://' . $site->domain . $site->path);
$args['options']['home'] = $url;
$args['options']['siteurl'] = $url;
return $args;
}, 10, 2);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment