Error appeared when we used $feedname
parameter (started with _ ) with add_feed()
function
#1616
Labels
[Status] Done
Issue is completed
Core Trac: https://core.trac.wordpress.org/ticket/59945#comment:10
Issue Description
Error appeared when we used
$feedname
parameter (started with _ ) withadd_feed()
function. This is happening because the_
at the beginning of the feed name is removed in thedo_feed
function.This process results in an action name of
'do_feed_' . 'feed2'
when$feed
is'_feed2'
.Since this is not done in the add_feed function and the action name specified in the add_action function is 'do_feed_' . '_feed2', since the two action names do not match, which resulting in the error indicated in the response.
URL of the Page with the Issue
https://developer.wordpress.org/reference/functions/add_feed/
Section of Page with the issue
We need to mention in the doc that
$feedname
parameter should not start with_
Why is this a problem?
This process results in an action name of 'do_feed_' . 'feed2' when $feed is 'feed2'. Since this is not done in the add_feed function and the action name specified in the add_action function is 'do_feed' . '_feed2', since the two action names do not match, which resulting in the error indicated in the response.
Suggested Fix
We should mention in the doc that
$feedname
parameter should not start with_
The text was updated successfully, but these errors were encountered: