| 1 |
<?php if( !defined( 'ABSPATH' ) ) die( 'No direct access allowed' ); ?> |
| 2 |
<div class="wrap"> |
| 3 |
<?php screen_icon( ); ?> |
| 4 |
<?php $this->render_admin('annoy' )?> |
| 5 |
|
| 6 |
<h2><?php _e( 'Options', 'redirection' ) ?></h2> |
| 7 |
<?php $this->render_admin( 'submenu' ); ?> |
| 8 |
|
| 9 |
<form method="post" action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" style="clear: both"> |
| 10 |
|
| 11 |
<?php wp_nonce_field( 'redirection-update_options' ); ?> |
| 12 |
|
| 13 |
<table cellpadding="3" width="100%" class="form-table"> |
| 14 |
<tr> |
| 15 |
<th valign="top" align="right"><?php _e( 'Auto-generate URL', 'redirection' ) ?>:</th> |
| 16 |
<td> |
| 17 |
<input type="text" name="auto_target" style="width: 95%" value="<?php echo esc_attr( $options['auto_target'] ) ?>"/> |
| 18 |
<br/> |
| 19 |
<span class="sub"><?php _e( 'This will be used to auto-generate a URL if no URL is given. You can use the special tags $dec$ or $hex$ to have a unique ID inserted (either decimal or hex)', 'redirection' ); ?></span> |
| 20 |
|
| 21 |
</td> |
| 22 |
</tr> |
| 23 |
<tr> |
| 24 |
<th align="right" valign="top"><?php _e( 'IP Lookup Service', 'redirection' ); ?>:</th> |
| 25 |
<td> |
| 26 |
<input type="text" style="width: 95%" name="lookup" value="<?php echo esc_attr( $options['lookup'] ) ?>" id="lookup"/><br/> |
| 27 |
</td> |
| 28 |
</tr> |
| 29 |
<tr> |
| 30 |
<th align="right"><?php _e( 'Plugin Support', 'redirection' ); ?>:</th> |
| 31 |
<td> |
| 32 |
<input type="checkbox" name="support" <?php echo $this->checked( $options['support'] ) ?> id="support"/> |
| 33 |
<label for="support"><span class="sub"><?php _e( 'I\'m a nice person and I have helped support the author of this plugin', 'redirection' ); ?></span></label> |
| 34 |
</td> |
| 35 |
</tr> |
| 36 |
<tr> |
| 37 |
<th align="right"><?php _e( 'Logging', 'redirection' ); ?>:</th> |
| 38 |
<td> |
| 39 |
<input type="checkbox" name="log_redirections" <?php echo $this->checked( $options['log_redirections'] ) ?> id="log_redirections"/> |
| 40 |
<label for="log_redirections"><span class="sub"><?php _e( 'log redirected requests', 'redirection' ); ?></span></label><br /> |
| 41 |
<input type="checkbox" name="log_404s" <?php echo $this->checked( $options['log_404s'] ) ?> id="log_404s"/> |
| 42 |
<label for="log_404s"><span class="sub"><?php _e( 'log 404 Not Found requests', 'redirection' ); ?></span></label><br /> |
| 43 |
<?php _e( 'Uncheck one or both of these to turn off logging and reduce database load if your redirected URLs are hit very frequently, and/or your site is very busy and pages are often not found.', 'redirection' ); ?> |
| 44 |
</td> |
| 45 |
</tr> |
| 46 |
<tr> |
| 47 |
<th align="right"><?php _e( 'Expire Logs', 'redirection' ); ?>:</th> |
| 48 |
<td> |
| 49 |
<input size="5" type="text" name="expire" value="<?php echo esc_attr( $options['expire'] ) ?>"/> |
| 50 |
<?php _e( 'days (enter 0 for no expiry)', 'redirection' ); ?> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
<tr> |
| 54 |
<th align="right"><?php _e( 'RSS Token', 'redirection' ); ?>:</th> |
| 55 |
<td> |
| 56 |
<input class="regular-text" size="5" type="text" name="token" value="<?php echo esc_attr( $options['token'] ) ?>"/><br/> |
| 57 |
<?php _e( 'A unique token allowing feed readers access to Redirection RSS (leave blank to auto-generate)', 'redirection' ); ?> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
</table> |
| 61 |
|
| 62 |
<h3><?php _e( 'URL Monitoring', 'redirection' ); ?></h3> |
| 63 |
<p><?php _e( 'You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group.', 'redirection' ); ?></p> |
| 64 |
|
| 65 |
<table class="form-table"> |
| 66 |
<tr> |
| 67 |
<th><?php _e( 'Post & Page URLs', 'redirection' ); ?>:</th> |
| 68 |
<td> |
| 69 |
<select name="monitor_post"> |
| 70 |
<option value="0"><?php _e( 'Don\'t monitor', 'redirection' ); ?></option> |
| 71 |
<?php echo $this->select( $groups, $options['monitor_post'] );?> |
| 72 |
</select> |
| 73 |
— |
| 74 |
<label for="create_url_for_new_posts"><?php _e( 'Monitor new posts', 'redirection' ); ?></label> <input type="checkbox" name="monitor_new_posts" <?php echo $this->checked( $options['monitor_new_posts'] ); ?> id="create_url_for_new_posts"/> |
| 75 |
</td> |
| 76 |
</tr> |
| 77 |
<!-- |
| 78 |
<tr> |
| 79 |
<th><?php _e( 'Category URLs', 'redirection' ); ?>:</th> |
| 80 |
<td> |
| 81 |
<select name="monitor_category"> |
| 82 |
<option value="0"><?php _e( 'Don\'t monitor', 'redirection' ); ?></option> |
| 83 |
<?php echo $this->select( $groups, $options['monitor_category'] );?> |
| 84 |
</select> |
| 85 |
</td> |
| 86 |
</tr>--> |
| 87 |
</table> |
| 88 |
|
| 89 |
<input class="button-primary" type="submit" name="update" value="<?php _e( 'Update', 'redirection' ) ?>"/> |
| 90 |
|
| 91 |
</form> |
| 92 |
</div> |
| 93 |
|
| 94 |
<div class="wrap"> |
| 95 |
<h2><?php _e( 'Import', 'redirection' ); ?></h2> |
| 96 |
|
| 97 |
<p><?php _e( 'Here you can import redirections from an existing .htaccess file, a CSV file, or a Redirection XML.', 'redirection' ); ?></p> |
| 98 |
|
| 99 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8" enctype="multipart/form-data"> |
| 100 |
<?php wp_nonce_field( 'redirection-import' ); ?> |
| 101 |
|
| 102 |
<input type="file" name="upload" value=""/> |
| 103 |
|
| 104 |
<?php _e( 'Import into', 'redirection' ); ?>: <select name="group"> |
| 105 |
<?php echo $this->select( $groups );?> |
| 106 |
</select> |
| 107 |
<input class="button-primary" type="submit" name="import" value="<?php _e( 'Upload', 'redirection' ); ?>"/> |
| 108 |
</form> |
| 109 |
|
| 110 |
<p><?php _e( 'Note that the group is ignored when uploading an XML file.', 'redirection' ); ?></p> |
| 111 |
</div> |
| 112 |
|
| 113 |
<div class="wrap"> |
| 114 |
<h2><?php _e( 'Delete Redirection', 'redirection' ); ?></h2> |
| 115 |
<p><?php _e( 'Selecting this option will delete all redirections, all logs, and any options associated with the Redirection plugin. Make sure this is what you want to do.', 'redirection' ); ?></p> |
| 116 |
|
| 117 |
<form action="<?php echo $this->url( $_SERVER['REQUEST_URI'] ) ?>" method="post" accept-charset="utf-8"> |
| 118 |
<?php wp_nonce_field( 'redirection-delete_plugin' ); ?> |
| 119 |
|
| 120 |
<input class="button-primary" type="submit" name="delete" value="<?php _e( 'Delete', 'redirection' ) ?>"/> |
| 121 |
</form> |
| 122 |
</div> |