mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-24 07:14:28 +00:00
During PHPUnit tests, don't autodetect permalink structure during WP installation.
The unit tests expect non-pretty permalinks, so there's no benefit to detecting the ability to have pretty permalinks. Moreover, the `wp_remote_get()` call can cause installation to hang when there are DNS issues. Fixes #31994. git-svn-id: https://develop.svn.wordpress.org/trunk@32139 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -102,4 +102,16 @@ function _wp_die_handler_txt( $message, $title, $args ) {
|
||||
echo "\t $k : $v\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a permalink structure.
|
||||
*
|
||||
* Hooked as a callback to the 'populate_options' action, we use this function to set a permalink structure during
|
||||
* `wp_install()`, so that WP doesn't attempt to do a time-consuming remote request.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
function _set_default_permalink_structure_for_tests() {
|
||||
update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user