I have this inside the <form></form>
:
<input type="hidden" name="action" value="submit_images" data-parsley-excluded />
I have this as my hook just to test:
function maybe_add($entry, $form) {
wp_redirect( '/', 301 );
exit();
}
add_action( 'admin_post_submit_images', maybe_add_', 10, 2 );
I never get redirected to google though no matter what I've tried. Any ideas?
I have this inside the <form></form>
:
<input type="hidden" name="action" value="submit_images" data-parsley-excluded />
I have this as my hook just to test:
function maybe_add($entry, $form) {
wp_redirect( 'https://www.google/', 301 );
exit();
}
add_action( 'admin_post_submit_images', maybe_add_', 10, 2 );
I never get redirected to google though no matter what I've tried. Any ideas?
Share Improve this question edited Jun 6, 2019 at 20:56 nmr 4,5672 gold badges17 silver badges25 bronze badges asked Jun 6, 2019 at 20:50 D.G.D.G. 1 2 |1 Answer
Reset to default 1You're missing a '
in your code and your function name is different.
function my_maybe_add_redirect( $entry, $form ) {
wp_redirect( 'https://www.google/', 301 );
exit();
}
add_action( 'admin_post_submit_images', 'my_maybe_add_redirect', 10, 2 );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745429744a4627338.html
add_action
– rudtek Commented Jun 6, 2019 at 23:26