| 1 |
<?php if ( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?> |
| 2 |
<form method="post" accept-charset="utf-8" action="<?php echo admin_url( 'admin-ajax.php' ) ?>" style="padding: 3px"> |
| 3 |
<h3><?php printf( __( '%s by matching %s', 'redirection' ), esc_html( $redirect->actions( $redirect->action_type ) ), esc_html( $redirect->match->name() ) ) ?></h3> |
| 4 |
|
| 5 |
<table class="edit"> |
| 6 |
<tr> |
| 7 |
<th width="100"><?php _e ('Title', 'redirection'); ?>:</th> |
| 8 |
<td> |
| 9 |
<input style="width: 85%" type="text" name="title" value="<?php echo esc_attr( $redirect->title ); ?>"/> |
| 10 |
<span class="sub">(<?php _e( "optional", 'redirection' ); ?>)</span> |
| 11 |
</td> |
| 12 |
</tr> |
| 13 |
|
| 14 |
<tr> |
| 15 |
<th width="100"><a target="_blank" href="<?php echo esc_url( $redirect->url ) ?>"><?php _e( 'Source URL', 'redirection' ); ?>:</a></th> |
| 16 |
<td> |
| 17 |
<input style="width: 85%" type="text" name="old" value="<?php echo esc_attr( $redirect->url ); ?>" id="original"/> |
| 18 |
<label><?php _e( 'Regex', 'redirection' ); ?>: <input type="checkbox" name="regex" <?php if ( $redirect->regex == true ) echo ' checked="checked"' ?>/></label> |
| 19 |
</td> |
| 20 |
</tr> |
| 21 |
|
| 22 |
<?php $redirect->match->show(); ?> |
| 23 |
|
| 24 |
<tr> |
| 25 |
<th></th> |
| 26 |
<td> |
| 27 |
<input class="button-primary" type="submit" name="save" value="<?php _e( 'Save', 'redirection' ); ?>"/> |
| 28 |
<input class="button-secondary" type="submit" name="cancel" value="<?php _e( 'Cancel', 'redirection' ); ?>"/> |
| 29 |
|
| 30 |
<input type="hidden" name="action" value="red_redirect_save"/> |
| 31 |
<input type="hidden" name="id" value="<?php echo esc_attr( $redirect->id ); ?>"/> |
| 32 |
<input type="hidden" name="_ajax_nonce" value="<?php echo wp_create_nonce( 'redirection-redirect_save_'.$redirect->id ); ?>"/> |
| 33 |
|
| 34 |
<span id="info_<?php echo esc_attr( $redirect->id ) ?>"></span> |
| 35 |
</td> |
| 36 |
</tr> |
| 37 |
</table> |
| 38 |
</form> |
| 39 |
|