WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/19/2009 09:10:46 PM (11 years ago)
Author:
markjaquith
Message:

Revert to old options table storage of rewrite_rules. Transient object caches would silently regenerate rewrite_rules without giving plugins a chance to readd endpoints. fixes #10981

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/rewrite.php

    r11853 r12061  
    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
     
    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') )
Note: See TracChangeset for help on using the changeset viewer.