-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforce-new-site-options.php
More file actions
47 lines (39 loc) · 1.56 KB
/
force-new-site-options.php
File metadata and controls
47 lines (39 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* @package Force-Settings-for-New-Sites
* @version 2.0.1
*
* Plugin Name: Force Settings for New Sites
* Description: This plugin makes changes to the settings when a new site is created on a MU installation.
* Plugin URI: https://boofolaworks.com/wordpress/plugins/mu-multisite-plugins/
* Version: 2.0.1
* Author: BOOFOLA LLC
* Author URI: https://boofolallc.com/
* License: GPLv2 or later
* Text Domain: mu-multisite-plugins
*
* @package BoofolaWorks Must-Use Multisite Plugins
* @category Settings
*
* This plugin is created as free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This plugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/* Start Adding Functions Below this Line */
// Force Uploads Use Yearmonth to off (0) for all existing sites in Multisites:
add_filter( 'option_uploads_use_yearmonth_folders', '__return_false', 100 );
/* Sets permalink structure for each blog activation */
add_action('activate_blog', 'wpse_271662_set_permalinks');
function wpse_271662_set_permalinks() {
global $wp_rewrite;
$wp_rewrite->set_permalink_structure('/%postname%/');
$wp_rewrite->flush_rules();
}
/* Stop Adding Functions Below this Line */
?>