function filter_flush_rewrite_rules_hard( $true ) {
    return false;
}
add_filter( 'flush_rewrite_rules_hard', 'filter_flush_rewrite_rules_hard', 10, 1 );