Opened 4 weeks ago
Last modified 3 weeks ago
#63467 new defect (bug)
function do_robots() should use admin_url()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.8 |
Component: | Privacy | Keywords: | has-patch |
Focuses: | administration, privacy | Cc: |
Description
Dear all,
we have /wp-admin/ hardcoded in do_robots() function. How can i use filter admin_url('admin-ajax.php') ?
<?php $site_url = parse_url( site_url() ); $path = ( ! empty( $site_url['path'] ) ) ? $site_url['path'] : ''; $output .= "Disallow: $path/wp-admin/\n"; $output .= "Allow: $path/wp-admin/admin-ajax.php\n";
Thank you.
Change History (2)
#1
@
4 weeks ago
- Summary changed from function do_robots() should use admin_url() a to function do_robots() should use admin_url()
This ticket was mentioned in PR #8834 on WordPress/wordpress-develop by @yogeshbhutkar.
3 weeks ago
#2
- Keywords has-patch added
Note: See
TracTickets for help on using
tickets.
Trac ticket: https://core.trac.wordpress.org/ticket/63467
### Description
This PR introduces the use of the
admin_url()
function to dynamically retrieve the admin URL, replacing previously hardcoded values.### Screenshots