Skip to content

Commit

Permalink
Adds rewrite_flush to feed enabler
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrerahector committed Oct 10, 2013
1 parent 6fe302d commit c2d66b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion class-wordpress-popular-posts-feed.php
Expand Up @@ -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' ) );
}

/**
Expand Down

0 comments on commit c2d66b7

Please sign in to comment.