Make WordPress Core

Ticket #30501: rewrite.2.patch

File rewrite.2.patch, 648 bytes (added by joostdevalk, 10 years ago)

Original patch

  • wp-includes/rewrite.php

     
    20412041         * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
    20422042         */
    20432043        public function flush_rules($hard = true) {
     2044                // Prevent this action from running before shutdown
     2045                if ( ! doing_action( 'shutdown' ) ) {
     2046                        add_action( 'shutdown', array( $this, 'flush_rules' ) );
     2047                        return;
     2048                }
     2049
    20442050                delete_option('rewrite_rules');
    20452051                $this->wp_rewrite_rules();
    20462052                /**