Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adds rewrite_flush to feed enabler

  • Loading branch information...
commit c2d66b7c001a93cc776513f3bde0a5fdecb61916 1 parent 6fe302d
@cabrerahector authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 class-wordpress-popular-posts-feed.php
View
6 class-wordpress-popular-posts-feed.php
@@ -33,9 +33,13 @@ public function __construct() {
* Creates the feed.
*
* @since 3.0.0
+ * @global object $wp_rewrite
*/
public function create_feed() {
- add_feed( 'popularposts', array( $this, 'popular_posts_feed' ) );
+ global $wp_rewrite;
+
+ $wp_rewrite->flush_rules();
+ add_feed( 'popular-posts', array( $this, 'popular_posts_feed' ) );
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.