diff --git src/wp-admin/includes/schema.php src/wp-admin/includes/schema.php
index 4f49dc2..f8ffd2a 100644
|
|
|
function populate_options() { |
| 427 | 427 | 'comment_moderation' => 0, |
| 428 | 428 | 'moderation_notify' => 1, |
| 429 | 429 | 'permalink_structure' => '', |
| | 430 | 'rewrite_rules' => '', |
| 430 | 431 | 'hack_file' => 0, |
| 431 | 432 | 'blog_charset' => 'UTF-8', |
| 432 | 433 | 'moderation_keys' => '', |
diff --git src/wp-includes/class-wp-rewrite.php src/wp-includes/class-wp-rewrite.php
index 035bbc3..01d66f2 100644
|
|
|
class WP_Rewrite { |
| 1772 | 1772 | unset( $do_hard_later ); |
| 1773 | 1773 | } |
| 1774 | 1774 | |
| 1775 | | delete_option('rewrite_rules'); |
| | 1775 | update_option( 'rewrite_rules', '' ); |
| 1776 | 1776 | $this->wp_rewrite_rules(); |
| 1777 | 1777 | |
| 1778 | 1778 | /** |
diff --git tests/phpunit/tests/rewrite.php tests/phpunit/tests/rewrite.php
index 1f7426e..5db9edd 100644
|
|
|
class Tests_Rewrite extends WP_UnitTestCase { |
| 320 | 320 | $this->set_permalink_structure(); |
| 321 | 321 | } |
| 322 | 322 | |
| | 323 | /** |
| | 324 | * @ticket 29107 |
| | 325 | */ |
| | 326 | public function test_flush_rules_does_not_delete_option() { |
| | 327 | $this->set_permalink_structure(); |
| | 328 | |
| | 329 | $rewrite_rules = get_option( 'rewrite_rules' ); |
| | 330 | $this->assertSame( '', $rewrite_rules ); |
| | 331 | |
| | 332 | $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); |
| | 333 | |
| | 334 | $rewrite_rules = get_option( 'rewrite_rules' ); |
| | 335 | $this->assertInternalType( 'array', $rewrite_rules ); |
| | 336 | $this->assertNotEmpty( $rewrite_rules ); |
| | 337 | } |
| 323 | 338 | } |