Answer the question
In order to leave comments, you need to log in
Why is the variable not added to query_vars?
add_filter('query_vars', 'success_query_vars');
function success_query_vars($vars)
{
$vars[] .= 'my_success';
return $vars;
}
add_action('parse_request', 'success_parse_request');
function success_parse_request($wp)
{
if (array_key_exists('my_success', $wp->query_vars)) { /* не заходит сюда */ }
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question