-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpermalink_setter.php
More file actions
40 lines (36 loc) · 1.28 KB
/
permalink_setter.php
File metadata and controls
40 lines (36 loc) · 1.28 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
<?php
/**
* @package Permalink_Setter
* @version 2.0.1
*
* Plugin name: Permalink Setter
* Plugin URI: https://boofolaworks.com/wordpress/plugins/mu-multisite-plugins/
* Description: Sets permalink structure for each blog activation
* 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 */
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 */
?>