This repository has been archived by the owner. It is now read-only.

Use version option to check on init if rewrite rules should be flushed. #149

Merged
merged 3 commits into from Apr 28, 2014

Conversation

Projects
None yet
2 participants
@rachelbaker
Member

rachelbaker commented Apr 24, 2014

This should fix #113.

plugin.php Outdated
@@ -135,7 +160,7 @@ function json_api_activation( $network_wide ) {
switch_to_blog( $mu_blog['blog_id'] );
json_api_register_rewrites();
flush_rewrite_rules();
update_option( 'json_api_plugin_version', NULL );

This comment has been minimized.

@rmccue

rmccue Apr 25, 2014

Member

Can probably use delete_option() here.

plugin.php Outdated
* Determine if the rewrite rules should be flushed.
*/
function json_api_maybe_flush_rewrites() {
$version = get_option( 'json_api_plugin_version', NULL );

This comment has been minimized.

@rmccue

rmccue Apr 25, 2014

Member

null should be lowercase.

@rmccue rmccue added this to the 1.0 milestone Apr 28, 2014

@rmccue rmccue added Bug labels Apr 28, 2014

rmccue added a commit that referenced this pull request Apr 28, 2014

Merge pull request #149 from WP-API/mu-flush
Use version option to check on init if rewrite rules should be flushed.

@rmccue rmccue merged commit 81b1599 into master Apr 28, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@rmccue rmccue deleted the mu-flush branch Apr 28, 2014

kellbot pushed a commit to kellbot/WP-API that referenced this pull request Aug 1, 2014

Merge pull request WP-API#149 from WP-API/mu-flush
Use version option to check on init if rewrite rules should be flushed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.