Skip to content

Commit 15ab8c4

Browse files
committed
other way to flush rewrite rules
fixes #2 (hopefully)
1 parent cf9ac74 commit 15ab8c4

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

mf2-feed.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
*/
1414

1515
add_action( 'init', array( 'Mf2Feed', 'init' ) );
16-
register_activation_hook( __FILE__, array( 'Mf2Feed', 'flush_rewrite_rules' ) );
17-
register_deactivation_hook( __FILE__, array( 'Mf2Feed', 'flush_rewrite_rules' ) );
16+
17+
// flush rewrite rules
18+
register_activation_hook( __FILE__, 'flush_rewrite_rules' );
19+
register_deactivation_hook( __FILE__, 'flush_rewrite_rules' );
1820

1921
/**
2022
* Mf2Feed class
@@ -177,15 +179,6 @@ public static function query_vars( $vars ) {
177179
return $vars;
178180
}
179181

180-
/**
181-
* reset rewrite rules
182-
*/
183-
public static function flush_rewrite_rules() {
184-
global $wp_rewrite;
185-
186-
$wp_rewrite->flush_rules();
187-
}
188-
189182
/**
190183
* Echos autodiscovery links
191184
*/

0 commit comments

Comments
 (0)