Flush rewrite rules network-wide when network-activated#37
Flush rewrite rules network-wide when network-activated#37westonruter merged 6 commits intodevelopfrom
Conversation
|
@kucrut you mentioned on Skype the proper-network-activation plugin. Great find! The plugin README should get updated to note that this plugin should be installed and network-activated before attempting to network-activate Dependency Minification. Also as we discussed, it would be awesome to filter the Your proposed solution (via Otto) to remove the rewrite rule upon deactivation is great: static function deactivate() {
$regex = sprintf( '^%s/%s', self::$options['endpoint'], self::FILENAME_PATTERN );
global $wp_rewrite;
unset( $wp_rewrite->extra_rules_top[ $regex ] );
flush_rewrite_rules();
}Just refactor the assignment of the |
network-activating Dependency Minification
dependency-minification.php
Outdated
There was a problem hiding this comment.
Oh wait, haha! I just realized that this is not going to actually do anything! This function is not going to get a chance to filter network_admin_plugin_action_links because this plugin is not even activated yet 😄
So I guess the alternative we'll have to resort to is add a warning in the description?
There was a problem hiding this comment.
LOL. Silly me. It was working because the plugin was already activated in the main site 😄
dependency-minification.php
Outdated
Improve network activation and deactivation * Flush rewrite rules network-wide when network-activated * Prompt for installing @scribu's Proper Network Activation plugin

On a multisite network, I also noticed that when the plugin network-activated, it does not flush the rewrite rules across all sites on the network, which will result in broken CSS and JS until someone visits the Permalinks page for each site in the network. This is not acceptable.