Users: Provide a fallback for incorrect HTTP referrers.

Merge of [41398] to the 4.2 branch.

Built from https://develop.svn.wordpress.org/branches/4.2@41423


git-svn-id: http://core.svn.wordpress.org/branches/4.2@41256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2017-09-19 11:14:36 +00:00
parent ecf502b597
commit e7865eb9ae

View File

@ -194,7 +194,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
<p><strong><?php _e('User updated.') ?></strong></p>
<?php endif; ?>
<?php if ( $wp_http_referer && !IS_PROFILE_PAGE ) : ?>
<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e('&larr; Back to Users'); ?></a></p>
<p><a href="<?php echo esc_url( wp_validate_redirect( wp_sanitize_redirect( $wp_http_referer ), self_admin_url( 'users.php' ) ) ); ?>"><?php _e('&larr; Back to Users'); ?></a></p>
<?php endif; ?>
</div>
<?php endif; ?>