Make WordPress Core

Ticket #11384: 11384.patch

File 11384.patch, 1.1 KB (added by brokenflipside, 9 years ago)

Refreshed

  • wp-includes/class-wp-rewrite.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    14421442         * @since 1.5.0
    14431443         * @access public
    14441444         *
     1445         * @param boolean $refresh whether to force a refresh or not (used by flush_rules())
    14451446         * @return array Rewrite rules.
    14461447         */
    1447         public function wp_rewrite_rules() {
    1448                 $this->rules = get_option('rewrite_rules');
     1448        public function wp_rewrite_rules($refresh = false) {
     1449                $this->rules = $refresh ? false : get_option('rewrite_rules');
    14491450                if ( empty($this->rules) ) {
    14501451                        $this->matches = 'matches';
    14511452                        $this->rewrite_rules();
     
    17701771                        unset( $do_hard_later );
    17711772                }
    17721773
    1773                 delete_option('rewrite_rules');
    1774                 $this->wp_rewrite_rules();
     1774                if ( $hard )
     1775                        delete_option('rewrite_rules');
     1776                $this->wp_rewrite_rules(true);
    17751777
    17761778                /**
    17771779                 * Filter whether a "hard" rewrite rule flush should be performed when requested.