Make WordPress Core

Opened 10 months ago

Last modified 8 weeks ago

#60622 new enhancement

Enhancement: add filter to function get_home_path() return value

Reported by: alexrah's profile 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 (5)

This ticket was mentioned in PR #6171 on WordPress/wordpress-develop by alexrah.


10 months ago
#1

  • Keywords has-patch added

@alexrah commented on PR #6171:


9 months ago
#2

Added inline documentation for the filter as requested in src/wp-admin/includes/file.php function: get_home_path()
PS: I left the @since line uncompleted

Added Unit tests in tests/phpunit/tests/admin/includesFile.php method: test_get_home_path()

This ticket was mentioned in PR #7488 on WordPress/wordpress-develop by @rishishah.


2 months ago
#3

### Pull Request Description
Title: Modify Comment REST API to Support Block Comments

Overview: This pull request enhances the WordPress Comment REST API by adding support for block comments. This functionality aims to improve rest API add comment functionality to support the block commenting feature.

### Changes Made:

  • Updated the Comment REST API to accept and process block comment type.
  • Process comment status if a logged-in user adds block comment then it will not approved automatically.

### Why This Matters:

  • As of now custom comment type is now allowed in the comment rest API but we can add it through wp_insert_comment
  • If any logged-in user ports a comment then it will automatically approve and add the comment in the database with comment_approved as 1.

### Related Tickets:

Ticket #60622: Discussion on block comments feature.

This ticket was mentioned in PR #7498 on WordPress/wordpress-develop by @rishishah.


2 months ago
#4

### Pull Request Description
Title: Allow Avatar URL for Custom Comment Type in Comment API

### Overview:
This PR introduces a new feature that enables the inclusion of an avatar URL for custom comment types in the WordPress Comment API. This enhancement allows developers to specify custom avatar URLs, improving the flexibility and usability of the comment system for custom comment types.

### Changes Made:

  • Updated the Comment API to accept an avatar_url parameter for custom comment types.

### Why This Matters:

  • If any custom comment type is passed on comment API then avatar URLs is not fetching so need to add support avatar URLs for custom comment type.

### Related Tickets:
Ticket: #60622: Discussion on block comments feature.

@ellatrix commented on PR #7488:


8 weeks ago
#5

@TimothyBJacobs do these changes look good to you? Thanks. :)

Note: See TracTickets for help on using tickets.