WordPress.org

Make WordPress Core

Ticket #10981: rewrite_rules.diff

File rewrite_rules.diff, 1.5 KB (added by markjaquith, 9 years ago)

switches to storing the rules in an option, like before.

  • wp-includes/version.php

     
    1515 *
    1616 * @global int $wp_db_version
    1717 */
    18 $wp_db_version = 12024;
     18$wp_db_version = 12060;
    1919
    2020/**
    2121 * Holds the TinyMCE version
  • wp-includes/rewrite.php

     
    16071607         * @return array Rewrite rules.
    16081608         */
    16091609        function wp_rewrite_rules() {
    1610                 $this->rules = get_transient('rewrite_rules');
     1610                $this->rules = get_option('rewrite_rules');
    16111611                if ( empty($this->rules) ) {
    16121612                        $this->matches = 'matches';
    16131613                        $this->rewrite_rules();
    1614                         set_transient('rewrite_rules', $this->rules);
     1614                        update_option('rewrite_rules', $this->rules);
    16151615                }
    16161616
    16171617                return $this->rules;
     
    18221822         *
    18231823         * @since 2.0.1
    18241824         * @access public
    1825          * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).
     1825         * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
    18261826         */
    18271827        function flush_rules($hard = true) {
    1828                 delete_transient('rewrite_rules');
     1828                delete_option('rewrite_rules');
    18291829                $this->wp_rewrite_rules();
    18301830                if ( $hard && function_exists('save_mod_rewrite_rules') )
    18311831                        save_mod_rewrite_rules();