Changeset 32027
- Timestamp:
- 04/05/2015 02:48:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r31358 r32027 266 266 267 267 /** 268 * Enable pretty permalinks.268 * Maybe enable pretty permalinks on install. 269 269 * 270 270 * If after enabling pretty permalinks don't work, fallback to query-string permalinks. … … 273 273 * 274 274 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. 275 * 276 * @return bool Whether pretty permalinks are enabled. False otherwise. 275 277 */ 276 278 function wp_install_maybe_enable_pretty_permalinks() { … … 279 281 // Bail if a permalink structure is already enabled. 280 282 if ( get_option( 'permalink_structure' ) ) { 281 return ;283 return true; 282 284 } 283 285 … … 306 308 // Test against a real WordPress Post, or if none were created, a random 404 page. 307 309 $test_url = get_permalink( 1 ); 310 308 311 if ( ! $test_url ) { 309 312 $test_url = home_url( '/wordpress-check-for-rewrites/' ); … … 332 335 $wp_rewrite->set_permalink_structure( '' ); 333 336 $wp_rewrite->flush_rules( true ); 337 338 return false; 334 339 } 335 340
Note: See TracChangeset
for help on using the changeset viewer.