Changeset 59890
- Timestamp:
- 02/28/2025 04:56:57 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-debug-data.php
r59853 r59890 505 505 } 506 506 507 // Check if a robots.txt file exists. 508 if ( is_file( ABSPATH . 'robots.txt' ) ) { 509 // If the file exists, turn debug info to true. 510 $robotstxt_debug = true; 511 512 /* translators: %s: robots.txt */ 513 $robotstxt_string = sprintf( __( 'There is a static %s file in your installation folder. WordPress can not dynamicly serve one.' ), 'robots.txt' ); 514 } elseif ( got_url_rewrite() ) { 515 // No robots.txt file available and rewrite rules in place, turn debug info to false. 516 $robotstxt_debug = false; 517 518 /* translators: %s: robots.txt */ 519 $robotstxt_string = sprintf( __( 'Your site is using the dynamic %s file which is generated by WordPress.' ), 'robots.txt' ); 520 } else { 521 // No robots.txt file, but without rewrite rules WP can't serve one. 522 $robotstxt_debug = true; 523 524 /* translators: %s: robots.txt */ 525 $robotstxt_string = sprintf( __( 'WordPress can not dynamicly serve a %s file due to a lack of rewrite rule support' ), 'robots.txt' ); 526 527 } 528 $fields['static_robotstxt_file'] = array( 529 'label' => __( 'robots.txt' ), 530 'value' => $robotstxt_string, 531 'debug' => $robotstxt_debug, 532 ); 533 507 534 // Server time. 508 535 $date = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
Note: See TracChangeset
for help on using the changeset viewer.