Answer the question
In order to leave comments, you need to log in
How can you understand this piece of code?
Hello, how can I understand this piece of code?
$attributes['redirect'] = '';
if ( isset( $_REQUEST['redirect_to'] ) ) {
$attributes['redirect'] = wp_validate_redirect( $_REQUEST['redirect_to'], $attributes['redirect'] );
}
Answer the question
In order to leave comments, you need to log in
Well, I already explained.
Checks if the redirect_to parameter is present in the response , if it is, it checks if it is in the list of allowed ones and returns it, if not, then returns the value set in $attributes['redirect']
More answered your question on the site. wp-panda.com/build-a-custom-wordpress-user-flow-pa...
If just checks if the variable exists
And about the function, just go and look at its code, everything is open there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question