Make WordPress Core

Ticket #28517: 28517-without-tests.patch

File 28517-without-tests.patch, 1.2 KB (added by numis, 10 years ago)

Patch without tests

  • src/wp-includes/rewrite.php

     
    20432043         * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
    20442044         */
    20452045        public function flush_rules($hard = true) {
    2046                 delete_option('rewrite_rules');
     2046                delete_option( 'rewrite_rules' );
    20472047                $this->wp_rewrite_rules();
    20482048                /**
    20492049                 * Filter whether a "hard" rewrite rule flush should be performed when requested.
     
    20542054                 *
    20552055                 * @param bool $hard Whether to flush rewrite rules "hard". Default true.
    20562056                 */
    2057                 if ( ! $hard || ! apply_filters( 'flush_rewrite_rules_hard', true ) ) {
     2057                if ( ! $hard && ! apply_filters( 'flush_rewrite_rules_hard', false ) ) {
    20582058                        return;
    20592059                }
    2060                 if ( function_exists( 'save_mod_rewrite_rules' ) )
     2060                if ( function_exists( 'save_mod_rewrite_rules' ) ) {
    20612061                        save_mod_rewrite_rules();
    2062                 if ( function_exists( 'iis7_save_url_rewrite_rules' ) )
     2062                }
     2063                if ( function_exists( 'iis7_save_url_rewrite_rules' ) ) {
    20632064                        iis7_save_url_rewrite_rules();
     2065                }
    20642066        }
    20652067
    20662068        /**