You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the editor loads for a new page, a REST API request is made to fetch the possible parent posts in order to populate the relevant dropdown.
What this dropdown need is only the post ID and the post title. What actually happens is that for each of the possible parent posts retrieved, a full post object (with edit context) is returned, which causes all the relevant filters to be applied.
To reproduce
Steps to reproduce the behavior:
Create a simple filter hooked on the the_content.
Create a new page and notice how many times the filter callback is triggered.
Expected behavior
The filter callback is triggered as many times as the number of possible parent posts retrieved by this REST API call.
I know that the maximum number of posts that this filter will be applied is 100 and in most sites, there are even less than 100 posts available, but again this behavior is something that could be avoided.
The text was updated successfully, but these errors were encountered:
Describe the bug
When the editor loads for a new page, a REST API request is made to fetch the possible parent posts in order to populate the relevant dropdown.
What this dropdown need is only the post ID and the post title. What actually happens is that for each of the possible parent posts retrieved, a full post object (with
edit
context) is returned, which causes all the relevant filters to be applied.To reproduce
Steps to reproduce the behavior:
the_content
.Expected behavior
The filter callback is triggered as many times as the number of possible parent posts retrieved by this REST API call.
I know that the maximum number of posts that this filter will be applied is 100 and in most sites, there are even less than 100 posts available, but again this behavior is something that could be avoided.
The text was updated successfully, but these errors were encountered: