Opened 7 months ago
Last modified 6 months ago
#60622 new enhancement
Enhancement: add filter to function get_home_path() return value
Reported by: | alexrah | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.4.3 |
Component: | Administration | Keywords: | dev-feedback has-patch |
Focuses: | Cc: |
Description
Allowing to filter the return value of wp-admin/includes/file.php:get_home_path() would help to handle cases when WordPress is used as an headless Rest API backend and wp_options home points to a different domain than siteurl.
In such a case, get_home_path fails to get the absolute filesystem path of the root of the WordPress installation.
Being able to filter the output of get_home_path() would allow developers to avoid breaking its functionality on headless setup.
Why is important: in a headless setup, having wp_options home set to the frontend domain allow WordPress to generate user-facing urls with the correct domain.
Change History (2)
This ticket was mentioned in PR #6171 on WordPress/wordpress-develop by alexrah.
7 months ago
#1
- Keywords has-patch added
https://core.trac.wordpress.org/ticket/60622