mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Taxonomy/Users: Provide a fallback for incorrect HTTP referrers.
Merge of [41398] to the 4.4 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.4@41421 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fe6d81c151
commit
25440a3777
@ -79,9 +79,9 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
|
||||
<div id="message" class="updated">
|
||||
<p><strong><?php echo $message; ?></strong></p>
|
||||
<?php if ( $wp_http_referer ) { ?>
|
||||
<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php printf( __( '← Back to %s' ), $tax->labels->name ); ?></a></p>
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( wp_sanitize_redirect( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>"><?php printf( __( '← Back to %s' ), $tax->labels->name ); ?></a></p>
|
||||
<?php } else { ?>
|
||||
<p><a href="<?php echo esc_url( wp_get_referer() ); ?>"><?php printf( __( '← Back to %s' ), $tax->labels->name ); ?></a></p>
|
||||
<p><a href="<?php echo esc_url( wp_validate_redirect( wp_sanitize_redirect( wp_get_referer() ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>"><?php printf( __( '← Back to %s' ), $tax->labels->name ); ?></a></p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
@ -178,7 +178,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('← 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('← Back to Users'); ?></a></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user