WP htaccess Control - Version 3.4

Version Description

(19/4/2013) =

  • Fix: fixed category and tag advanced archives;
  • Fix: if both author advanced archives and author permalink base removal were active, archives wouldn't work;
  • Removed experimental login section;
  • Tested under WordPress 3.9.
Download this release

Release Info

Developer antonioandra.de
Plugin Icon wp plugin WP htaccess Control
Version 3.4
Comparing to
See all releases

Code changes from version 3.3.4 to 3.4

admin-ui-includes/advanced-archives.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Advanced Archives -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Advanced Archives', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <?php foreach (get_taxonomies('', 'objects') as $taxonomy) {
12
+ if (!$taxonomy->rewrite) {
13
+ continue;
14
+ }
15
+ ?>
16
+ <tr valign="top">
17
+ <th scope="row" style="width:18%;"><?php _e('Create', 'wp-htaccess-control');
18
+ echo " " . $taxonomy->labels->name . " ";
19
+ _e('Archives', 'wp-htaccess-control'); ?></th>
20
+ <td>
21
+ <input type="checkbox"
22
+ name="WPhtc_create_archive[<?php echo $taxonomy->name; ?>]" <?php if ($WPhtc->get_data('create_archive', $taxonomy->name)) {
23
+ echo "checked=checked";
24
+ } ?> />
25
+ </td>
26
+ <td valign="middle">
27
+ <p class="description"><?php _e('If active, taxonomy-based archives will be accessible:', 'wp-htaccess-control'); ?></p>
28
+
29
+ <p class="description"><code><?php bloginfo('url') ?>/<?php echo $taxonomy->name; ?>
30
+ _base/<?php echo $taxonomy->name; ?>_term/2010</code></p>
31
+
32
+ <p class="description"><code><?php bloginfo('url') ?>/<?php echo $taxonomy->name; ?>
33
+ _base/<?php echo $taxonomy->name; ?>_term/2010/12</code></p>
34
+
35
+ <p class="description"><?php _e("This will also work if you've removed the", 'wp-htaccess-control'); ?> <?php echo $taxonomy->labels->name; ?> <?php _e("base.", 'wp-htaccess-control'); ?></p>
36
+ </td>
37
+ </tr>
38
+ <?php
39
+ }
40
+ ?>
41
+ </table>
42
+ </div>
admin-ui-includes/custom-author-permalink.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Custom Author Permalink -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Custom Author Permalink', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"><?php _e('Author Base', 'wp-htaccess-control'); ?></th>
13
+ <td>
14
+ <input type="text" name="WPhtc_cap" value="<?php echo $WPhtc->get_data('cap'); ?>"/>
15
+
16
+ <p><code><?php bloginfo('url') ?>
17
+ /<em><?php _e('(your-base)', 'wp-htaccess-control'); ?></em>/admin</code></p>
18
+ </td>
19
+ <td valign="middle">
20
+ <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p>
21
+
22
+ <p class="description"><?php _e('If set, the author base will be used as shown next to the form field.', 'wp-htaccess-control'); ?></p>
23
+
24
+ <p class="description"><?php _e('If you do not want to use a custom Author Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p>
25
+ </td>
26
+ </tr>
27
+ <?php if (class_exists('GoogleSitemapGeneratorLoader')) { ?>
28
+ <tr valign="top">
29
+ <th>Google XML Sitemap</th>
30
+ <td>
31
+ <input type="checkbox" name="WPhtc_sm_enabled"
32
+ value="true" <?php if ($WPhtc->get_data('sm_enabled')) {
33
+ echo "checked";
34
+ } ?>/> <?php _e('Apply Custom Author Permalink on Generated Sitemap', 'wp-htaccess-control'); ?>
35
+ </td>
36
+ <td valign="middle">
37
+ <p class="description"><?php _e('Leave "Include author pages" unchecked on Google XML Sitemap options page if using this.', 'wp-htaccess-control'); ?></p>
38
+
39
+ <p class="description"><?php _e('However, if you want to adjust the "Priority" or "Change frequency" you should do so on the <a href="options-general.php?page=google-sitemap-generator/sitemap.php">Google XML Sitemap options page</a>.', 'wp-htaccess-control'); ?></p>
40
+ </td>
41
+ </tr>
42
+ <?php } ?>
43
+ </table>
44
+ </div>
admin-ui-includes/custom-htaccess.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Custom htaccess -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Custom htaccess', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <td>
13
+ <textarea name="WPhtc_hta" style="width:100%;"
14
+ rows="7"><?php echo stripslashes($WPhtc->get_data('hta')); ?></textarea>
15
+ </td>
16
+ <td style="width:50%;">
17
+ <p class="description"><?php _e('This rules will be printed before any WordPress rules.', 'wp-htaccess-control'); ?></p>
18
+
19
+ <p class="description"><?php _e('Please double check them before saving as a mistake could make your site inaccessible.', 'wp-htaccess-control'); ?></p>
20
+ <ul class="description">
21
+ <li><a href="http://www.google.com/search?q=htaccess+tutorial"
22
+ title="Search for htaccess tutorials"><img width="16px" src="http://google.com/favicon.ico"
23
+ alt="google favicon"> htaccess tutorial</a></li>
24
+ <li><a href="http://httpd.apache.org/docs/current/howto/htaccess.html"
25
+ title="Read about htaccess at apache.org"><img width="16px"
26
+ src="http://apache.org/favicon.ico"
27
+ alt="apache favicon"> htaccess</a></li>
28
+ <li><a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html"
29
+ title="Read about mod_rewrite at apache.org"><img width="16px"
30
+ src="http://apache.org/favicon.ico"
31
+ alt="apache favicon"> mod_rewrite</a></li>
32
+ </ul>
33
+ </td>
34
+ </tr>
35
+ </table>
36
+ </div>
admin-ui-includes/custom-pagination-permalink.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Custom Pagination Permalink -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Custom Pagination Permalink', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"><?php _e('Page Base', 'wp-htaccess-control'); ?></th>
13
+ <td>
14
+ <input type="text" name="WPhtc_cpp" value="<?php echo $WPhtc->get_data('cpp'); ?>"/>
15
+
16
+ <p><code><?php bloginfo('url') ?>/<em><?php _e('(your-base)', 'wp-htaccess-control'); ?></em>/2</code>
17
+ </p>
18
+ </td>
19
+ <td valign="middle">
20
+ <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p>
21
+
22
+ <p class="description"><?php _e('If set, the page base will be used as shown next to the form field in every post listing (category, tag, archive, etc).', 'wp-htaccess-control'); ?></p>
23
+
24
+ <p class="description"><?php _e('If you do not want to use a custom Pagination Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p>
25
+ </td>
26
+ </tr>
27
+ </table>
28
+ </div>
admin-ui-includes/custom-search-permalink.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Custom Search Permalink -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Custom Search Permalink', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"><?php _e('Search Base', 'wp-htaccess-control'); ?></th>
13
+ <td>
14
+ <input type="text" name="WPhtc_custom_search_permalink"
15
+ value="<?php echo $WPhtc->get_data('custom_search_permalink'); ?>"/>
16
+
17
+ <p><code><?php bloginfo('url') ?>/<em><?php _e('(your-base)', 'wp-htaccess-control'); ?></em>/search-term</code>
18
+ </p>
19
+ </td>
20
+ <td valign="middle">
21
+ <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p>
22
+
23
+ <p class="description"><?php _e('If set, the search base will always be used instead of "?s=search-term".', 'wp-htaccess-control'); ?></p>
24
+
25
+ <p class="description"><?php _e('If you do not want to use a custom Search Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p>
26
+ </td>
27
+ </tr>
28
+ </table>
29
+ </div>
admin-ui-includes/htaccess-suggestions.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- htaccess Suggestions -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('htaccess Suggestions', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"><?php _e('ServerSignature', 'wp-htaccess-control'); ?></th>
13
+ <td style="width:3%;" valign="middle">
14
+ <input type="checkbox" name="WPhtc_disable_serversignature"
15
+ value="true" <?php if ($WPhtc->get_data('disable_serversignature')) {
16
+ echo "checked";
17
+ } ?>/>
18
+ </td>
19
+ <td valign="middle">
20
+ <p class="description"><?php _e('Disable the ServerSignature on server generated error pages.', 'wp-htaccess-control'); ?></p>
21
+ </td>
22
+ </tr>
23
+ <tr valign="top">
24
+ <th scope="row"><?php _e('Indexes', 'wp-htaccess-control'); ?></th>
25
+ <td style="width:3%;" valign="middle">
26
+ <input type="checkbox" name="WPhtc_disable_indexes"
27
+ value="true" <?php if ($WPhtc->get_data('disable_indexes')) {
28
+ echo "checked";
29
+ } ?>/>
30
+ </td>
31
+ <td valign="middle">
32
+ <p class="description"><?php _e('Disable directory browsing.', 'wp-htaccess-control'); ?></p>
33
+ </td>
34
+ </tr>
35
+ <tr valign="top">
36
+ <th scope="row"><?php _e('Protect wp-config.php file', 'wp-htaccess-control'); ?></th>
37
+ <td style="width:3%;" valign="middle">
38
+ <input type="checkbox" name="WPhtc_protect_wp_config"
39
+ value="true" <?php if ($WPhtc->get_data('protect_wp_config')) {
40
+ echo "checked";
41
+ } ?>/></td>
42
+ <td valign="middle">
43
+ <p class="description"><?php _e('Deny access to wp-config.php file.', 'wp-htaccess-control'); ?></p>
44
+ </td>
45
+ </tr>
46
+ <tr valign="top">
47
+ <th scope="row"><?php _e('Protect htaccess file', 'wp-htaccess-control'); ?></th>
48
+ <td style="width:3%;" valign="middle">
49
+ <input type="checkbox" name="WPhtc_protect_htaccess"
50
+ value="true" <?php if ($WPhtc->get_data('protect_htaccess')) {
51
+ echo "checked";
52
+ } ?>/></td>
53
+ <td valign="middle">
54
+ <p class="description"><?php _e('Deny access to .htaccess file.', 'wp-htaccess-control'); ?></p>
55
+ </td>
56
+ </tr>
57
+ <tr valign="top">
58
+ <th scope="row"><?php _e('Protect comments.php', 'wp-htaccess-control'); ?></th>
59
+ <td style="width:3%;" valign="middle">
60
+ <input type="checkbox" name="WPhtc_protect_comments"
61
+ value="true" <?php if ($WPhtc->get_data('protect_comments')) {
62
+ echo "checked";
63
+ } ?>/></td>
64
+ <td valign="middle">
65
+ <p class="description"><?php _e('Deny comment posting to no referrer requests. This will avoid spam bots coming from nowhere.', 'wp-htaccess-control'); ?></p>
66
+ </td>
67
+ </tr>
68
+ <tr valign="top">
69
+ <th scope="row"><?php _e('mod_gzip', 'wp-htaccess-control'); ?></th>
70
+ <td style="width:3%;" valign="middle">
71
+ <input type="checkbox" name="WPhtc_gzip" value="true" <?php if ($WPhtc->get_data('gzip')) {
72
+ echo "checked";
73
+ } ?>/>
74
+ </td>
75
+ <td valign="middle">
76
+ <p class="description"><?php _e('Use mod_gzip if available.', 'wp-htaccess-control'); ?></p>
77
+ </td>
78
+ </tr>
79
+ <tr valign="top">
80
+ <th scope="row"><?php _e('mod_deflate', 'wp-htaccess-control'); ?></th>
81
+ <td style="width:3%;" valign="middle">
82
+ <input type="checkbox" name="WPhtc_deflate" value="true" <?php if ($WPhtc->get_data('deflate')) {
83
+ echo "checked";
84
+ } ?>/>
85
+ </td>
86
+ <td valign="middle">
87
+ <p class="description"><?php _e('Use mod_deflate if available.', 'wp-htaccess-control'); ?></p>
88
+ </td>
89
+ </tr>
90
+ <tr valign="top">
91
+ <th scope="row"><?php _e('Limit Upload Size', 'wp-htaccess-control'); ?></th>
92
+ <td style="width:3%;" valign="middle">
93
+ <input type="text" name="WPhtc_up_limit" value="<?php echo $WPhtc->get_data('up_limit'); ?>"/>
94
+ </td>
95
+ <td valign="middle">
96
+ <p class="description"><?php _e('If set, this value in MB will be used as limit to file uploads.', 'wp-htaccess-control'); ?></p>
97
+ </td>
98
+ </tr>
99
+ <tr valign="top">
100
+ <th scope="row"><?php _e('Admin Email', 'wp-htaccess-control'); ?></th>
101
+ <td style="width:3%;">
102
+ <input type="text" name="WPhtc_admin_email" value="<?php echo $WPhtc->get_data('admin_email') ?>"/>
103
+ </td>
104
+ <td valign="middle">
105
+ <p class="description"><?php _e('If set, this will be used as the admin email on server generated error pages.', 'wp-htaccess-control'); ?></p>
106
+ </td>
107
+ </tr>
108
+ <tr valign="top">
109
+ <th scope="row"><?php _e('Disable image hotlinking', 'wp-htaccess-control'); ?></th>
110
+ <td style="width:3%;">
111
+ <input type="text" name="WPhtc_disable_hotlink"
112
+ value="<?php echo $WPhtc->get_data('disable_hotlink'); ?>"/>
113
+ </td>
114
+ <td valign="middle">
115
+ <p class="description"><?php _e('If set, this url will be used as redirection to hotlinked images (you should be using an image url here). If you prefer no output on hotlinked images use "_".', 'wp-htaccess-control'); ?></p>
116
+ </td>
117
+ </tr>
118
+ <tr valign="top">
119
+ <th scope="row"><?php _e('Disable file hotlinking extensions', 'wp-htaccess-control'); ?></th>
120
+ <td style="width:3%;">
121
+ <input type="text" name="WPhtc_disable_file_hotlink_ext"
122
+ value="<?php echo $WPhtc->get_data('disable_file_hotlink_ext') ?>"/>
123
+ </td>
124
+ <td valign="middle">
125
+ <p class="description"><?php _e('If set, this file extensions will not be hotlinkable.', 'wp-htaccess-control'); ?></p>
126
+
127
+ <p class="description"><?php _e('Separate different extensions with a white-space, ie: "pdf doc zip".', 'wp-htaccess-control'); ?></p>
128
+ </td>
129
+ </tr>
130
+ <tr valign="top">
131
+ <th scope="row"><?php _e('File hotlinking redirection', 'wp-htaccess-control'); ?></th>
132
+ <td style="width:3%;">
133
+ <input type="text" name="WPhtc_disable_file_hotlink_redir"
134
+ value="<?php echo $WPhtc->get_data('disable_file_hotlink_redir') ?>"/>
135
+ </td>
136
+ <td valign="middle">
137
+ <p class="description"><?php _e('If set, this url will be used as redirection for hotlinked files.', 'wp-htaccess-control'); ?></p>
138
+ </td>
139
+ </tr>
140
+ <tr valign="top">
141
+ <th scope="row"><?php _e('500 error', 'wp-htaccess-control'); ?></th>
142
+ <td style="width:3%;" valign="middle">
143
+ <input type="text" name="WPhtc_redirect_500" value="<?php echo $WPhtc->get_data('redirect_500'); ?>"/>
144
+ </td>
145
+ <td valign="middle">
146
+ <p class="description"><?php _e('If set, this path will be used as page to 500 errors (example: /error.php).', 'wp-htaccess-control'); ?></p>
147
+ </td>
148
+ </tr>
149
+ <tr valign="top">
150
+ <th scope="row"><?php _e('403 error', 'wp-htaccess-control'); ?></th>
151
+ <td style="width:3%;" valign="middle">
152
+ <input type="text" name="WPhtc_redirect_403" value="<?php echo $WPhtc->get_data('redirect_403'); ?>"/>
153
+ </td>
154
+ <td valign="middle">
155
+ <p class="description"><?php _e('If set, this path will be used as page to 403 errors (example: /error.php).', 'wp-htaccess-control'); ?></p>
156
+ </td>
157
+ </tr>
158
+ <tr valign="top">
159
+ <th scope="row" valign="middle"><?php _e('Canonical Url', 'wp-htaccess-control'); ?></th>
160
+ <td style="width:3%;" valign="middle">
161
+ <select name="WPhtc_canon">
162
+ <option value=""></option>
163
+ <option value="www" <?php if ($WPhtc->get_data('canon') == 'www') {
164
+ echo "selected";
165
+ } ?>><?php _e('Force WWW', 'wp-htaccess-control'); ?></option>
166
+ <option value="simple" <?php if ($WPhtc->get_data('canon') == 'simple') {
167
+ echo "selected";
168
+ } ?>><?php _e('Force non-WWW', 'wp-htaccess-control'); ?></option>
169
+ </select>
170
+ </td>
171
+ <td valign="middle">
172
+ <p class="description"><?php _e('This will force canonization. This will be done by simply modifying the wordpress "site url" and "home" options (not htaccess).', 'wp-htaccess-control'); ?></p>
173
+ </td>
174
+ </tr>
175
+ </table>
176
+ </div>
admin-ui-includes/login-control.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Login Control -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Login Control', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"></th>
13
+ <td valign="middle" colspan="2">
14
+ <p class="description"><?php _e('The options below concern wp-login.php. You\'ll be able to redirect all traffic away from that page and set some allowed IPs.', 'wp-htaccess-control'); ?></p>
15
+
16
+ <p class="description"><?php _e('BEWARE: once disabled you won\'t be able to login through that form in any way, except for the listed IPs.', 'wp-htaccess-control'); ?></p>
17
+
18
+ <p class="description"><?php _e('If everything goes wrong directly edit your .htaccess file and delete the relevant part somewhere at the top.', 'wp-htaccess-control'); ?></p>
19
+ </td>
20
+ </tr>
21
+ <tr valign="top">
22
+ <th scope="row" style="width:18%;"><?php _e('Disable wp-login.php', 'wp-htaccess-control'); ?></th>
23
+ <td>
24
+ <input type="checkbox" name="WPhtc_login_disabled"
25
+ value="true" <?php if ($WPhtc->get_data('login_disabled')) {
26
+ echo "checked";
27
+ } ?>/>
28
+ </td>
29
+ <td valign="middle">
30
+ <p class="description"><?php _e('This is the main switch. Make sure you know what you\'re doing.', 'wp-htaccess-control'); ?></p>
31
+ </td>
32
+ </tr>
33
+ <tr valign="top">
34
+ <th scope="row" style="width:18%;"><?php _e('Redirect', 'wp-htaccess-control'); ?></th>
35
+ <td valign="middle">
36
+ <input type="text" name="WPhtc_login_redirection"
37
+ value="<?php echo $WPhtc->get_data('login_redirection') ?>"/>
38
+ </td>
39
+ <td valign="middle">
40
+ <p class="description"><?php _e('This will be used as redirection url. You might use something like "member-login" to redirect people to "http://yoursite.com/member-login/". If empty the home page will be served as redirection.', 'wp-htaccess-control'); ?></p>
41
+ </td>
42
+ </tr>
43
+ <tr valign="top">
44
+ <th scope="row" style="width:18%;"><?php _e('Allowed IPs', 'wp-htaccess-control'); ?></th>
45
+ <td>
46
+ <textarea name="WPhtc_login_ips"><?php if ($WPhtc->get_data('login_ips')) {
47
+ echo implode($WPhtc->get_data('login_ips'), "\n");
48
+ } ?></textarea>
49
+ </td>
50
+ <td valign="middle">
51
+ <p class="description"><?php _e('List of IPs allowed to access wp-login.php.', 'wp-htaccess-control'); ?></p>
52
+
53
+ <p class="description"><?php _e('Make sure you are have a static IP when using this.'); ?></p>
54
+ </td>
55
+ </tr>
56
+ <tr valign="top">
57
+ <th scope="row" style="width:18%;"><?php _e('Half-mode', 'wp-htaccess-control'); ?></th>
58
+ <td>
59
+ <input type="checkbox" name="WPhtc_login_half_mode"
60
+ value="true" <?php if ($WPhtc->get_data('login_half_mode')) {
61
+ echo "checked";
62
+ } ?>/>
63
+ </td>
64
+ <td valign="middle">
65
+ <p class="description"><?php _e('(BETA) If set, this will still allow access to POST (login) requests, logout and to the password recovery form. I don\'t think this is very useful at the moment (login error messages will still show up on wp-login.php) but may be helpful for AJAX use.', 'wp-htaccess-control'); ?></p>
66
+ </td>
67
+ </tr>
68
+ </table>
69
+ </div>
admin-ui-includes/maintenance-mode.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Maintenance Mode -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Maintenance Mode', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"><?php _e('Maintenance Active', 'wp-htaccess-control'); ?></th>
13
+ <td valign="middle">
14
+ <input type="checkbox" name="WPhtc_maintenance_active"
15
+ value="true" <?php if ($WPhtc->get_data('maintenance_active')) {
16
+ echo "checked";
17
+ } ?>/>
18
+ </td>
19
+ <td valign="middle">
20
+ <p class="description"><?php _e('Toggles Maintenance Mode.', 'wp-htaccess-control'); ?></p>
21
+ </td>
22
+ </tr>
23
+ <tr valign="top">
24
+ <th scope="row" style="width:18%;"><?php _e('Allowed IPs', 'wp-htaccess-control'); ?></th>
25
+ <td>
26
+ <textarea name="WPhtc_maintenance_ips"><?php if ($WPhtc->get_data('maintenance_ips')) {
27
+ echo implode($WPhtc->get_data('maintenance_ips'), "\n");
28
+ } ?></textarea>
29
+ </td>
30
+ <td valign="middle">
31
+ <p class="description"><?php _e('List of allowed IPs.', 'wp-htaccess-control'); ?></p>
32
+
33
+ <p class="description"><?php _e('All the IPs not listed will view the 403 error page or be redirected to a page set below.', 'wp-htaccess-control'); ?></p>
34
+ </td>
35
+ </tr>
36
+ <tr valign="top">
37
+ <th scope="row" style="width:18%;"><?php _e('Redirection', 'wp-htaccess-control'); ?></th>
38
+ <td>
39
+ <input type="text" name="WPhtc_maintenance_redirection"
40
+ value="<?php echo $WPhtc->get_data('maintenance_redirection') ?>"/>
41
+ </td>
42
+ <td valign="middle">
43
+ <p class="description"><?php _e('If set, this will be used as redirection for disallowed IPs. This could be an external url or a document on your server (local paths begin with a trailing slash)', 'wp-htaccess-control'); ?></p>
44
+ </td>
45
+ </tr>
46
+ </table>
47
+ </div>
admin-ui-includes/more-rewrite.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- More Rewrite Settings -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('More Rewrite Settings', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <th scope="row" style="width:18%;"><?php _e("Remove hierarchy", 'wp-htaccess-control'); ?></th>
13
+ <td style="width:3%;" valign="middle">
14
+ <input type="checkbox" name="WPhtc_remove_hierarchy"
15
+ value="true" <?php if ($WPhtc->get_data('remove_hierarchy')) {
16
+ echo "checked";
17
+ } ?>/>
18
+ </td>
19
+ <td valign="middle">
20
+ <p class="description"><?php _e("Remove hierarchy from taxonomy permalinks (this might be interesting when removing the category base).", 'wp-htaccess-control'); ?></p>
21
+ </td>
22
+ </tr>
23
+ <!--<tr valign="top">
24
+ <th scope="row" style="width:18%;"><?php _e(".html suffix", 'wp-htaccess-control'); ?></th>
25
+ <td style="width:3%;" valign="middle">
26
+ <input type="checkbox" name="WPhtc_suffix_html" value="true" <?php if($WPhtc->get_data('suffix_html')){ echo "checked";}?>/>
27
+ </td>
28
+ <td valign="middle">
29
+ <p class="description"><?php _e("Add '.html' at the end of taxonomy permalinks.", 'wp-htaccess-control'); ?></p>
30
+ </td>
31
+ </tr>-->
32
+ </table>
33
+ </div>
admin-ui-includes/remove-bases.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc;?>
2
+ <!-- Remove Taxonomies and Author Base -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Remove Taxonomies and Author Base', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <!-- Remove Author Base -->
12
+ <tr valign="top">
13
+ <th scope="row" style="width:18%;"><?php _e('Remove Author Base', 'wp-htaccess-control'); ?></th>
14
+ <td>
15
+ <input type="checkbox"
16
+ name="WPhtc_remove_author_base" <?php if ($WPhtc->get_data('remove_author_base')) {
17
+ echo "checked=checked";
18
+ } ?> />
19
+ </td>
20
+ <td valign="middle">
21
+ <p class="description"><?php _e('If active, the author base will be removed from permalinks:'); ?></p>
22
+
23
+ <p class="description"><code><?php bloginfo('url') ?>
24
+ /<?php _e('the-author', 'wp-htaccess-control'); ?></code></p>
25
+
26
+ <p class="description">
27
+ <strong><?php _e('Beware:'); ?></strong> <?php _e('This could conflict with the removal of the category base on a situation where a category slug is the same as a user nicename.'); ?>
28
+ </p>
29
+ </td>
30
+ </tr>
31
+ <!-- Remove Taxonomies Base -->
32
+ <?php foreach (get_taxonomies('', 'objects') as $taxonomy) {
33
+ if (!$taxonomy->rewrite) {
34
+ continue;
35
+ }
36
+ ?>
37
+ <tr valign="top">
38
+ <th scope="row" style="width:18%;"><?php _e('Remove', 'wp-htaccess-control');
39
+ echo " " . $taxonomy->labels->name . " ";
40
+ _e('Base', 'wp-htaccess-control'); ?></th>
41
+ <td>
42
+ <input type="checkbox"
43
+ name="WPhtc_remove_base[<?php echo $taxonomy->name; ?>]" <?php if ($WPhtc->get_data('remove_taxonomy_base', $taxonomy->name)) {
44
+ echo "checked=checked";
45
+ } ?> />
46
+ </td>
47
+ <td valign="middle">
48
+ <p class="description"><?php _e('If active, the');
49
+ echo " " . $taxonomy->labels->name . " ";
50
+ _e('base will be removed from permalinks:'); ?></p>
51
+
52
+ <p class="description"><code><?php bloginfo('url') ?>/<?php echo $taxonomy->name; ?>_term</code></p>
53
+
54
+ <p class="description">
55
+ <strong><?php _e('Beware:'); ?></strong> <?php _e('This could conflict with the removal of the other permalink bases on a situation where a term slug is the same.'); ?>
56
+ </p>
57
+ </td>
58
+ </tr>
59
+ <?php
60
+ }
61
+ ?>
62
+ </table>
63
+ </div>
admin-ui-includes/replace-htaccess.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $WPhtc; ?>
2
+ <!-- Replace WordPress htaccess -->
3
+ <div class="wphtc-section">
4
+ <div class="wphtc-section-title stuffbox">
5
+ <div title="Click to toggle" class="handlediv"
6
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
7
+ <br></div>
8
+ <h3><?php _e('Replace WordPress htaccess', 'wp-htaccess-control'); ?></h3>
9
+ </div>
10
+ <table class="form-table wphtc-inputs">
11
+ <tr valign="top">
12
+ <td>
13
+ <textarea name="WPhtc_wp_hta" style="width:100%;"
14
+ rows="7" <?php if ($WPhtc->get_data('jim_morgan_hta')) {
15
+ echo "readonly='true' class='readonly'";
16
+ } ?>><?php echo stripslashes($WPhtc->get_data('wp_hta')); ?></textarea>
17
+
18
+ <p class="description"><?php _e('Leave empty for default.', 'wp-htaccess-control'); ?></p>
19
+ </td>
20
+ <td style="width:50%;">
21
+ <p class="description"><?php _e('This rules will be printed instead of WordPress rules.', 'wp-htaccess-control'); ?></p>
22
+
23
+ <p class="description"><?php _e('Please double check them before saving as a mistake could make your site inaccessible.', 'wp-htaccess-control'); ?></p>
24
+
25
+ <p class="description"><?php _e('Original rules:', 'wp-htaccess-control'); ?></p>
26
+
27
+ <p class="description">
28
+ <code><?php echo nl2br(htmlspecialchars(substr($WPhtc->get_data('htaccess_original'), 0, -1))); ?></code>
29
+ </p>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <td colspan="2">
34
+ <p><?php _e("For instance, <strong><a href='http://www.webmasterworld.com/apache/4053973.htm'>Jim Morgan's wordpress htaccess</a></strong> has been reported to \"speed up your WP mod_rewrite code by a factor of more than two\".", 'wp-htaccess-control'); ?></p>
35
+
36
+ <pre>RewriteEngine on
37
+ # Unless you have set a different RewriteBase preceding this point,
38
+ # you may delete or comment-out the following RewriteBase directive:
39
+ RewriteBase /
40
+ # if this request is for "/" or has already been rewritten to WP
41
+ RewriteCond $1 ^(index.php)?$ [OR]
42
+ # or if request is for image, css, or js file
43
+ RewriteCond $1 .(gif|jpg|jpeg|png|css|js|ico)$ [NC,OR]
44
+ # or if URL resolves to existing file
45
+ RewriteCond %{REQUEST_FILENAME} -f [OR]
46
+ # or if URL resolves to existing directory
47
+ RewriteCond %{REQUEST_FILENAME} -d
48
+ # then skip the rewrite to WP
49
+ RewriteRule ^(.*)$ - [S=1]
50
+ # else rewrite the request to WP
51
+ RewriteRule . /index.php [L]
52
+ </pre>
53
+ <p><?php _e("Please note, if your WordPress install is in a subdirectory, you'll have to adjust the first RewriteBase and the last RewriteRule accordingly <br/>(ie: <code>RewriteBase /SUBDIRECTORY/</code> and <code>RewriteRule . /SUBDIRECTORY/index.php [L]</code>)", 'wp-htaccess-control'); ?></p>
54
+ </td>
55
+ </tr>
56
+ </table>
57
+ </div>
admin-ui-includes/sidebar.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $WPhtc;
3
+ $plugin_path = $WPhtc->plugin_path;
4
+ $plugin_url = $WPhtc->plugin_url;
5
+ ?>
6
+
7
+ <div id="wphtc-sidebar">
8
+ <div class="wphtc-section">
9
+ <div class="wphtc-section-title stuffbox">
10
+ <!--<div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>-->
11
+ <h3><?php _e('About this Plugin', 'wp-htaccess-control'); ?></h3>
12
+ </div>
13
+ <div class="wphtc-inputs">
14
+ <ul>
15
+ <li><a href="http://antonioandra.de/wp-htaccess-control"><img width="16" height="16"
16
+ src="<?php echo $plugin_url ?>/images/antonioandra.de_favicon.png">
17
+ Plugin Homepage</a></li>
18
+ <li><a href="http://wordpress.org/extend/plugins/wp-htaccess-control/"><img
19
+ src="<?php echo $plugin_url ?>/images/favicon.ico"> Plugin at WordPress.org </a></li>
20
+ <li>
21
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=antonio%40antonioandra%2ede&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img
22
+ width="16" height="16" src="<?php echo $plugin_url ?>/images/pp_favicon_x.ico"> Donate with
23
+ Paypal</a></li>
24
+ </ul>
25
+ </div>
26
+ </div>
27
+ <div class="wphtc-section">
28
+ <div class="wphtc-section-title stuffbox">
29
+ <h3><?php _e('Latest donations', 'wp-htaccess-control'); ?></h3>
30
+ </div>
31
+ <div class="wphtc-inputs">
32
+ <iframe width="100%" src="http://antonioandra.de/wp-htaccess-control-donations"></iframe>
33
+ </div>
34
+ </div>
35
+ <p id="foot">WP htaccess Control <?php _e('by', 'wp-htaccess-control'); ?> António Andrade</p>
36
+ </div>
index.php CHANGED
@@ -12,11 +12,11 @@
12
  <title>WP htaccess Control Plugin</title>
13
  </head>
14
  <body>
15
- <h1><a href="http://wordpress.org/extend/plugins/wp-htaccess-control/" title="Visit this Plugin at the Wordpress Plugin Directory">WP htaccess Control</a></h1>
16
  <p><strong>Plugin Author:</strong> <a href="http://antonioandra.de/" title="Visit the Author">António Andrade</a></p>
17
  <h2>Links</h2>
18
  <ul>
19
- <li><a href="http://wordpress.org/extend/plugins/wp-htaccess-control/" title="Visit this Plugin at the Wordpress Plugin Directory">WP htaccess Control at the Plugin Directory</a></li>
20
  <li><a href="http://antonioandra.de/wp-htaccess-control" title="Visit the Plugin Homepage">Plugin Homepage</a></li>
21
  <li><a href="http://antonioandra.de/" title="Visit the Author">Author Homepage</a></li>
22
  </ul>
12
  <title>WP htaccess Control Plugin</title>
13
  </head>
14
  <body>
15
+ <h1><a href="http://wordpress.org/extend/plugins/wp-htaccess-control/" title="Visit this Plugin at the WordPress Plugin Directory">WP htaccess Control</a></h1>
16
  <p><strong>Plugin Author:</strong> <a href="http://antonioandra.de/" title="Visit the Author">António Andrade</a></p>
17
  <h2>Links</h2>
18
  <ul>
19
+ <li><a href="http://wordpress.org/extend/plugins/wp-htaccess-control/" title="Visit this Plugin at the WordPress Plugin Directory">WP htaccess Control at the Plugin Directory</a></li>
20
  <li><a href="http://antonioandra.de/wp-htaccess-control" title="Visit the Plugin Homepage">Plugin Homepage</a></li>
21
  <li><a href="http://antonioandra.de/" title="Visit the Author">Author Homepage</a></li>
22
  </ul>
lang/wp-htaccess-control-pt_BR.po CHANGED
@@ -150,8 +150,8 @@ msgid "Custom htaccess"
150
  msgstr "htaccess Personalizado"
151
 
152
  #: wp-htaccess-control-ui.php:151
153
- msgid "This rules will be printed before any Wordpress rules."
154
- msgstr "Estas regras serão impressas antes das regras do Wordpress."
155
 
156
  #: wp-htaccess-control-ui.php:152
157
  #: wp-htaccess-control-ui.php:178
@@ -159,8 +159,8 @@ msgid "Please double check them before saving as a mistake could make your site
159
  msgstr "Por favor reveja as suas regras antes de as salvar pois qualquer erro poder tornar o seu site inacessivel."
160
 
161
  #: wp-htaccess-control-ui.php:166
162
- msgid "Replace Wordpress htaccess"
163
- msgstr "Substituir htaccess do Wordpress"
164
 
165
  #: wp-htaccess-control-ui.php:172
166
  msgid "Leave empty for default."
@@ -171,8 +171,8 @@ msgid "<strong>Use <a href='http://www.webmasterworld.com/apache/4053973.htm'>Ji
171
  msgstr "<strong>Utilizar <a href='http://www.webmasterworld.com/apache/4053973.htm'>o htaccess para wordpress de Jim Morgan</a></strong> (pode \"acelerar o mod_rewrite do wordpress por mais de duas vezes\")"
172
 
173
  #: wp-htaccess-control-ui.php:177
174
- msgid "This rules will be printed instead of Wordpress rules."
175
- msgstr "Estas regras serão impressas em vez das regras do Wordpress."
176
 
177
  #: wp-htaccess-control-ui.php:179
178
  msgid "Original rules:"
@@ -284,7 +284,7 @@ msgstr "Forçar sem-WWW"
284
 
285
  #: wp-htaccess-control-ui.php:301
286
  msgid "This will force canonization. This will be done by simply modifying the wordpress \"site url\" and \"home\" options (not htaccess)."
287
- msgstr "Forçar canonização. Não utilizará htaccess mas sim as opções do Wordpress \"site url\" e \"home\"."
288
 
289
  #: wp-htaccess-control-ui.php:312
290
  msgid "Rewrite Pairs"
@@ -299,8 +299,8 @@ msgid "Add rule"
299
  msgstr "Juntar regra"
300
 
301
  #: wp-htaccess-control-ui.php:318
302
- msgid "These are rewrite pairs (RewriteRule) which Wordpress can add inside its rules."
303
- msgstr "Estes pares rewrite (RewriteRule) serão adicionados às regras geradas pelo Wordpress."
304
 
305
  #: wp-htaccess-control-ui.php:327
306
  msgid "Delete Pair"
@@ -347,8 +347,8 @@ msgid "Save all changes"
347
  msgstr "Salvar todas as modificações"
348
 
349
  #: wp-htaccess-control-ui.php:380
350
- msgid "Current htaccess file as it is generated by Wordpress"
351
- msgstr "Ficheiro htaccess tal como gerado actualmente pelo Wordpress"
352
 
353
  #: wp-htaccess-control-ui.php:388
354
  msgid "by"
@@ -363,12 +363,12 @@ msgid "All options updated."
363
  msgstr "As modificações foram salvas."
364
 
365
  #: wp-htaccess-control.php:512
366
- msgid "Wordpress Rewrite pairs reset."
367
- msgstr "Pares de Rewrite do Wordpress reiniciados."
368
 
369
  #: wp-htaccess-control.php:518
370
- msgid "Wordpress Rewrite pair deleted."
371
- msgstr "Par de Rewrite do Wordpress apagado."
372
 
373
  #. Plugin Name of the plugin/theme
374
  msgid "WP htaccess Control"
150
  msgstr "htaccess Personalizado"
151
 
152
  #: wp-htaccess-control-ui.php:151
153
+ msgid "This rules will be printed before any WordPress rules."
154
+ msgstr "Estas regras serão impressas antes das regras do WordPress."
155
 
156
  #: wp-htaccess-control-ui.php:152
157
  #: wp-htaccess-control-ui.php:178
159
  msgstr "Por favor reveja as suas regras antes de as salvar pois qualquer erro poder tornar o seu site inacessivel."
160
 
161
  #: wp-htaccess-control-ui.php:166
162
+ msgid "Replace WordPress htaccess"
163
+ msgstr "Substituir htaccess do WordPress"
164
 
165
  #: wp-htaccess-control-ui.php:172
166
  msgid "Leave empty for default."
171
  msgstr "<strong>Utilizar <a href='http://www.webmasterworld.com/apache/4053973.htm'>o htaccess para wordpress de Jim Morgan</a></strong> (pode \"acelerar o mod_rewrite do wordpress por mais de duas vezes\")"
172
 
173
  #: wp-htaccess-control-ui.php:177
174
+ msgid "This rules will be printed instead of WordPress rules."
175
+ msgstr "Estas regras serão impressas em vez das regras do WordPress."
176
 
177
  #: wp-htaccess-control-ui.php:179
178
  msgid "Original rules:"
284
 
285
  #: wp-htaccess-control-ui.php:301
286
  msgid "This will force canonization. This will be done by simply modifying the wordpress \"site url\" and \"home\" options (not htaccess)."
287
+ msgstr "Forçar canonização. Não utilizará htaccess mas sim as opções do WordPress \"site url\" e \"home\"."
288
 
289
  #: wp-htaccess-control-ui.php:312
290
  msgid "Rewrite Pairs"
299
  msgstr "Juntar regra"
300
 
301
  #: wp-htaccess-control-ui.php:318
302
+ msgid "These are rewrite pairs (RewriteRule) which WordPress can add inside its rules."
303
+ msgstr "Estes pares rewrite (RewriteRule) serão adicionados às regras geradas pelo WordPress."
304
 
305
  #: wp-htaccess-control-ui.php:327
306
  msgid "Delete Pair"
347
  msgstr "Salvar todas as modificações"
348
 
349
  #: wp-htaccess-control-ui.php:380
350
+ msgid "Current htaccess file as it is generated by WordPress"
351
+ msgstr "Ficheiro htaccess tal como gerado actualmente pelo WordPress"
352
 
353
  #: wp-htaccess-control-ui.php:388
354
  msgid "by"
363
  msgstr "As modificações foram salvas."
364
 
365
  #: wp-htaccess-control.php:512
366
+ msgid "WordPress Rewrite pairs reset."
367
+ msgstr "Pares de Rewrite do WordPress reiniciados."
368
 
369
  #: wp-htaccess-control.php:518
370
+ msgid "WordPress Rewrite pair deleted."
371
+ msgstr "Par de Rewrite do WordPress apagado."
372
 
373
  #. Plugin Name of the plugin/theme
374
  msgid "WP htaccess Control"
lang/wp-htaccess-control-pt_PT.po CHANGED
@@ -150,8 +150,8 @@ msgid "Custom htaccess"
150
  msgstr "htaccess Personalizado"
151
 
152
  #: wp-htaccess-control-ui.php:151
153
- msgid "This rules will be printed before any Wordpress rules."
154
- msgstr "Estas regras serão impressas antes das regras do Wordpress."
155
 
156
  #: wp-htaccess-control-ui.php:152
157
  #: wp-htaccess-control-ui.php:178
@@ -159,8 +159,8 @@ msgid "Please double check them before saving as a mistake could make your site
159
  msgstr "Por favor reveja as suas regras antes de as salvar pois qualquer erro poder tornar o seu site inacessivel."
160
 
161
  #: wp-htaccess-control-ui.php:166
162
- msgid "Replace Wordpress htaccess"
163
- msgstr "Substituir htaccess do Wordpress"
164
 
165
  #: wp-htaccess-control-ui.php:172
166
  msgid "Leave empty for default."
@@ -171,8 +171,8 @@ msgid "<strong>Use <a href='http://www.webmasterworld.com/apache/4053973.htm'>Ji
171
  msgstr "<strong>Utilizar <a href='http://www.webmasterworld.com/apache/4053973.htm'>o htaccess para wordpress de Jim Morgan</a></strong> (pode \"acelerar o mod_rewrite do wordpress por mais de duas vezes\")"
172
 
173
  #: wp-htaccess-control-ui.php:177
174
- msgid "This rules will be printed instead of Wordpress rules."
175
- msgstr "Estas regras serão impressas em vez das regras do Wordpress."
176
 
177
  #: wp-htaccess-control-ui.php:179
178
  msgid "Original rules:"
@@ -284,7 +284,7 @@ msgstr "Forçar sem-WWW"
284
 
285
  #: wp-htaccess-control-ui.php:301
286
  msgid "This will force canonization. This will be done by simply modifying the wordpress \"site url\" and \"home\" options (not htaccess)."
287
- msgstr "Forçar canonização. Não utilizará htaccess mas sim as opções do Wordpress \"site url\" e \"home\"."
288
 
289
  #: wp-htaccess-control-ui.php:312
290
  msgid "Rewrite Pairs"
@@ -299,8 +299,8 @@ msgid "Add rule"
299
  msgstr "Juntar regra"
300
 
301
  #: wp-htaccess-control-ui.php:318
302
- msgid "These are rewrite pairs (RewriteRule) which Wordpress can add inside its rules."
303
- msgstr "Estes pares rewrite (RewriteRule) serão adicionados às regras geradas pelo Wordpress."
304
 
305
  #: wp-htaccess-control-ui.php:327
306
  msgid "Delete Pair"
@@ -347,8 +347,8 @@ msgid "Save all changes"
347
  msgstr "Salvar todas as modificações"
348
 
349
  #: wp-htaccess-control-ui.php:380
350
- msgid "Current htaccess file as it is generated by Wordpress"
351
- msgstr "Ficheiro htaccess tal como gerado actualmente pelo Wordpress"
352
 
353
  #: wp-htaccess-control-ui.php:388
354
  msgid "by"
@@ -363,12 +363,12 @@ msgid "All options updated."
363
  msgstr "As modificações foram salvas."
364
 
365
  #: wp-htaccess-control.php:512
366
- msgid "Wordpress Rewrite pairs reset."
367
- msgstr "Pares de Rewrite do Wordpress reiniciados."
368
 
369
  #: wp-htaccess-control.php:518
370
- msgid "Wordpress Rewrite pair deleted."
371
- msgstr "Par de Rewrite do Wordpress apagado."
372
 
373
  #. Plugin Name of the plugin/theme
374
  msgid "WP htaccess Control"
150
  msgstr "htaccess Personalizado"
151
 
152
  #: wp-htaccess-control-ui.php:151
153
+ msgid "This rules will be printed before any WordPress rules."
154
+ msgstr "Estas regras serão impressas antes das regras do WordPress."
155
 
156
  #: wp-htaccess-control-ui.php:152
157
  #: wp-htaccess-control-ui.php:178
159
  msgstr "Por favor reveja as suas regras antes de as salvar pois qualquer erro poder tornar o seu site inacessivel."
160
 
161
  #: wp-htaccess-control-ui.php:166
162
+ msgid "Replace WordPress htaccess"
163
+ msgstr "Substituir htaccess do WordPress"
164
 
165
  #: wp-htaccess-control-ui.php:172
166
  msgid "Leave empty for default."
171
  msgstr "<strong>Utilizar <a href='http://www.webmasterworld.com/apache/4053973.htm'>o htaccess para wordpress de Jim Morgan</a></strong> (pode \"acelerar o mod_rewrite do wordpress por mais de duas vezes\")"
172
 
173
  #: wp-htaccess-control-ui.php:177
174
+ msgid "This rules will be printed instead of WordPress rules."
175
+ msgstr "Estas regras serão impressas em vez das regras do WordPress."
176
 
177
  #: wp-htaccess-control-ui.php:179
178
  msgid "Original rules:"
284
 
285
  #: wp-htaccess-control-ui.php:301
286
  msgid "This will force canonization. This will be done by simply modifying the wordpress \"site url\" and \"home\" options (not htaccess)."
287
+ msgstr "Forçar canonização. Não utilizará htaccess mas sim as opções do WordPress \"site url\" e \"home\"."
288
 
289
  #: wp-htaccess-control-ui.php:312
290
  msgid "Rewrite Pairs"
299
  msgstr "Juntar regra"
300
 
301
  #: wp-htaccess-control-ui.php:318
302
+ msgid "These are rewrite pairs (RewriteRule) which WordPress can add inside its rules."
303
+ msgstr "Estes pares rewrite (RewriteRule) serão adicionados às regras geradas pelo WordPress."
304
 
305
  #: wp-htaccess-control-ui.php:327
306
  msgid "Delete Pair"
347
  msgstr "Salvar todas as modificações"
348
 
349
  #: wp-htaccess-control-ui.php:380
350
+ msgid "Current htaccess file as it is generated by WordPress"
351
+ msgstr "Ficheiro htaccess tal como gerado actualmente pelo WordPress"
352
 
353
  #: wp-htaccess-control-ui.php:388
354
  msgid "by"
363
  msgstr "As modificações foram salvas."
364
 
365
  #: wp-htaccess-control.php:512
366
+ msgid "WordPress Rewrite pairs reset."
367
+ msgstr "Pares de Rewrite do WordPress reiniciados."
368
 
369
  #: wp-htaccess-control.php:518
370
+ msgid "WordPress Rewrite pair deleted."
371
+ msgstr "Par de Rewrite do WordPress apagado."
372
 
373
  #. Plugin Name of the plugin/theme
374
  msgid "WP htaccess Control"
lang/wp-htaccess-control.pot CHANGED
@@ -1,400 +1,580 @@
1
- # Translation of the WordPress plugin WP htaccess Control, by António Andrade.
2
- # Copyright (C) 2010-2012 António Andrade
3
  # This file is distributed under the same license as the WP htaccess Control package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, 2010-2012.
5
- #
6
- #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: WP htaccess Control\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-htaccess-control\n"
11
- "POT-Creation-Date: 2010-11-27 19:02+0000\n"
12
- "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=utf-8\n"
17
  "Content-Transfer-Encoding: 8bit\n"
 
 
 
18
 
19
- #: wp-htaccess-control-ui.php:15
20
- msgid "Please log in as admin"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  msgstr ""
22
 
23
- #: wp-htaccess-control-ui.php:27
24
  msgid "Custom Author Permalink"
25
  msgstr ""
26
 
27
- #: wp-htaccess-control-ui.php:31
28
  msgid "Author Base"
29
  msgstr ""
30
 
31
- #: wp-htaccess-control-ui.php:34 wp-htaccess-control-ui.php:67
 
 
32
  msgid "(your-base)"
33
  msgstr ""
34
 
35
- #: wp-htaccess-control-ui.php:37 wp-htaccess-control-ui.php:70
 
 
36
  msgid "Permalink settings must be set and not Default (/?p=123)."
37
  msgstr ""
38
 
39
- #: wp-htaccess-control-ui.php:38
40
  msgid "If set, the author base will be used as shown next to the form field."
41
  msgstr ""
42
 
43
- #: wp-htaccess-control-ui.php:39
44
  msgid ""
45
  "If you do not want to use a custom Author Permalink base just leave the "
46
  "field empty."
47
  msgstr ""
48
 
49
- #: wp-htaccess-control-ui.php:46
50
  msgid "Apply Custom Author Permalink on Generated Sitemap"
51
  msgstr ""
52
 
53
- #: wp-htaccess-control-ui.php:49
54
  msgid ""
55
  "Leave \"Include author pages\" unchecked on Google XML Sitemap options page "
56
  "if using this."
57
  msgstr ""
58
 
59
- #: wp-htaccess-control-ui.php:50
60
  msgid ""
61
  "However, if you want to adjust the \"Priority\" or \"Change frequency\" you "
62
  "should do so on the <a href=\"options-general.php?page=google-sitemap-"
63
  "generator/sitemap.php\">Google XML Sitemap options page</a>."
64
  msgstr ""
65
 
66
- #: wp-htaccess-control-ui.php:60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  msgid "Custom Pagination Permalink"
68
  msgstr ""
69
 
70
- #: wp-htaccess-control-ui.php:64
71
  msgid "Page Base"
72
  msgstr ""
73
 
74
- #: wp-htaccess-control-ui.php:71
75
  msgid ""
76
  "If set, the page base will be used as shown next to the form field in every "
77
  "post listing (category, tag, archive, etc)."
78
  msgstr ""
79
 
80
- #: wp-htaccess-control-ui.php:72
81
  msgid ""
82
  "If you do not want to use a custom Pagination Permalink base just leave the "
83
  "field empty."
84
  msgstr ""
85
 
86
- #: wp-htaccess-control-ui.php:81 wp-htaccess-control-ui.php:85
87
- msgid "Remove Category Base"
88
  msgstr ""
89
 
90
- #: wp-htaccess-control-ui.php:90
91
- msgid "If active, the category base will be removed from permalinks:"
92
  msgstr ""
93
 
94
- #: wp-htaccess-control-ui.php:91 wp-htaccess-control-ui.php:110
95
- #: wp-htaccess-control-ui.php:111
96
- msgid "your-category"
97
  msgstr ""
98
 
99
- #: wp-htaccess-control-ui.php:100
100
- msgid "Advanced Archives"
 
 
101
  msgstr ""
102
 
103
- #: wp-htaccess-control-ui.php:104
104
- msgid "Category Archives"
105
  msgstr ""
106
 
107
- #: wp-htaccess-control-ui.php:109
108
- msgid ""
109
- "If active, category-based archives will be accessible using the structure:"
110
  msgstr ""
111
 
112
- #: wp-htaccess-control-ui.php:110 wp-htaccess-control-ui.php:111
113
- msgid "your-category-base"
114
  msgstr ""
115
 
116
- #: wp-htaccess-control-ui.php:112
117
- msgid "This will also work if you've removed the category base."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  msgstr ""
119
 
120
- #: wp-htaccess-control-ui.php:116
121
- msgid "Author Archives"
 
 
 
 
122
  msgstr ""
123
 
124
- #: wp-htaccess-control-ui.php:121
125
  msgid ""
126
- "If active, author-based archives will be accessible using the structure:"
 
127
  msgstr ""
128
 
129
- #: wp-htaccess-control-ui.php:122 wp-htaccess-control-ui.php:123
130
- msgid "your-author-base"
131
  msgstr ""
132
 
133
- #: wp-htaccess-control-ui.php:122 wp-htaccess-control-ui.php:123
134
- msgid "your-author"
135
  msgstr ""
136
 
137
- #: wp-htaccess-control-ui.php:127
138
- msgid "Tag Archives"
139
  msgstr ""
140
 
141
- #: wp-htaccess-control-ui.php:132
142
- msgid "If active, tag-based archives will be accessible using the structure:"
143
  msgstr ""
144
 
145
- #: wp-htaccess-control-ui.php:133 wp-htaccess-control-ui.php:134
146
- msgid "your-tag-base"
147
  msgstr ""
148
 
149
- #: wp-htaccess-control-ui.php:133 wp-htaccess-control-ui.php:134
150
- msgid "your-tag"
151
  msgstr ""
152
 
153
- #: wp-htaccess-control-ui.php:143
154
- msgid "Custom htaccess"
 
 
 
 
 
155
  msgstr ""
156
 
157
- #: wp-htaccess-control-ui.php:151
158
- msgid "This rules will be printed before any Wordpress rules."
159
  msgstr ""
160
 
161
- #: wp-htaccess-control-ui.php:152 wp-htaccess-control-ui.php:178
162
  msgid ""
163
- "Please double check them before saving as a mistake could make your site "
164
- "inaccessible."
 
165
  msgstr ""
166
 
167
- #: wp-htaccess-control-ui.php:166
168
- msgid "Replace Wordpress htaccess"
169
  msgstr ""
170
 
171
- #: wp-htaccess-control-ui.php:172
172
- msgid "Leave empty for default."
 
 
 
 
 
 
 
 
 
 
 
 
173
  msgstr ""
174
 
175
- #: wp-htaccess-control-ui.php:174
 
 
 
 
176
  msgid ""
177
- "<strong>Use <a href='http://www.webmasterworld.com/apache/4053973.htm'>Jim "
178
- "Morgan's wordpress htaccess</a></strong> (has been reported to \"speed up "
179
- "your WP mod_rewrite code by a factor of more than two\")"
180
  msgstr ""
181
 
182
- #: wp-htaccess-control-ui.php:177
183
- msgid "This rules will be printed instead of Wordpress rules."
184
  msgstr ""
185
 
186
- #: wp-htaccess-control-ui.php:179
187
- msgid "Original rules:"
 
188
  msgstr ""
189
 
190
- #: wp-htaccess-control-ui.php:191
191
- msgid "htaccess Suggestions"
192
  msgstr ""
193
 
194
- #: wp-htaccess-control-ui.php:195
195
- msgid "ServerSignature"
196
  msgstr ""
197
 
198
- #: wp-htaccess-control-ui.php:200
199
- msgid "Disable the ServerSignature on server generated error pages."
200
  msgstr ""
201
 
202
- #: wp-htaccess-control-ui.php:204
203
- msgid "Indexes"
 
 
204
  msgstr ""
205
 
206
- #: wp-htaccess-control-ui.php:209
207
- msgid "Disable directory browsing."
208
  msgstr ""
209
 
210
- #: wp-htaccess-control-ui.php:213
211
- msgid "Protect wp-config.php file"
 
 
212
  msgstr ""
213
 
214
- #: wp-htaccess-control-ui.php:217
215
- msgid "Deny access to wp-config.php file."
 
 
216
  msgstr ""
217
 
218
- #: wp-htaccess-control-ui.php:221
219
- msgid "Protect htaccess file"
 
 
220
  msgstr ""
221
 
222
- #: wp-htaccess-control-ui.php:225
223
- msgid "Deny access to .htaccess file."
224
  msgstr ""
225
 
226
- #: wp-htaccess-control-ui.php:229
227
- msgid "mod_gzip"
228
  msgstr ""
229
 
230
- #: wp-htaccess-control-ui.php:234
231
- msgid "Use mod_gzip if available."
232
  msgstr ""
233
 
234
- #: wp-htaccess-control-ui.php:238
235
- msgid "mod_deflate"
 
 
 
236
  msgstr ""
237
 
238
- #: wp-htaccess-control-ui.php:243
239
- msgid "Use mod_deflate if available."
 
240
  msgstr ""
241
 
242
- #: wp-htaccess-control-ui.php:247
243
- msgid "Limit Upload Size"
244
  msgstr ""
245
 
246
- #: wp-htaccess-control-ui.php:252
247
- msgid "If set, this value in MB will be used as limit to file uploads."
248
  msgstr ""
249
 
250
- #: wp-htaccess-control-ui.php:256
251
- msgid "Admin Email"
252
  msgstr ""
253
 
254
- #: wp-htaccess-control-ui.php:261
255
  msgid ""
256
- "If set, this will be used as the admin email on server generated error pages."
 
 
 
 
 
 
 
257
  msgstr ""
258
 
259
- #: wp-htaccess-control-ui.php:265
260
- msgid "Disable hotlinking"
261
  msgstr ""
262
 
263
- #: wp-htaccess-control-ui.php:270
 
 
 
 
 
 
 
 
264
  msgid ""
265
- "If set, this url will be used as redirection to hotlinked images (you should "
266
- "be using an image url here). If you prefer no output on hotlinked images use "
267
- "\"-\"."
268
  msgstr ""
269
 
270
- #: wp-htaccess-control-ui.php:274
271
- msgid "500 error"
272
  msgstr ""
273
 
274
- #: wp-htaccess-control-ui.php:279
275
  msgid ""
276
- "If set, this path will be used as page to 500 errors (example: /error.php)."
 
 
277
  msgstr ""
278
 
279
- #: wp-htaccess-control-ui.php:283
280
- msgid "403 error"
281
  msgstr ""
282
 
283
- #: wp-htaccess-control-ui.php:288
 
 
 
 
284
  msgid ""
285
- "If set, this path will be used as page to 403 errors (example: /error.php)."
 
286
  msgstr ""
287
 
288
- #: wp-htaccess-control-ui.php:292
289
- msgid "Canonical Url"
290
  msgstr ""
291
 
292
- #: wp-htaccess-control-ui.php:296
293
- msgid "Force WWW"
294
  msgstr ""
295
 
296
- #: wp-htaccess-control-ui.php:297
297
- msgid "Force non-WWW"
298
  msgstr ""
299
 
300
- #: wp-htaccess-control-ui.php:301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  msgid ""
302
- "This will force canonization. This will be done by simply modifying the "
303
- "wordpress \"site url\" and \"home\" options (not htaccess)."
304
  msgstr ""
305
 
306
- #: wp-htaccess-control-ui.php:312
307
- msgid "Rewrite Pairs"
308
  msgstr ""
309
 
310
- #: wp-htaccess-control-ui.php:312
 
 
 
 
 
 
 
 
 
 
 
 
311
  msgid ""
312
- "You should migrate your rewrite pairs into the \"Custom htaccess\" rules "
313
- "above. The \"Rewrite Pairs\" will be removed in future versions as they lack "
314
- "functionality."
315
  msgstr ""
316
 
317
- #: wp-htaccess-control-ui.php:317
318
- msgid "Add rule"
319
  msgstr ""
320
 
321
- #: wp-htaccess-control-ui.php:318
 
 
 
 
 
 
 
 
 
 
 
 
322
  msgid ""
323
- "These are rewrite pairs (RewriteRule) which Wordpress can add inside its "
324
- "rules."
 
325
  msgstr ""
326
 
327
- #: wp-htaccess-control-ui.php:327
328
- msgid "Delete Pair"
 
 
 
 
329
  msgstr ""
330
 
331
- #: wp-htaccess-control-ui.php:337
332
- msgid "Maintenance Mode"
333
  msgstr ""
334
 
335
- #: wp-htaccess-control-ui.php:341
336
- msgid "Maintenance Active"
337
  msgstr ""
338
 
339
- #: wp-htaccess-control-ui.php:346
340
- msgid "Toggles Maintenance Mode."
341
  msgstr ""
342
 
343
- #: wp-htaccess-control-ui.php:350
344
- msgid "Allowed IPs"
345
  msgstr ""
346
 
347
- #: wp-htaccess-control-ui.php:355
348
- msgid "List of allowed IPs."
 
 
 
 
 
 
 
 
349
  msgstr ""
350
 
351
- #: wp-htaccess-control-ui.php:356
 
 
 
 
352
  msgid ""
353
- "All the IPs not listed will view the 403 error page or be redirected to a "
354
- "page set below."
355
  msgstr ""
356
 
357
- #: wp-htaccess-control-ui.php:360
358
- msgid "Redirection"
 
 
 
 
359
  msgstr ""
360
 
361
- #: wp-htaccess-control-ui.php:365
362
  msgid ""
363
- "If set, this will be used as redirection for disallowed IPs. This could be "
364
- "an external url or a document on your server (local paths begin with a "
365
- "trailing slash)"
366
  msgstr ""
367
 
368
- #: wp-htaccess-control-ui.php:373
369
- msgid "Reset all rules"
370
  msgstr ""
371
 
372
- #: wp-htaccess-control-ui.php:374
373
- msgid "Save all changes"
 
 
374
  msgstr ""
375
 
376
- #: wp-htaccess-control-ui.php:380
377
- msgid "Current htaccess file as it is generated by Wordpress"
 
 
378
  msgstr ""
379
 
380
- #: wp-htaccess-control-ui.php:388
381
- msgid "by"
 
 
382
  msgstr ""
383
 
384
- #: wp-htaccess-control.php:411
385
- msgid "All rules reset."
386
  msgstr ""
387
 
388
- #: wp-htaccess-control.php:504
389
- msgid "All options updated."
 
 
 
 
390
  msgstr ""
391
 
392
- #: wp-htaccess-control.php:512
393
- msgid "Wordpress Rewrite pairs reset."
394
  msgstr ""
395
 
396
- #: wp-htaccess-control.php:518
397
- msgid "Wordpress Rewrite pair deleted."
398
  msgstr ""
399
 
400
  #. Plugin Name of the plugin/theme
@@ -407,9 +587,8 @@ msgstr ""
407
 
408
  #. Description of the plugin/theme
409
  msgid ""
410
- "Provides an interface to add custom htaccess rules to the htaccess file "
411
- "generated by wordpress. Also provides customisation of the Author Permalink "
412
- "Base and of Paginated Permalinks."
413
  msgstr ""
414
 
415
  #. Author of the plugin/theme
@@ -417,5 +596,5 @@ msgid "António Andrade"
417
  msgstr ""
418
 
419
  #. Author URI of the plugin/theme
420
- msgid "http://dardna.com"
421
  msgstr ""
1
+ # Copyright (C) 2014 WP htaccess Control
 
2
  # This file is distributed under the same license as the WP htaccess Control package.
 
 
 
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP htaccess Control 3.3.4\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-htaccess-control\n"
7
+ "POT-Creation-Date: 2014-04-19 01:13:05+00:00\n"
 
 
 
8
  "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: admin-ui-includes/advanced-archives.php:8
16
+ msgid "Advanced Archives"
17
+ msgstr ""
18
+
19
+ #: admin-ui-includes/advanced-archives.php:17
20
+ msgid "Create"
21
+ msgstr ""
22
+
23
+ #: admin-ui-includes/advanced-archives.php:19
24
+ msgid "Archives"
25
+ msgstr ""
26
+
27
+ #: admin-ui-includes/advanced-archives.php:27
28
+ msgid "If active, taxonomy-based archives will be accessible:"
29
+ msgstr ""
30
+
31
+ #: admin-ui-includes/advanced-archives.php:35
32
+ msgid "This will also work if you've removed the"
33
+ msgstr ""
34
+
35
+ #: admin-ui-includes/advanced-archives.php:35
36
+ msgid "base."
37
  msgstr ""
38
 
39
+ #: admin-ui-includes/custom-author-permalink.php:8
40
  msgid "Custom Author Permalink"
41
  msgstr ""
42
 
43
+ #: admin-ui-includes/custom-author-permalink.php:12
44
  msgid "Author Base"
45
  msgstr ""
46
 
47
+ #: admin-ui-includes/custom-author-permalink.php:17
48
+ #: admin-ui-includes/custom-pagination-permalink.php:16
49
+ #: admin-ui-includes/custom-search-permalink.php:17
50
  msgid "(your-base)"
51
  msgstr ""
52
 
53
+ #: admin-ui-includes/custom-author-permalink.php:20
54
+ #: admin-ui-includes/custom-pagination-permalink.php:20
55
+ #: admin-ui-includes/custom-search-permalink.php:21
56
  msgid "Permalink settings must be set and not Default (/?p=123)."
57
  msgstr ""
58
 
59
+ #: admin-ui-includes/custom-author-permalink.php:22
60
  msgid "If set, the author base will be used as shown next to the form field."
61
  msgstr ""
62
 
63
+ #: admin-ui-includes/custom-author-permalink.php:24
64
  msgid ""
65
  "If you do not want to use a custom Author Permalink base just leave the "
66
  "field empty."
67
  msgstr ""
68
 
69
+ #: admin-ui-includes/custom-author-permalink.php:34
70
  msgid "Apply Custom Author Permalink on Generated Sitemap"
71
  msgstr ""
72
 
73
+ #: admin-ui-includes/custom-author-permalink.php:37
74
  msgid ""
75
  "Leave \"Include author pages\" unchecked on Google XML Sitemap options page "
76
  "if using this."
77
  msgstr ""
78
 
79
+ #: admin-ui-includes/custom-author-permalink.php:39
80
  msgid ""
81
  "However, if you want to adjust the \"Priority\" or \"Change frequency\" you "
82
  "should do so on the <a href=\"options-general.php?page=google-sitemap-"
83
  "generator/sitemap.php\">Google XML Sitemap options page</a>."
84
  msgstr ""
85
 
86
+ #: admin-ui-includes/custom-htaccess.php:8
87
+ msgid "Custom htaccess"
88
+ msgstr ""
89
+
90
+ #: admin-ui-includes/custom-htaccess.php:17
91
+ msgid "This rules will be printed before any WordPress rules."
92
+ msgstr ""
93
+
94
+ #: admin-ui-includes/custom-htaccess.php:19
95
+ #: admin-ui-includes/replace-htaccess.php:23
96
+ msgid ""
97
+ "Please double check them before saving as a mistake could make your site "
98
+ "inaccessible."
99
+ msgstr ""
100
+
101
+ #: admin-ui-includes/custom-pagination-permalink.php:8
102
  msgid "Custom Pagination Permalink"
103
  msgstr ""
104
 
105
+ #: admin-ui-includes/custom-pagination-permalink.php:12
106
  msgid "Page Base"
107
  msgstr ""
108
 
109
+ #: admin-ui-includes/custom-pagination-permalink.php:22
110
  msgid ""
111
  "If set, the page base will be used as shown next to the form field in every "
112
  "post listing (category, tag, archive, etc)."
113
  msgstr ""
114
 
115
+ #: admin-ui-includes/custom-pagination-permalink.php:24
116
  msgid ""
117
  "If you do not want to use a custom Pagination Permalink base just leave the "
118
  "field empty."
119
  msgstr ""
120
 
121
+ #: admin-ui-includes/custom-search-permalink.php:8
122
+ msgid "Custom Search Permalink"
123
  msgstr ""
124
 
125
+ #: admin-ui-includes/custom-search-permalink.php:12
126
+ msgid "Search Base"
127
  msgstr ""
128
 
129
+ #: admin-ui-includes/custom-search-permalink.php:23
130
+ msgid ""
131
+ "If set, the search base will always be used instead of \"?s=search-term\"."
132
  msgstr ""
133
 
134
+ #: admin-ui-includes/custom-search-permalink.php:25
135
+ msgid ""
136
+ "If you do not want to use a custom Search Permalink base just leave the "
137
+ "field empty."
138
  msgstr ""
139
 
140
+ #: admin-ui-includes/htaccess-suggestions.php:8
141
+ msgid "htaccess Suggestions"
142
  msgstr ""
143
 
144
+ #: admin-ui-includes/htaccess-suggestions.php:12
145
+ msgid "ServerSignature"
 
146
  msgstr ""
147
 
148
+ #: admin-ui-includes/htaccess-suggestions.php:20
149
+ msgid "Disable the ServerSignature on server generated error pages."
150
  msgstr ""
151
 
152
+ #: admin-ui-includes/htaccess-suggestions.php:24
153
+ msgid "Indexes"
154
+ msgstr ""
155
+
156
+ #: admin-ui-includes/htaccess-suggestions.php:32
157
+ msgid "Disable directory browsing."
158
+ msgstr ""
159
+
160
+ #: admin-ui-includes/htaccess-suggestions.php:36
161
+ msgid "Protect wp-config.php file"
162
+ msgstr ""
163
+
164
+ #: admin-ui-includes/htaccess-suggestions.php:43
165
+ msgid "Deny access to wp-config.php file."
166
+ msgstr ""
167
+
168
+ #: admin-ui-includes/htaccess-suggestions.php:47
169
+ msgid "Protect htaccess file"
170
  msgstr ""
171
 
172
+ #: admin-ui-includes/htaccess-suggestions.php:54
173
+ msgid "Deny access to .htaccess file."
174
+ msgstr ""
175
+
176
+ #: admin-ui-includes/htaccess-suggestions.php:58
177
+ msgid "Protect comments.php"
178
  msgstr ""
179
 
180
+ #: admin-ui-includes/htaccess-suggestions.php:65
181
  msgid ""
182
+ "Deny comment posting to no referrer requests. This will avoid spam bots "
183
+ "coming from nowhere."
184
  msgstr ""
185
 
186
+ #: admin-ui-includes/htaccess-suggestions.php:69
187
+ msgid "mod_gzip"
188
  msgstr ""
189
 
190
+ #: admin-ui-includes/htaccess-suggestions.php:76
191
+ msgid "Use mod_gzip if available."
192
  msgstr ""
193
 
194
+ #: admin-ui-includes/htaccess-suggestions.php:80
195
+ msgid "mod_deflate"
196
  msgstr ""
197
 
198
+ #: admin-ui-includes/htaccess-suggestions.php:87
199
+ msgid "Use mod_deflate if available."
200
  msgstr ""
201
 
202
+ #: admin-ui-includes/htaccess-suggestions.php:91
203
+ msgid "Limit Upload Size"
204
  msgstr ""
205
 
206
+ #: admin-ui-includes/htaccess-suggestions.php:96
207
+ msgid "If set, this value in MB will be used as limit to file uploads."
208
  msgstr ""
209
 
210
+ #: admin-ui-includes/htaccess-suggestions.php:100
211
+ msgid "Admin Email"
212
+ msgstr ""
213
+
214
+ #: admin-ui-includes/htaccess-suggestions.php:105
215
+ msgid ""
216
+ "If set, this will be used as the admin email on server generated error pages."
217
  msgstr ""
218
 
219
+ #: admin-ui-includes/htaccess-suggestions.php:109
220
+ msgid "Disable image hotlinking"
221
  msgstr ""
222
 
223
+ #: admin-ui-includes/htaccess-suggestions.php:115
224
  msgid ""
225
+ "If set, this url will be used as redirection to hotlinked images (you should "
226
+ "be using an image url here). If you prefer no output on hotlinked images use "
227
+ "\"_\"."
228
  msgstr ""
229
 
230
+ #: admin-ui-includes/htaccess-suggestions.php:119
231
+ msgid "Disable file hotlinking extensions"
232
  msgstr ""
233
 
234
+ #: admin-ui-includes/htaccess-suggestions.php:125
235
+ msgid "If set, this file extensions will not be hotlinkable."
236
+ msgstr ""
237
+
238
+ #: admin-ui-includes/htaccess-suggestions.php:127
239
+ msgid "Separate different extensions with a white-space, ie: \"pdf doc zip\"."
240
+ msgstr ""
241
+
242
+ #: admin-ui-includes/htaccess-suggestions.php:131
243
+ msgid "File hotlinking redirection"
244
+ msgstr ""
245
+
246
+ #: admin-ui-includes/htaccess-suggestions.php:137
247
+ msgid "If set, this url will be used as redirection for hotlinked files."
248
  msgstr ""
249
 
250
+ #: admin-ui-includes/htaccess-suggestions.php:141
251
+ msgid "500 error"
252
+ msgstr ""
253
+
254
+ #: admin-ui-includes/htaccess-suggestions.php:146
255
  msgid ""
256
+ "If set, this path will be used as page to 500 errors (example: /error.php)."
 
 
257
  msgstr ""
258
 
259
+ #: admin-ui-includes/htaccess-suggestions.php:150
260
+ msgid "403 error"
261
  msgstr ""
262
 
263
+ #: admin-ui-includes/htaccess-suggestions.php:155
264
+ msgid ""
265
+ "If set, this path will be used as page to 403 errors (example: /error.php)."
266
  msgstr ""
267
 
268
+ #: admin-ui-includes/htaccess-suggestions.php:159
269
+ msgid "Canonical Url"
270
  msgstr ""
271
 
272
+ #: admin-ui-includes/htaccess-suggestions.php:165
273
+ msgid "Force WWW"
274
  msgstr ""
275
 
276
+ #: admin-ui-includes/htaccess-suggestions.php:168
277
+ msgid "Force non-WWW"
278
  msgstr ""
279
 
280
+ #: admin-ui-includes/htaccess-suggestions.php:172
281
+ msgid ""
282
+ "This will force canonization. This will be done by simply modifying the "
283
+ "wordpress \"site url\" and \"home\" options (not htaccess)."
284
  msgstr ""
285
 
286
+ #: admin-ui-includes/login-control.php:8
287
+ msgid "Login Control"
288
  msgstr ""
289
 
290
+ #: admin-ui-includes/login-control.php:14
291
+ msgid ""
292
+ "The options below concern wp-login.php. You'll be able to redirect all "
293
+ "traffic away from that page and set some allowed IPs."
294
  msgstr ""
295
 
296
+ #: admin-ui-includes/login-control.php:16
297
+ msgid ""
298
+ "BEWARE: once disabled you won't be able to login through that form in any "
299
+ "way, except for the listed IPs."
300
  msgstr ""
301
 
302
+ #: admin-ui-includes/login-control.php:18
303
+ msgid ""
304
+ "If everything goes wrong directly edit your .htaccess file and delete the "
305
+ "relevant part somewhere at the top."
306
  msgstr ""
307
 
308
+ #: admin-ui-includes/login-control.php:22
309
+ msgid "Disable wp-login.php"
310
  msgstr ""
311
 
312
+ #: admin-ui-includes/login-control.php:30
313
+ msgid "This is the main switch. Make sure you know what you're doing."
314
  msgstr ""
315
 
316
+ #: admin-ui-includes/login-control.php:34
317
+ msgid "Redirect"
318
  msgstr ""
319
 
320
+ #: admin-ui-includes/login-control.php:40
321
+ msgid ""
322
+ "This will be used as redirection url. You might use something like \"member-"
323
+ "login\" to redirect people to \"http://yoursite.com/member-login/\". If "
324
+ "empty the home page will be served as redirection."
325
  msgstr ""
326
 
327
+ #: admin-ui-includes/login-control.php:44
328
+ #: admin-ui-includes/maintenance-mode.php:24
329
+ msgid "Allowed IPs"
330
  msgstr ""
331
 
332
+ #: admin-ui-includes/login-control.php:51
333
+ msgid "List of IPs allowed to access wp-login.php."
334
  msgstr ""
335
 
336
+ #: admin-ui-includes/login-control.php:53
337
+ msgid "Make sure you are have a static IP when using this."
338
  msgstr ""
339
 
340
+ #: admin-ui-includes/login-control.php:57
341
+ msgid "Half-mode"
342
  msgstr ""
343
 
344
+ #: admin-ui-includes/login-control.php:65
345
  msgid ""
346
+ "(BETA) If set, this will still allow access to POST (login) requests, logout "
347
+ "and to the password recovery form. I don't think this is very useful at the "
348
+ "moment (login error messages will still show up on wp-login.php) but may be "
349
+ "helpful for AJAX use."
350
+ msgstr ""
351
+
352
+ #: admin-ui-includes/maintenance-mode.php:8
353
+ msgid "Maintenance Mode"
354
  msgstr ""
355
 
356
+ #: admin-ui-includes/maintenance-mode.php:12
357
+ msgid "Maintenance Active"
358
  msgstr ""
359
 
360
+ #: admin-ui-includes/maintenance-mode.php:20
361
+ msgid "Toggles Maintenance Mode."
362
+ msgstr ""
363
+
364
+ #: admin-ui-includes/maintenance-mode.php:31
365
+ msgid "List of allowed IPs."
366
+ msgstr ""
367
+
368
+ #: admin-ui-includes/maintenance-mode.php:33
369
  msgid ""
370
+ "All the IPs not listed will view the 403 error page or be redirected to a "
371
+ "page set below."
 
372
  msgstr ""
373
 
374
+ #: admin-ui-includes/maintenance-mode.php:37
375
+ msgid "Redirection"
376
  msgstr ""
377
 
378
+ #: admin-ui-includes/maintenance-mode.php:43
379
  msgid ""
380
+ "If set, this will be used as redirection for disallowed IPs. This could be "
381
+ "an external url or a document on your server (local paths begin with a "
382
+ "trailing slash)"
383
  msgstr ""
384
 
385
+ #: admin-ui-includes/more-rewrite.php:8
386
+ msgid "More Rewrite Settings"
387
  msgstr ""
388
 
389
+ #: admin-ui-includes/more-rewrite.php:12
390
+ msgid "Remove hierarchy"
391
+ msgstr ""
392
+
393
+ #: admin-ui-includes/more-rewrite.php:20
394
  msgid ""
395
+ "Remove hierarchy from taxonomy permalinks (this might be interesting when "
396
+ "removing the category base)."
397
  msgstr ""
398
 
399
+ #: admin-ui-includes/more-rewrite.php:24
400
+ msgid ".html suffix"
401
  msgstr ""
402
 
403
+ #: admin-ui-includes/more-rewrite.php:29
404
+ msgid "Add '.html' at the end of taxonomy permalinks."
405
  msgstr ""
406
 
407
+ #: admin-ui-includes/remove-bases.php:8
408
+ msgid "Remove Taxonomies and Author Base"
409
  msgstr ""
410
 
411
+ #: admin-ui-includes/remove-bases.php:13
412
+ msgid "Remove Author Base"
413
+ msgstr ""
414
+
415
+ #: admin-ui-includes/remove-bases.php:21
416
+ msgid "If active, the author base will be removed from permalinks:"
417
+ msgstr ""
418
+
419
+ #: admin-ui-includes/remove-bases.php:24
420
+ msgid "the-author"
421
+ msgstr ""
422
+
423
+ #: admin-ui-includes/remove-bases.php:27 admin-ui-includes/remove-bases.php:55
424
+ msgid "Beware:"
425
+ msgstr ""
426
+
427
+ #: admin-ui-includes/remove-bases.php:27
428
  msgid ""
429
+ "This could conflict with the removal of the category base on a situation "
430
+ "where a category slug is the same as a user nicename."
431
  msgstr ""
432
 
433
+ #: admin-ui-includes/remove-bases.php:38
434
+ msgid "Remove"
435
  msgstr ""
436
 
437
+ #: admin-ui-includes/remove-bases.php:40
438
+ msgid "Base"
439
+ msgstr ""
440
+
441
+ #: admin-ui-includes/remove-bases.php:48
442
+ msgid "If active, the"
443
+ msgstr ""
444
+
445
+ #: admin-ui-includes/remove-bases.php:50
446
+ msgid "base will be removed from permalinks:"
447
+ msgstr ""
448
+
449
+ #: admin-ui-includes/remove-bases.php:55
450
  msgid ""
451
+ "This could conflict with the removal of the other permalink bases on a "
452
+ "situation where a term slug is the same."
 
453
  msgstr ""
454
 
455
+ #: admin-ui-includes/replace-htaccess.php:8
456
+ msgid "Replace WordPress htaccess"
457
  msgstr ""
458
 
459
+ #: admin-ui-includes/replace-htaccess.php:18
460
+ msgid "Leave empty for default."
461
+ msgstr ""
462
+
463
+ #: admin-ui-includes/replace-htaccess.php:21
464
+ msgid "This rules will be printed instead of WordPress rules."
465
+ msgstr ""
466
+
467
+ #: admin-ui-includes/replace-htaccess.php:25
468
+ msgid "Original rules:"
469
+ msgstr ""
470
+
471
+ #: admin-ui-includes/replace-htaccess.php:34
472
  msgid ""
473
+ "For instance, <strong><a href='http://www.webmasterworld.com/apache/4053973."
474
+ "htm'>Jim Morgan's wordpress htaccess</a></strong> has been reported to "
475
+ "\"speed up your WP mod_rewrite code by a factor of more than two\"."
476
  msgstr ""
477
 
478
+ #: admin-ui-includes/replace-htaccess.php:53
479
+ msgid ""
480
+ "Please note, if your WordPress install is in a subdirectory, you'll have to "
481
+ "adjust the first RewriteBase and the last RewriteRule accordingly <br/>(ie: "
482
+ "<code>RewriteBase /SUBDIRECTORY/</code> and <code>RewriteRule . /"
483
+ "SUBDIRECTORY/index.php [L]</code>)"
484
  msgstr ""
485
 
486
+ #: admin-ui-includes/sidebar.php:11
487
+ msgid "About this Plugin"
488
  msgstr ""
489
 
490
+ #: admin-ui-includes/sidebar.php:29
491
+ msgid "Latest donations"
492
  msgstr ""
493
 
494
+ #: admin-ui-includes/sidebar.php:35
495
+ msgid "by"
496
  msgstr ""
497
 
498
+ #: wp-htaccess-control-ui.php:29
499
+ msgid "Please log in as admin"
500
  msgstr ""
501
 
502
+ #: wp-htaccess-control-ui.php:74
503
+ msgid "Reset all rules"
504
+ msgstr ""
505
+
506
+ #: wp-htaccess-control-ui.php:75
507
+ msgid "Save all changes"
508
+ msgstr ""
509
+
510
+ #: wp-htaccess-control-ui.php:83
511
+ msgid "Current htaccess file as it is generated by WordPress"
512
  msgstr ""
513
 
514
+ #: wp-htaccess-control-ui.php:95
515
+ msgid "Read Me"
516
+ msgstr ""
517
+
518
+ #: wp-htaccess-control-ui.php:101
519
  msgid ""
520
+ "This plugin has made such a long way that it should really now be called "
521
+ "<strong>WP htaccess and Rewrite Control</strong>."
522
  msgstr ""
523
 
524
+ #: wp-htaccess-control-ui.php:103
525
+ msgid ""
526
+ "Some of the features it provides might not work as expect on all "
527
+ "environments and setups. You are advised to test configurations on a "
528
+ "separate staging, on the same server and with the same theme and plugins. "
529
+ "Please report any issues you might face."
530
  msgstr ""
531
 
532
+ #: wp-htaccess-control-ui.php:104
533
  msgid ""
534
+ "If your setup seems to get out of control there are a few options to reverse "
535
+ "all changes:"
 
536
  msgstr ""
537
 
538
+ #: wp-htaccess-control-ui.php:106
539
+ msgid "Click on \"Reset all rules\", at the bottom of this page;"
540
  msgstr ""
541
 
542
+ #: wp-htaccess-control-ui.php:107
543
+ msgid ""
544
+ "rename/delete the plugin folder and re-submit your permalink settings under "
545
+ "\"Settings > Permalinks\""
546
  msgstr ""
547
 
548
+ #: wp-htaccess-control-ui.php:108
549
+ msgid ""
550
+ "if the previous did not solve your issue, remove the .htaccess file on your "
551
+ "blog's root directory and repeat step 2;"
552
  msgstr ""
553
 
554
+ #: wp-htaccess-control-ui.php:109
555
+ msgid ""
556
+ "in such cases you might want to get back back to the last version you knew "
557
+ "working, which you'll find at"
558
  msgstr ""
559
 
560
+ #: wp-htaccess-control-ui.php:111
561
+ msgid "Version 3.3 was tested up to WordPress 3.5.1."
562
  msgstr ""
563
 
564
+ #: wp-htaccess-control-ui.php:112
565
+ msgid "Version 3.4 was tested on WordPress 3.9."
566
+ msgstr ""
567
+
568
+ #: wp-htaccess-control-ui.php:124
569
+ msgid "Debug Data"
570
  msgstr ""
571
 
572
+ #: wp-htaccess-control.php:606
573
+ msgid "All rules reset."
574
  msgstr ""
575
 
576
+ #: wp-htaccess-control.php:682
577
+ msgid "All options updated."
578
  msgstr ""
579
 
580
  #. Plugin Name of the plugin/theme
587
 
588
  #. Description of the plugin/theme
589
  msgid ""
590
+ "Interface to customize the permalinks (author, category, archives and "
591
+ "pagination) and htaccess file generated by WordPress."
 
592
  msgstr ""
593
 
594
  #. Author of the plugin/theme
596
  msgstr ""
597
 
598
  #. Author URI of the plugin/theme
599
+ msgid "http://antonioandra.de"
600
  msgstr ""
readme.txt CHANGED
@@ -1,23 +1,23 @@
1
  === WP htaccess Control ===
2
  Author: António Andrade
3
  Author URI: http://antonioandra.de/
4
- Plugin URI: http://antonioandra.de/wp-htaccess-control
5
  Contributors: antonioandra.de
6
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=s4mancha%40gmail%2ecom&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest
7
  Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives
8
  Requires at least: 3.4
9
- Tested up to: 3.5.1
10
- Stable tag: 3.3
11
 
12
- Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
13
 
14
  == Description ==
15
 
16
- **WP htaccess Control** should now really be called WP htacess *and Rewrite* Control. It provides an interface to customize the htaccess file generated by Wordpress but also its permalinks (author, category, archives, pagination and custom taxonomies). Take a look at the screenshot for a clearer exemplification.
17
 
18
  **Features:**
19
 
20
- * Customizing the htaccess file generated by Wordpress;
21
  * Removing any custom taxonomy's slug base from permalinks;
22
  * Removing the category base from permalinks;
23
  * Removing the author base from permalinks;
@@ -25,8 +25,7 @@ Interface to customize the permalinks (author, category, archives and pagination
25
  * Customizing Paginated Permalinks (translate the "page" word on permalinks to your own language);
26
  * Customization (and canonization) of the Search Permalink Base;
27
  * Creation of Category, Author, Tag and Custom Taxonomy based archives (ex: *"http://your-site.com/category/stories/2010/12"*, *"http://your-site.com/author/admin/2010/12/page/2"* and *"http://your-site.com/tag/wordpress/2010/12"*), this will also work if you've removed the base slug;
28
- * Maintenance mode;
29
- * wp-login.php redirection.
30
 
31
  **Easy to use "Suggested htaccess" rules:**
32
 
@@ -46,7 +45,7 @@ Interface to customize the permalinks (author, category, archives and pagination
46
  * Set admin email on server generated error pages;
47
  * Disable ServerSignature on server generated error pages.
48
 
49
- **Translated to:** pt_BR and pt_PT. (POT file is included, translations are welcome)
50
 
51
  == Installation ==
52
 
@@ -58,6 +57,11 @@ Interface to customize the permalinks (author, category, archives and pagination
58
 
59
  == Frequently Asked Questions ==
60
 
 
 
 
 
 
61
  = Do you have any questions? =
62
  Suggestions are welcome and please report any bugs found!
63
 
@@ -67,7 +71,7 @@ Suggestions are welcome and please report any bugs found!
67
 
68
  == Known Issues ==
69
 
70
- I still haven't tested this under **Wordpress multisite**, issues have however been reported.
71
 
72
  == Additional Credit ==
73
 
@@ -76,12 +80,20 @@ Search redirection is based on Mark Jaquith's **Nice Search** but extended so th
76
 
77
  == Stable Versions ==
78
 
 
79
  For WordPress versions above 3.4 use the plugin version 3.3.
80
  For WordPress versions prior to 3.4 use the plugin version 2.7.2.1.
81
 
82
 
83
  == Changelog ==
84
 
 
 
 
 
 
 
 
85
  = 3.3.4 (28/01/2013) =
86
 
87
  * Fix: some servers would send http:// to https:// on admin settings page.
@@ -276,7 +288,7 @@ For WordPress versions prior to 3.4 use the plugin version 2.7.2.1.
276
  * *Change:* improved htaccess customization giving now much more freedom.
277
 
278
  = 1.1.4 (05/02/2010) =
279
- * *Fix:* "Current htaccess file as it is generated by Wordpress" was not being printed;
280
  * *Change:* minor ui changes;
281
  * Confirmed compatibility with WP 2.9.1.
282
 
1
  === WP htaccess Control ===
2
  Author: António Andrade
3
  Author URI: http://antonioandra.de/
4
+ Plugin URI: http://antonioandra.de/
5
  Contributors: antonioandra.de
6
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=antonio%40antonioandra%2ede&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest
7
  Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives
8
  Requires at least: 3.4
9
+ Tested up to: 3.9
10
+ Stable tag: 3.4
11
 
12
+ Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by WordPress.
13
 
14
  == Description ==
15
 
16
+ **WP htaccess Control** should now really be called WP htacess *and Rewrite* Control. It provides an interface to customize the htaccess file generated by WordPress but also its permalinks (author, category, archives, pagination and custom taxonomies). Take a look at the screenshot for a clearer exemplification.
17
 
18
  **Features:**
19
 
20
+ * Customizing the htaccess file generated by WordPress;
21
  * Removing any custom taxonomy's slug base from permalinks;
22
  * Removing the category base from permalinks;
23
  * Removing the author base from permalinks;
25
  * Customizing Paginated Permalinks (translate the "page" word on permalinks to your own language);
26
  * Customization (and canonization) of the Search Permalink Base;
27
  * Creation of Category, Author, Tag and Custom Taxonomy based archives (ex: *"http://your-site.com/category/stories/2010/12"*, *"http://your-site.com/author/admin/2010/12/page/2"* and *"http://your-site.com/tag/wordpress/2010/12"*), this will also work if you've removed the base slug;
28
+ * Maintenance mode.
 
29
 
30
  **Easy to use "Suggested htaccess" rules:**
31
 
45
  * Set admin email on server generated error pages;
46
  * Disable ServerSignature on server generated error pages.
47
 
48
+ **POT file is included, translations are welcome.
49
 
50
  == Installation ==
51
 
57
 
58
  == Frequently Asked Questions ==
59
 
60
+ = Pagination base is not working on Twenty Fourteen or some other theme? =
61
+ WP htaccess Control can modify the pagination permalink structure for you (ie, turn "/page/2" into "/pagina/2") and will also try to intercept any method outputting pagination links so the structure change is seamless.
62
+ Some themes however do not use the standard way of generating these pagination links, which means WP htaccess Control can't update them. Unfortunately this is the case for Twenty Fourteen. To make it clear, this is a markup issue; if you type in the new structure in the address bar it will still work as expected.
63
+
64
+
65
  = Do you have any questions? =
66
  Suggestions are welcome and please report any bugs found!
67
 
71
 
72
  == Known Issues ==
73
 
74
+ I still haven't tested this under **WordPress multisite**, issues have however been reported.
75
 
76
  == Additional Credit ==
77
 
80
 
81
  == Stable Versions ==
82
 
83
+ For WordPress versions above 3.9 use the plugin version 3.4.
84
  For WordPress versions above 3.4 use the plugin version 3.3.
85
  For WordPress versions prior to 3.4 use the plugin version 2.7.2.1.
86
 
87
 
88
  == Changelog ==
89
 
90
+ = 3.4 (19/4/2013) =
91
+
92
+ * Fix: fixed category and tag advanced archives;
93
+ * Fix: if both author advanced archives and author permalink base removal were active, archives wouldn't work;
94
+ * Removed experimental login section;
95
+ * Tested under WordPress 3.9.
96
+
97
  = 3.3.4 (28/01/2013) =
98
 
99
  * Fix: some servers would send http:// to https:// on admin settings page.
288
  * *Change:* improved htaccess customization giving now much more freedom.
289
 
290
  = 1.1.4 (05/02/2010) =
291
+ * *Fix:* "Current htaccess file as it is generated by WordPress" was not being printed;
292
  * *Change:* minor ui changes;
293
  * Confirmed compatibility with WP 2.9.1.
294
 
wp-htaccess-control-ui.css CHANGED
@@ -1,25 +1,94 @@
1
- #wphtc-main{margin-bottom:25px;}
2
- #wphtc-sidebar{width:19%;float:right;}
3
- #wphtc-sidebar ul{margin:1em 0 1em 10px;}
4
- #wphtc-sidebar a{text-decoration:none;}
5
- #wphtc-sidebar a img{margin-right:5px;}
6
- #wphtc-main{float:left;width:80%;}
7
- div.updated p img{margin: -5px 15px;}
8
- div.updated p span{float:right;}
9
- .wphtc-menu{margin:10px 0;}
10
- .wphtc-section{background:#ddd;border:1px solid #ddd;border-bottom:0;margin-top:15px;-moz-border-radius:6px;-webkit-border-radius:6px;}
11
- .wphtc-section-title{-moz-user-select: none;-khtml-user-select: none;user-select: none;margin-bottom:0;width:100%;border:0;}
12
- .wphtc-section-title h3{margin:0;padding:10px;cursor:pointer;border-bottom:0;-moz-border-radius:6px;-webkit-border-radius:6px;}
13
- .wphtc-section-title .handlediv {float:right;height:34px;width:23px;cursor:pointer;}
14
- .wphtc-inputs{background:#fff;border:1px solid #ddd;border-left:0;border-right:0;-moz-border-radius:6px;-webkit-border-radius:6px;}
15
- .wphtc-inputs p,.wphtc-inputs ul{margin-left:10px}
16
- .wphtc-inputs th{font-weight:bold;}
17
- .wphtc-inputs tr{border-bottom:1px solid #ddd}
18
- .wphtc-inputs caption{text-align:left;padding:10px;background:#ddd;}
19
- .form-table{margin:0;}
20
- #foot{text-align:center;font-size:8px;color:#aaa;margin:2em 0;}
21
- textarea.readonly{background-color:#eee;}
22
- ul.description{margin-top:1em;}
23
- ul.description a{text-decoration:none;}
24
-
25
- .wphtc-inputs pre{margin:2.5%;width:95%;overflow:auto;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wphtc-sidebar {
2
+ width: 19%;
3
+ float: right; }
4
+ #wphtc-sidebar ul {
5
+ margin: 1em 0 1em 10px; }
6
+ #wphtc-sidebar a {
7
+ text-decoration: none; }
8
+ #wphtc-sidebar a img {
9
+ margin-right: 5px; }
10
+
11
+ #wphtc-main {
12
+ float: left;
13
+ width: 80%;
14
+ margin-bottom: 25px; }
15
+
16
+ div.updated p img {
17
+ margin: -5px 15px; }
18
+ div.updated p span {
19
+ float: right; }
20
+
21
+ .wphtc-menu {
22
+ margin: 10px 0; }
23
+
24
+ .wphtc-section {
25
+ background: #ddd;
26
+ border: 1px solid #ddd;
27
+ border-bottom: 0;
28
+ margin-top: 15px;
29
+ -moz-border-radius: 6px;
30
+ -webkit-border-radius: 6px; }
31
+
32
+ .wphtc-section-title {
33
+ -moz-user-select: none;
34
+ -khtml-user-select: none;
35
+ user-select: none;
36
+ margin-bottom: 0;
37
+ width: 100%;
38
+ border: 0; }
39
+ .wphtc-section-title h3 {
40
+ margin: 0;
41
+ padding: 10px;
42
+ cursor: pointer;
43
+ border-bottom: 0;
44
+ -moz-border-radius: 6px;
45
+ -webkit-border-radius: 6px; }
46
+ .wphtc-section-title .handlediv {
47
+ float: right;
48
+ height: 34px;
49
+ width: 23px;
50
+ cursor: pointer; }
51
+
52
+ .wphtc-inputs {
53
+ background: #fff;
54
+ border: 1px solid #ddd;
55
+ border-left: 0;
56
+ border-right: 0;
57
+ -moz-border-radius: 6px;
58
+ -webkit-border-radius: 6px; }
59
+ .wphtc-inputs p, .wphtc-inputs ul {
60
+ margin-left: 10px; }
61
+ .wphtc-inputs th {
62
+ font-weight: bold;
63
+ padding-left: 12px; }
64
+ .wphtc-inputs tr {
65
+ border-bottom: 1px solid #dddddd; }
66
+ .wphtc-inputs caption {
67
+ text-align: left;
68
+ padding: 10px;
69
+ background: #ddd; }
70
+ .wphtc-inputs pre {
71
+ margin: 2.5%;
72
+ width: 95%;
73
+ overflow: auto; }
74
+
75
+ .form-table {
76
+ margin: 0; }
77
+
78
+ #foot {
79
+ text-align: center;
80
+ font-size: 8px;
81
+ color: #aaa;
82
+ margin: 2em 0; }
83
+
84
+ textarea.readonly {
85
+ background-color: #eee; }
86
+
87
+ ul.description {
88
+ margin-top: 1em;
89
+ margin-left: 2em;
90
+ font-style: italic; }
91
+ ul.description a {
92
+ text-decoration: none; }
93
+ ul.description li {
94
+ color: #666; }
wp-htaccess-control-ui.php CHANGED
@@ -1,569 +1,139 @@
1
  <?php
2
- $debug=false;
 
 
 
3
 
4
- $plugin_path = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__));
5
- $plugin_url = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
6
  //$q=explode('&',$_SERVER['QUERY_STRING']);
7
  //$purl='http'.((!empty($_SERVER['HTTPS'])) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$q[0];
8
- $q=explode("&", $_SERVER['REQUEST_URI']);
9
- $purl=$q[0];
10
- global $WPhtc, $echo;
11
  $WPhtc->page_action();
12
 
 
 
 
 
 
 
 
 
 
13
  ?>
 
14
  <div id="wphtc-page" class="wrap">
15
- <h2>Wp htaccess Control</h2>
16
- <?php
17
- if(!current_user_can("administrator")) {
18
- echo '<p>'.__('Please log in as admin','wp-htaccess-control').'</p>';
19
- return;
20
- }
21
- ?>
22
- <div id="wphtc-sidebar">
23
- <div class="wphtc-section">
24
- <div class="wphtc-section-title stuffbox">
25
- <!--<div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>-->
26
- <h3><?php _e('About this Plugin', 'wp-htaccess-control'); ?></h3>
27
- </div>
28
- <div class="wphtc-inputs">
29
- <ul>
30
- <li><a href="http://antonioandra.de/wp-htaccess-control"><img width="16" height="16" src="<?php echo $plugin_url?>/images/antonioandra.de_favicon.png"> Plugin Homepage</a></li>
31
- <li><a href="http://wordpress.org/extend/plugins/wp-htaccess-control/"><img src="<?php echo $plugin_url?>/images/favicon.ico"> Plugin at Wordpress.org </a></li>
32
- <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=s4mancha%40gmail%2ecom&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img width="16" height="16" src="<?php echo $plugin_url?>/images/pp_favicon_x.ico"> Donate with Paypal</a></li>
33
- </ul>
34
- </div>
35
- </div>
36
- <div class="wphtc-section">
37
- <div class="wphtc-section-title stuffbox">
38
- <h3><?php _e('Latest donations', 'wp-htaccess-control'); ?></h3>
39
- </div>
40
- <div class="wphtc-inputs">
41
- <iframe width="220" src="http://antonioandra.de/wp-htaccess-control-donations"></iframe>
42
- </div>
43
- </div>
44
- <p id="foot">WP htaccess Control <?php _e('by', 'wp-htaccess-control'); ?> António Andrade</p>
45
- </div>
46
- <div id="wphtc-main">
47
- <form method="post" action="<?php echo $purl?>">
48
- <?php if($echo!=''){?>
49
- <div class="updated fade" id="message" style="background-color: rgb(255, 251, 204);"><p><?php echo $echo;?></p></div>
50
- <?php }
51
- # Donation Message
52
- if($WPhtc->get_data('donation_hidden_time')&&$WPhtc->get_data('donation_hidden_time')<time()){?>
53
- <div class="updated">
54
- <p>
55
- <strong>Is this plugin useful? Consider making a donation encouraging me to continue supporting it!</strong>
56
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=s4mancha%40gmail%2ecom&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img alt="Donate" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_donate_SM.gif"></a>
57
- <span><a href="<?php echo $purl?>&action=hide_donation_message">Hide this message</a></span>
58
- </p>
59
- </div>
60
- <?php }?>
61
-
62
- <!-- INSTRUCTIONS -->
63
- <div class="wphtc-section permanently-open">
64
- <div class="wphtc-section-title stuffbox">
65
- <h3><?php _e('Introduction', 'wp-table-of-paginated-contents');?></h3>
66
- </div>
67
- <table class="form-table wphtc-inputs start-open">
68
- <tr valign="top">
69
- <th scope="row" style="width:18%;"></th>
70
- <td >
71
- <p class="description"><?php _e('This plugin has made such a long way that it should really now be called <strong>WP htaccess and Rewrite Control</strong>.', 'wp-htaccess-control');?></p>
72
- <p class="description"><?php _e('Many core parts of WP htaccess Control have been almost completely re-done in version 3.0 with the goal of providing an universal solution. This means that you can now selectively remove base slugs and create full archives for any custom taxonomy in addiction to the previous Category and Post tags.', 'wp-htaccess-control');?></p>
73
- <p class="description"><?php _e('This changes also mean that some unforeseen issues might arise. Please report them. If your setup seems to get out of control there are a few easy options to reverse all changes: 1) Click on "Reset all rules", at the bottom of this page; 2) rename/delete the plugin folder and re-submit your permalink settings under "Settings > Permalinks" and 3) if the previous did not solve your issue, remove the .htaccess file on your blog\'s root directory and repeat step 2; 4) in such cases you might want to get back back to the last version you knew working, which you\'ll find at http://wordpress.org/extend/plugins/wp-htaccess-control/download/.', 'wp-htaccess-control');?></p>
74
- </td>
75
- </tr>
76
- </table>
77
- </div>
78
-
79
- <!-- Custom Author Permalink -->
80
- <div class="wphtc-section">
81
- <div class="wphtc-section-title stuffbox">
82
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
83
- <h3><?php _e('Custom Author Permalink', 'wp-htaccess-control');?></h3>
84
- </div>
85
- <table class="form-table wphtc-inputs">
86
- <tr valign="top">
87
- <th scope="row" style="width:18%;"><?php _e('Author Base', 'wp-htaccess-control'); ?></th>
88
- <td >
89
- <input type="text" name="WPhtc_cap" value="<?php echo $WPhtc->get_data('cap'); ?>" />
90
- <p><code><?php bloginfo('url')?>/<em><?php _e('(your-base)', 'wp-htaccess-control');?></em>/admin</code></p>
91
- </td>
92
- <td valign="middle">
93
- <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p>
94
- <p class="description"><?php _e('If set, the author base will be used as shown next to the form field.', 'wp-htaccess-control'); ?></p>
95
- <p class="description"><?php _e('If you do not want to use a custom Author Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p>
96
- </td>
97
- </tr>
98
- <?php if(class_exists('GoogleSitemapGeneratorLoader')){?>
99
- <tr valign="top">
100
- <th>Google XML Sitemap</th>
101
- <td>
102
- <input type="checkbox" name="WPhtc_sm_enabled" value="true" <?php if($WPhtc->get_data('sm_enabled')){ echo "checked";}?>/> <?php _e('Apply Custom Author Permalink on Generated Sitemap', 'wp-htaccess-control'); ?>
103
- </td>
104
- <td valign="middle" >
105
- <p class="description"><?php _e('Leave "Include author pages" unchecked on Google XML Sitemap options page if using this.', 'wp-htaccess-control'); ?></p>
106
- <p class="description"><?php _e('However, if you want to adjust the "Priority" or "Change frequency" you should do so on the <a href="options-general.php?page=google-sitemap-generator/sitemap.php">Google XML Sitemap options page</a>.', 'wp-htaccess-control'); ?></p>
107
- </td>
108
- </tr>
109
- <?php } ?>
110
- </table>
111
- </div>
112
- <!-- Custom Pagination Permalink -->
113
- <div class="wphtc-section">
114
- <div class="wphtc-section-title stuffbox">
115
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
116
- <h3><?php _e('Custom Pagination Permalink', 'wp-htaccess-control');?></h3>
117
- </div>
118
- <table class="form-table wphtc-inputs">
119
- <tr valign="top">
120
- <th scope="row" style="width:18%;"><?php _e('Page Base', 'wp-htaccess-control'); ?></th>
121
- <td >
122
- <input type="text" name="WPhtc_cpp" value="<?php echo $WPhtc->get_data('cpp'); ?>" />
123
- <p><code><?php bloginfo('url')?>/<em><?php _e('(your-base)', 'wp-htaccess-control');?></em>/2</code></p>
124
- </td>
125
- <td valign="middle">
126
- <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p>
127
- <p class="description"><?php _e('If set, the page base will be used as shown next to the form field in every post listing (category, tag, archive, etc).', 'wp-htaccess-control'); ?></p>
128
- <p class="description"><?php _e('If you do not want to use a custom Pagination Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p>
129
- </td>
130
- </tr>
131
- </table>
132
- </div>
133
- <!-- Custom Search Permalink -->
134
- <div class="wphtc-section">
135
- <div class="wphtc-section-title stuffbox">
136
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
137
- <h3><?php _e('Custom Search Permalink', 'wp-htaccess-control');?></h3>
138
- </div>
139
- <table class="form-table wphtc-inputs">
140
- <tr valign="top">
141
- <th scope="row" style="width:18%;"><?php _e('Search Base', 'wp-htaccess-control'); ?></th>
142
- <td >
143
- <input type="text" name="WPhtc_custom_search_permalink" value="<?php echo $WPhtc->get_data('custom_search_permalink'); ?>" />
144
- <p><code><?php bloginfo('url')?>/<em><?php _e('(your-base)', 'wp-htaccess-control');?></em>/search-term</code></p>
145
- </td>
146
- <td valign="middle">
147
- <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p>
148
- <p class="description"><?php _e('If set, the search base will always be used instead of "?s=search-term".', 'wp-htaccess-control'); ?></p>
149
- <p class="description"><?php _e('If you do not want to use a custom Search Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p>
150
- </td>
151
- </tr>
152
- </table>
153
- </div>
154
- <!-- Remove Taxonomies and Author Base -->
155
- <div class="wphtc-section">
156
- <div class="wphtc-section-title stuffbox">
157
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
158
- <h3><?php _e('Remove Taxonomies and Author Base', 'wp-htaccess-control');?></h3>
159
- </div>
160
- <table class="form-table wphtc-inputs">
161
- <!-- Remove Author Base -->
162
- <tr valign="top">
163
- <th scope="row" style="width:18%;"><?php _e('Remove Author Base', 'wp-htaccess-control'); ?></th>
164
- <td >
165
- <input type="checkbox" name="WPhtc_remove_author_base" <?php if($WPhtc->get_data('remove_author_base')){echo "checked=checked";} ?> />
166
- </td>
167
- <td valign="middle">
168
- <p class="description"><?php _e('If active, the author base will be removed from permalinks:'); ?></p>
169
- <p class="description"><code><?php bloginfo('url')?>/<?php _e('the-author', 'wp-htaccess-control'); ?></code></p>
170
- <p class="description"><strong><?php _e('Beware:'); ?></strong> <?php _e('This could conflict with the removal of the category base on a situation where a category slug is the same as a user nicename.'); ?></p>
171
- </td>
172
- </tr>
173
- <!-- Remove Taxonomies Base -->
174
- <?php foreach (get_taxonomies('','objects') as $taxonomy){
175
- if(!$taxonomy->rewrite){continue;}
176
- ?>
177
- <tr valign="top">
178
- <th scope="row" style="width:18%;"><?php _e('Remove', 'wp-htaccess-control'); echo " ".$taxonomy->labels->name." " ; _e('Base', 'wp-htaccess-control'); ?></th>
179
- <td >
180
- <input type="checkbox" name="WPhtc_remove_base[<?php echo $taxonomy->name; ?>]" <?php if($WPhtc->get_data('remove_taxonomy_base', $taxonomy->name)){echo "checked=checked";} ?> />
181
- </td>
182
- <td valign="middle">
183
- <p class="description"><?php _e('If active, the'); echo " ".$taxonomy->labels->name." "; _e('base will be removed from permalinks:'); ?></p>
184
- <p class="description"><code><?php bloginfo('url')?>/<?php echo $taxonomy->name;?>_term</code></p>
185
- <p class="description"><strong><?php _e('Beware:'); ?></strong> <?php _e('This could conflict with the removal of the other permalink bases on a situation where a term slug is the same.'); ?></p>
186
- </td>
187
- </tr>
188
- <?php
189
- }
190
- ?>
191
- </table>
192
- </div>
193
- <!-- Advanced Archives -->
194
- <div class="wphtc-section">
195
- <div class="wphtc-section-title stuffbox">
196
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
197
- <h3><?php _e('Advanced Archives', 'wp-htaccess-control');?></h3>
198
- </div>
199
- <table class="form-table wphtc-inputs">
200
- <?php foreach (get_taxonomies('','objects') as $taxonomy){
201
- if(!$taxonomy->rewrite){continue;}
202
- ?>
203
- <tr valign="top">
204
- <th scope="row" style="width:18%;"><?php _e('Create', 'wp-htaccess-control'); echo " ".$taxonomy->labels->name." " ; _e('Archives', 'wp-htaccess-control'); ?></th>
205
- <td >
206
- <input type="checkbox" name="WPhtc_create_archive[<?php echo $taxonomy->name; ?>]" <?php if($WPhtc->get_data('create_archive', $taxonomy->name)){echo "checked=checked";} ?> />
207
- </td>
208
- <td valign="middle">
209
- <p class="description"><?php _e('If active, taxonomy-based archives will be accessible:', 'wp-htaccess-control'); ?></p>
210
- <p class="description"><code><?php bloginfo('url')?>/<?php echo $taxonomy->name; ?>_base/<?php echo $taxonomy->name; ?>_term/2010</code></p>
211
- <p class="description"><code><?php bloginfo('url')?>/<?php echo $taxonomy->name; ?>_base/<?php echo $taxonomy->name; ?>_term/2010/12</code></p>
212
- <p class="description"><?php _e("This will also work if you've removed the", 'wp-htaccess-control'); ?> <?php echo $taxonomy->labels->name; ?> <?php _e("base.", 'wp-htaccess-control'); ?></p>
213
- </td>
214
- </tr>
215
- <?php
216
- }
217
- ?>
218
- </table>
219
- </div>
220
- <!-- More Rewrite Settings -->
221
- <div class="wphtc-section">
222
- <div class="wphtc-section-title stuffbox">
223
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
224
- <h3><?php _e('More Rewrite Settings', 'wp-htaccess-control');?></h3>
225
- </div>
226
- <table class="form-table wphtc-inputs">
227
- <tr valign="top">
228
- <th scope="row" style="width:18%;"><?php _e("Remove hierarchy", 'wp-htaccess-control'); ?></th>
229
- <td style="width:3%;" valign="middle">
230
- <input type="checkbox" name="WPhtc_remove_hierarchy" value="true" <?php if($WPhtc->get_data('remove_hierarchy')){ echo "checked";}?>/>
231
- </td>
232
- <td valign="middle">
233
- <p class="description"><?php _e("Remove hierarchy from taxonomy permalinks (this might be interesting when removing the category base).", 'wp-htaccess-control'); ?></p>
234
- </td>
235
- </tr>
236
- <!--<tr valign="top">
237
- <th scope="row" style="width:18%;"><?php _e(".html suffix", 'wp-htaccess-control'); ?></th>
238
- <td style="width:3%;" valign="middle">
239
- <input type="checkbox" name="WPhtc_suffix_html" value="true" <?php if($WPhtc->get_data('suffix_html')){ echo "checked";}?>/>
240
- </td>
241
- <td valign="middle">
242
- <p class="description"><?php _e("Add '.html' at the end of taxonomy permalinks.", 'wp-htaccess-control'); ?></p>
243
- </td>
244
- </tr>-->
245
- </table>
246
- </div>
247
- <!-- Custom htaccess -->
248
- <div class="wphtc-section">
249
- <div class="wphtc-section-title stuffbox">
250
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
251
- <h3><?php _e('Custom htaccess', 'wp-htaccess-control'); ?></h3>
252
- </div>
253
- <table class="form-table wphtc-inputs">
254
- <tr valign="top">
255
- <td>
256
- <textarea name="WPhtc_hta" style="width:100%;" rows="7"><?php echo stripslashes($WPhtc->get_data('hta')); ?></textarea>
257
- </td>
258
- <td style="width:50%;">
259
- <p class="description"><?php _e('This rules will be printed before any Wordpress rules.', 'wp-htaccess-control'); ?></p>
260
- <p class="description"><?php _e('Please double check them before saving as a mistake could make your site inaccessible.', 'wp-htaccess-control'); ?></p>
261
- <ul class="description">
262
- <li><a href="http://www.google.com/search?q=htaccess+tutorial" title="Search for htaccess tutorials"><img width="16px" src="http://google.com/favicon.ico" alt="google favicon"> htaccess tutorial</a></li>
263
- <li><a href="http://httpd.apache.org/docs/current/howto/htaccess.html" title="Read about htaccess at apache.org"><img width="16px" src="http://apache.org/favicon.ico" alt="apache favicon"> htaccess</a></li>
264
- <li><a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" title="Read about mod_rewrite at apache.org"><img width="16px" src="http://apache.org/favicon.ico" alt="apache favicon"> mod_rewrite</a></li>
265
- </ul>
266
- </td>
267
- </tr>
268
- </table>
269
- </div>
270
- <!-- Replace Wordpress htaccess -->
271
- <div class="wphtc-section">
272
- <div class="wphtc-section-title stuffbox">
273
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
274
- <h3><?php _e('Replace Wordpress htaccess', 'wp-htaccess-control'); ?></h3>
275
- </div>
276
- <table class="form-table wphtc-inputs">
277
- <tr valign="top">
278
- <td>
279
- <textarea name="WPhtc_wp_hta" style="width:100%;" rows="7" <?php if($WPhtc->get_data('jim_morgan_hta')){ echo "readonly='true' class='readonly'";}?>><?php echo stripslashes($WPhtc->get_data('wp_hta')); ?></textarea>
280
- <p class="description"><?php _e('Leave empty for default.', 'wp-htaccess-control'); ?></p>
281
- <p><input type="checkbox" name="WPhtc_jim_morgan_hta" value="true" <?php if($WPhtc->get_data('jim_morgan_hta')){ echo "checked";}?>/>
282
- <?php _e("<strong>Use <a href='http://www.webmasterworld.com/apache/4053973.htm'>Jim Morgan's wordpress htaccess</a></strong> (has been reported to \"speed up your WP mod_rewrite code by a factor of more than two\")", 'wp-htaccess-control'); ?></p>
283
- </td>
284
- <td style="width:50%;">
285
- <p class="description"><?php _e('This rules will be printed instead of Wordpress rules.', 'wp-htaccess-control'); ?></p>
286
- <p class="description"><?php _e('Please double check them before saving as a mistake could make your site inaccessible.', 'wp-htaccess-control'); ?></p>
287
- <p class="description"><?php _e('Original rules:', 'wp-htaccess-control'); ?></p>
288
- <p class="description">
289
- <code><?php echo nl2br(htmlspecialchars(substr($WPhtc->get_data('htaccess_original'),0,-1)));?></code>
290
- </p>
291
- </td>
292
- </tr>
293
- </table>
294
- </div>
295
- <!-- htaccess Suggestions -->
296
- <div class="wphtc-section">
297
- <div class="wphtc-section-title stuffbox">
298
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
299
- <h3><?php _e('htaccess Suggestions', 'wp-htaccess-control'); ?></h3>
300
- </div>
301
- <table class="form-table wphtc-inputs">
302
- <tr valign="top">
303
- <th scope="row" style="width:18%;"><?php _e('ServerSignature', 'wp-htaccess-control'); ?></th>
304
- <td style="width:3%;" valign="middle">
305
- <input type="checkbox" name="WPhtc_disable_serversignature" value="true" <?php if($WPhtc->get_data('disable_serversignature')){ echo "checked";}?>/>
306
- </td>
307
- <td valign="middle">
308
- <p class="description"><?php _e('Disable the ServerSignature on server generated error pages.', 'wp-htaccess-control'); ?></p>
309
- </td>
310
- </tr>
311
- <tr valign="top">
312
- <th scope="row"><?php _e('Indexes', 'wp-htaccess-control'); ?></th>
313
- <td style="width:3%;" valign="middle">
314
- <input type="checkbox" name="WPhtc_disable_indexes" value="true" <?php if($WPhtc->get_data('disable_indexes')){ echo "checked";}?>/>
315
- </td>
316
- <td valign="middle">
317
- <p class="description"><?php _e('Disable directory browsing.', 'wp-htaccess-control'); ?></p>
318
- </td>
319
- </tr>
320
- <tr valign="top">
321
- <th scope="row"><?php _e('Protect wp-config.php file', 'wp-htaccess-control'); ?></th>
322
- <td style="width:3%;" valign="middle">
323
- <input type="checkbox" name="WPhtc_protect_wp_config" value="true" <?php if($WPhtc->get_data('protect_wp_config')){ echo "checked";}?>/> </td>
324
- <td valign="middle">
325
- <p class="description"><?php _e('Deny access to wp-config.php file.', 'wp-htaccess-control'); ?></p>
326
- </td>
327
- </tr>
328
- <tr valign="top">
329
- <th scope="row"><?php _e('Protect htaccess file', 'wp-htaccess-control'); ?></th>
330
- <td style="width:3%;" valign="middle">
331
- <input type="checkbox" name="WPhtc_protect_htaccess" value="true" <?php if($WPhtc->get_data('protect_htaccess')){ echo "checked";}?>/> </td>
332
- <td valign="middle">
333
- <p class="description"><?php _e('Deny access to .htaccess file.', 'wp-htaccess-control'); ?></p>
334
- </td>
335
- </tr>
336
- <tr valign="top">
337
- <th scope="row"><?php _e('Protect comments.php', 'wp-htaccess-control'); ?></th>
338
- <td style="width:3%;" valign="middle">
339
- <input type="checkbox" name="WPhtc_protect_comments" value="true" <?php if($WPhtc->get_data('protect_comments')){ echo "checked";}?>/> </td>
340
- <td valign="middle">
341
- <p class="description"><?php _e('Deny comment posting to no referrer requests. This will avoid spam bots coming from nowhere.', 'wp-htaccess-control'); ?></p>
342
- </td>
343
- </tr>
344
- <tr valign="top">
345
- <th scope="row"><?php _e('mod_gzip', 'wp-htaccess-control'); ?></th>
346
- <td style="width:3%;" valign="middle">
347
- <input type="checkbox" name="WPhtc_gzip" value="true" <?php if($WPhtc->get_data('gzip')){ echo "checked";}?>/>
348
- </td>
349
- <td valign="middle">
350
- <p class="description"><?php _e('Use mod_gzip if available.', 'wp-htaccess-control'); ?></p>
351
- </td>
352
- </tr>
353
- <tr valign="top">
354
- <th scope="row"><?php _e('mod_deflate', 'wp-htaccess-control'); ?></th>
355
- <td style="width:3%;" valign="middle">
356
- <input type="checkbox" name="WPhtc_deflate" value="true" <?php if($WPhtc->get_data('deflate')){ echo "checked";}?>/>
357
- </td>
358
- <td valign="middle">
359
- <p class="description"><?php _e('Use mod_deflate if available.', 'wp-htaccess-control'); ?></p>
360
- </td>
361
- </tr>
362
- <tr valign="top">
363
- <th scope="row"><?php _e('Limit Upload Size', 'wp-htaccess-control'); ?></th>
364
- <td style="width:3%;" valign="middle">
365
- <input type="text" name="WPhtc_up_limit" value="<?php echo $WPhtc->get_data('up_limit');?>"/>
366
- </td>
367
- <td valign="middle">
368
- <p class="description"><?php _e('If set, this value in MB will be used as limit to file uploads.', 'wp-htaccess-control'); ?></p>
369
- </td>
370
- </tr>
371
- <tr valign="top">
372
- <th scope="row"><?php _e('Admin Email', 'wp-htaccess-control'); ?></th>
373
- <td style="width:3%;">
374
- <input type="text" name="WPhtc_admin_email" value="<?php echo $WPhtc->get_data('admin_email')?>"/>
375
- </td>
376
- <td valign="middle">
377
- <p class="description"><?php _e('If set, this will be used as the admin email on server generated error pages.', 'wp-htaccess-control'); ?></p>
378
- </td>
379
- </tr>
380
- <tr valign="top">
381
- <th scope="row"><?php _e('Disable image hotlinking', 'wp-htaccess-control'); ?></th>
382
- <td style="width:3%;">
383
- <input type="text" name="WPhtc_disable_hotlink" value="<?php echo $WPhtc->get_data('disable_hotlink');?>"/>
384
- </td>
385
- <td valign="middle">
386
- <p class="description"><?php _e('If set, this url will be used as redirection to hotlinked images (you should be using an image url here). If you prefer no output on hotlinked images use "_".', 'wp-htaccess-control'); ?></p>
387
- </td>
388
- </tr>
389
- <tr valign="top">
390
- <th scope="row"><?php _e('Disable file hotlinking extensions', 'wp-htaccess-control'); ?></th>
391
- <td style="width:3%;">
392
- <input type="text" name="WPhtc_disable_file_hotlink_ext" value="<?php echo $WPhtc->get_data('disable_file_hotlink_ext')?>"/>
393
- </td>
394
- <td valign="middle">
395
- <p class="description"><?php _e('If set, this file extensions will not be hotlinkable.', 'wp-htaccess-control'); ?></p>
396
- <p class="description"><?php _e('Separate different extensions with a white-space, ie: "pdf doc zip".', 'wp-htaccess-control'); ?></p>
397
- </td>
398
- </tr>
399
- <tr valign="top">
400
- <th scope="row"><?php _e('File hotlinking redirection', 'wp-htaccess-control'); ?></th>
401
- <td style="width:3%;">
402
- <input type="text" name="WPhtc_disable_file_hotlink_redir" value="<?php echo $WPhtc->get_data('disable_file_hotlink_redir')?>"/>
403
- </td>
404
- <td valign="middle">
405
- <p class="description"><?php _e('If set, this url will be used as redirection for hotlinked files.', 'wp-htaccess-control'); ?></p>
406
- </td>
407
- </tr>
408
- <tr valign="top">
409
- <th scope="row"><?php _e('500 error', 'wp-htaccess-control'); ?></th>
410
- <td style="width:3%;" valign="middle">
411
- <input type="text" name="WPhtc_redirect_500" value="<?php echo $WPhtc->get_data('redirect_500');?>"/>
412
- </td>
413
- <td valign="middle">
414
- <p class="description"><?php _e('If set, this path will be used as page to 500 errors (example: /error.php).', 'wp-htaccess-control'); ?></p>
415
- </td>
416
- </tr>
417
- <tr valign="top">
418
- <th scope="row"><?php _e('403 error', 'wp-htaccess-control'); ?></th>
419
- <td style="width:3%;" valign="middle">
420
- <input type="text" name="WPhtc_redirect_403" value="<?php echo $WPhtc->get_data('redirect_403');?>"/>
421
- </td>
422
- <td valign="middle">
423
- <p class="description"><?php _e('If set, this path will be used as page to 403 errors (example: /error.php).', 'wp-htaccess-control'); ?></p>
424
- </td>
425
- </tr>
426
- <tr valign="top">
427
- <th scope="row" valign="middle"><?php _e('Canonical Url', 'wp-htaccess-control'); ?></th>
428
- <td style="width:3%;" valign="middle">
429
- <select name="WPhtc_canon">
430
- <option value=""></option>
431
- <option value="www" <?php if($WPhtc->get_data('canon')=='www'){echo "selected";} ?>><?php _e('Force WWW', 'wp-htaccess-control'); ?></option>
432
- <option value="simple" <?php if($WPhtc->get_data('canon')=='simple'){echo "selected";} ?>><?php _e('Force non-WWW', 'wp-htaccess-control'); ?></option>
433
- </select>
434
- </td>
435
- <td valign="middle">
436
- <p class="description"><?php _e('This will force canonization. This will be done by simply modifying the wordpress "site url" and "home" options (not htaccess).', 'wp-htaccess-control'); ?></p>
437
- </td>
438
- </tr>
439
- </table>
440
- </div>
441
- <!-- Maintenance Mode -->
442
- <div class="wphtc-section">
443
- <div class="wphtc-section-title stuffbox">
444
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
445
- <h3><?php _e('Maintenance Mode', 'wp-htaccess-control'); ?></h3>
446
- </div>
447
- <table class="form-table wphtc-inputs">
448
- <tr valign="top">
449
- <th scope="row" style="width:18%;"><?php _e('Maintenance Active', 'wp-htaccess-control'); ?></th>
450
- <td valign="middle">
451
- <input type="checkbox" name="WPhtc_maintenance_active" value="true" <?php if($WPhtc->get_data('maintenance_active')){ echo "checked";}?>/>
452
- </td>
453
- <td valign="middle">
454
- <p class="description"><?php _e('Toggles Maintenance Mode.', 'wp-htaccess-control'); ?></p>
455
- </td>
456
- </tr>
457
- <tr valign="top">
458
- <th scope="row" style="width:18%;"><?php _e('Allowed IPs', 'wp-htaccess-control'); ?></th>
459
- <td>
460
- <textarea name="WPhtc_maintenance_ips"><?php if($WPhtc->get_data('maintenance_ips')){echo implode($WPhtc->get_data('maintenance_ips'),"\n");}?></textarea>
461
- </td>
462
- <td valign="middle">
463
- <p class="description"><?php _e('List of allowed IPs.', 'wp-htaccess-control'); ?></p>
464
- <p class="description"><?php _e('All the IPs not listed will view the 403 error page or be redirected to a page set below.', 'wp-htaccess-control'); ?></p>
465
- </td>
466
- </tr>
467
- <tr valign="top">
468
- <th scope="row" style="width:18%;"><?php _e('Redirection', 'wp-htaccess-control'); ?></th>
469
- <td>
470
- <input type="text" name="WPhtc_maintenance_redirection" value="<?php echo $WPhtc->get_data('maintenance_redirection')?>"/>
471
- </td>
472
- <td valign="middle">
473
- <p class="description"><?php _e('If set, this will be used as redirection for disallowed IPs. This could be an external url or a document on your server (local paths begin with a trailing slash)', 'wp-htaccess-control'); ?></p>
474
- </td>
475
- </tr>
476
- </table>
477
- </div>
478
- <!-- Login Control -->
479
-
480
- <div class="wphtc-section">
481
- <div class="wphtc-section-title stuffbox">
482
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
483
- <h3><?php _e('Login Control', 'wp-htaccess-control'); ?></h3>
484
- </div>
485
- <table class="form-table wphtc-inputs">
486
- <tr valign="top">
487
- <th scope="row" style="width:18%;"></th>
488
- <td valign="middle" colspan="2">
489
- <p class="description"><?php _e('The options below concern wp-login.php. You\'ll be able to redirect all traffic away from that page and set some allowed IPs.', 'wp-htaccess-control'); ?></p>
490
- <p class="description"><?php _e('BEWARE: once disabled you won\'t be able to login through that form in any way, except for the listed IPs.', 'wp-htaccess-control'); ?></p>
491
- <p class="description"><?php _e('If everything goes wrong directly edit your .htaccess file and delete the relevant part somewhere at the top.', 'wp-htaccess-control'); ?></p>
492
- </td>
493
- </tr>
494
- <tr valign="top">
495
- <th scope="row" style="width:18%;"><?php _e('Disable wp-login.php', 'wp-htaccess-control'); ?></th>
496
- <td>
497
- <input type="checkbox" name="WPhtc_login_disabled" value="true" <?php if($WPhtc->get_data('login_disabled')){ echo "checked";}?>/>
498
- </td>
499
- <td valign="middle">
500
- <p class="description"><?php _e('This is the main switch. Make sure you know what you\'re doing.', 'wp-htaccess-control'); ?></p>
501
- </td>
502
- </tr>
503
- <tr valign="top">
504
- <th scope="row" style="width:18%;"><?php _e('Redirect', 'wp-htaccess-control'); ?></th>
505
- <td valign="middle">
506
- <input type="text" name="WPhtc_login_redirection" value="<?php echo $WPhtc->get_data('login_redirection')?>"/>
507
- </td>
508
- <td valign="middle">
509
- <p class="description"><?php _e('This will be used as redirection url. You might use something like "member-login" to redirect people to "http://yoursite.com/member-login/". If empty the home page will be served as redirection.', 'wp-htaccess-control'); ?></p>
510
- </td>
511
- </tr>
512
- <tr valign="top">
513
- <th scope="row" style="width:18%;"><?php _e('Allowed IPs', 'wp-htaccess-control'); ?></th>
514
- <td>
515
- <textarea name="WPhtc_login_ips"><?php if($WPhtc->get_data('login_ips')){echo implode($WPhtc->get_data('login_ips'),"\n");}?></textarea>
516
- </td>
517
- <td valign="middle">
518
- <p class="description"><?php _e('List of IPs allowed to access wp-login.php.', 'wp-htaccess-control'); ?></p>
519
- <p class="description"><?php _e('Make sure you are have a static IP when using this.'); ?></p>
520
- </td>
521
- </tr>
522
- <tr valign="top">
523
- <th scope="row" style="width:18%;"><?php _e('Half-mode', 'wp-htaccess-control'); ?></th>
524
- <td>
525
- <input type="checkbox" name="WPhtc_login_half_mode" value="true" <?php if($WPhtc->get_data('login_half_mode')){ echo "checked";}?>/>
526
- </td>
527
- <td valign="middle">
528
- <p class="description"><?php _e('(BETA) If set, this will still allow access to POST (login) requests, logout and to the password recovery form. I don\'t think this is very useful at the moment (login error messages will still show up on wp-login.php) but may be helpful for AJAX use.', 'wp-htaccess-control'); ?></p>
529
- </td>
530
- </tr>
531
- </table>
532
- </div>
533
- <?php wp_nonce_field('WPhtc_settings'); ?>
534
- <input type="hidden" name="action" value="update" />
535
- <div class="wphtc-menu">
536
- <a class="button-secondary" href="<?php echo wp_nonce_url($purl."&action=reset_rules", 'WPhtc_reset_settings'); ?>"><?php _e('Reset all rules', 'wp-htaccess-control'); ?></a>
537
- <input type="submit" class="button-primary" value="<?php _e('Save all changes', 'wp-htaccess-control'); ?>" />
538
- </div>
539
- </form>
540
- <div class="wphtc-section">
541
- <div class="wphtc-section-title stuffbox">
542
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
543
- <h3><?php _e('Current htaccess file as it is generated by Wordpress', 'wp-htaccess-control'); ?></h3>
544
- </div>
545
- <div class="wphtc-inputs start-open">
546
- <p>
547
- <code><?php echo str_replace(array("&lt;br /&gt;","&lt;br/&gt;"),"<br/>",htmlspecialchars($WPhtc->get_data('cur_hta')));?></code>
548
- </p>
549
- </div>
550
- </div>
551
- <?php if($debug){?>
552
- <div class="wphtc-section start-open">
553
- <div class="wphtc-section-title stuffbox">
554
- <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div>
555
- <h3><?php _e('Debug Data', 'wp-htaccess-control'); ?></h3>
556
- </div>
557
- <div class="wphtc-inputs">
558
- <pre>
559
- <?php print_r($WPhtc->data);?>
560
- </pre>
561
-
562
- <pre>
563
- <?php global $wp_rewrite; print_r($wp_rewrite);?>
564
- </pre>
565
- </div>
566
- </div>
567
- <?php } ?>
568
- </div>
569
  </div>
1
  <?php
2
+ global $WPhtc, $WPhtcEcho;
3
+ $debug = false;
4
+ $WPhtc->plugin_path=$plugin_path = WP_CONTENT_DIR . '/plugins/' . plugin_basename(dirname(__FILE__));
5
+ $WPhtc->plugin_url=$plugin_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__));
6
 
 
 
7
  //$q=explode('&',$_SERVER['QUERY_STRING']);
8
  //$purl='http'.((!empty($_SERVER['HTTPS'])) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$q[0];
9
+
10
+ $q = explode("&", $_SERVER['REQUEST_URI']);
11
+ $purl = $q[0];
12
  $WPhtc->page_action();
13
 
14
+ function WPHTCui($namesArray){
15
+ $plugin_path = WP_CONTENT_DIR . '/plugins/' . plugin_basename(dirname(__FILE__));
16
+ if(!is_array($namesArray)){
17
+ $namesArray=array($namesArray);
18
+ }
19
+ foreach($namesArray as $name){
20
+ include($plugin_path.'/admin-ui-includes/'.$name.'.php');
21
+ }
22
+ }
23
  ?>
24
+
25
  <div id="wphtc-page" class="wrap">
26
+ <h2>WP htaccess Control</h2>
27
+ <?php
28
+ if (!current_user_can("administrator")) {
29
+ echo '<p>' . __('Please log in as admin', 'wp-htaccess-control') . '</p>';
30
+ return;
31
+ }
32
+ ?>
33
+
34
+ <?php WPHTCui('sidebar') ?>
35
+
36
+ <div id="wphtc-main">
37
+ <form method="post" action="<?php echo $purl ?>">
38
+ <?php if ($WPhtcEcho != '') { ?>
39
+ <div class="updated fade" id="message" style="background-color: rgb(255, 251, 204);"><p><?php echo $WPhtcEcho; ?></p>
40
+ </div>
41
+ <?php
42
+ }
43
+ # Donation Message
44
+ if ($WPhtc->get_data('donation_hidden_time') && $WPhtc->get_data('donation_hidden_time') < time()) {
45
+ ?>
46
+ <div class="updated">
47
+ <p>
48
+ <strong>Is this plugin useful? Consider making a donation encouraging me to continue supporting it!</strong>
49
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=antonio%40antonioandra%2ede&lc=US&item_name=WP%20htaccess%20Control%20%28Antonio%20Andrade%29&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img
50
+ alt="Donate" border="0"
51
+ src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_donate_SM.gif"></a>
52
+ <span><a href="<?php echo $purl ?>&action=hide_donation_message">Hide this message</a></span>
53
+ </p>
54
+ </div>
55
+ <?php } ?>
56
+ <?php WPHTCui([
57
+ 'custom-author-permalink',
58
+ 'custom-pagination-permalink',
59
+ 'custom-search-permalink',
60
+ 'remove-bases',
61
+ 'advanced-archives',
62
+ 'more-rewrite',
63
+ 'custom-htaccess',
64
+ 'replace-htaccess',
65
+ 'htaccess-suggestions',
66
+ 'maintenance-mode'
67
+ ]) ?>
68
+
69
+ <?php wp_nonce_field('WPhtc_settings'); ?>
70
+ <input type="hidden" name="action" value="update"/>
71
+
72
+ <div class="wphtc-menu">
73
+ <a class="button-secondary"
74
+ href="<?php echo wp_nonce_url($purl . "&action=reset_rules", 'WPhtc_reset_settings'); ?>"><?php _e('Reset all rules', 'wp-htaccess-control'); ?></a>
75
+ <input type="submit" class="button-primary" value="<?php _e('Save all changes', 'wp-htaccess-control'); ?>"/>
76
+ </div>
77
+ </form>
78
+ <div class="wphtc-section">
79
+ <div class="wphtc-section-title stuffbox">
80
+ <div title="Click to toggle" class="handlediv"
81
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
82
+ <br></div>
83
+ <h3><?php _e('Current htaccess file as it is generated by WordPress', 'wp-htaccess-control'); ?></h3>
84
+ </div>
85
+ <div class="wphtc-inputs start-open">
86
+ <p>
87
+ <code><?php echo str_replace(array("&lt;br /&gt;", "&lt;br/&gt;"), "<br/>", htmlspecialchars($WPhtc->get_data('cur_hta'))); ?></code>
88
+ </p>
89
+ </div>
90
+ </div>
91
+
92
+ <!-- INSTRUCTIONS -->
93
+ <div class="wphtc-section permanently-open">
94
+ <div class="wphtc-section-title stuffbox">
95
+ <h3><?php _e('Read Me', 'wp-table-of-paginated-contents'); ?></h3>
96
+ </div>
97
+ <table class="form-table wphtc-inputs start-open">
98
+ <tr valign="top">
99
+ <th scope="row" style="width:18%;"></th>
100
+ <td>
101
+ <p class="description"><?php _e('This plugin has made such a long way that it should really now be called <strong>WP htaccess and Rewrite Control</strong>.', 'wp-htaccess-control'); ?></p>
102
+
103
+ <p class="description"><?php _e('Some of the features it provides might not work as expect on all environments and setups. You are advised to test configurations on a separate staging, on the same server and with the same theme and plugins. Please report any issues you might face.', 'wp-htaccess-control'); ?></p>
104
+ <p class="description"><?php _e('If your setup seems to get out of control there are a few options to reverse all changes:', 'wp-htaccess-control'); ?></p>
105
+ <ul class="description">
106
+ <li>1) <?php _e('Click on "Reset all rules", at the bottom of this page;', 'wp-htaccess-control'); ?></li>
107
+ <li>2) <?php _e('rename/delete the plugin folder and re-submit your permalink settings under "Settings > Permalinks"', 'wp-htaccess-control'); ?> </li>
108
+ <li>3) <?php _e('if the previous did not solve your issue, remove the .htaccess file on your blog\'s root directory and repeat step 2;', 'wp-htaccess-control'); ?></li>
109
+ <li>4) <?php _e('in such cases you might want to get back back to the last version you knew working, which you\'ll find at', 'wp-htaccess-control'); ?> <a href="http://wordpress.org/extend/plugins/wp-htaccess-control/download/">http://wordpress.org/extend/plugins/wp-htaccess-control/download/</a>.</li>
110
+ </ul>
111
+ <p><?php _e('Version 3.3 was tested up to WordPress 3.5.1.', 'wp-htaccess-control'); ?></p>
112
+ <p><?php _e('Version 3.4 was tested on WordPress 3.9.', 'wp-htaccess-control'); ?></p>
113
+ </td>
114
+ </tr>
115
+ </table>
116
+ </div>
117
+
118
+ <?php if ($debug) { ?>
119
+ <div class="wphtc-section start-open">
120
+ <div class="wphtc-section-title stuffbox">
121
+ <div title="Click to toggle" class="handlediv"
122
+ style="background:url('<?php bloginfo("wpurl") ?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent">
123
+ <br></div>
124
+ <h3><?php _e('Debug Data', 'wp-htaccess-control'); ?></h3>
125
+ </div>
126
+ <div class="wphtc-inputs">
127
+ <pre>
128
+ <?php print_r($WPhtc->data); ?>
129
+ </pre>
130
+
131
+ <pre>
132
+ <?php global $wp_rewrite;
133
+ print_r($wp_rewrite); ?>
134
+ </pre>
135
+ </div>
136
+ </div>
137
+ <?php } ?>
138
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  </div>
wp-htaccess-control-ui.scss ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wphtc-sidebar {
2
+ width: 19%;
3
+ float: right;
4
+ ul {
5
+ margin: 1em 0 1em 10px;
6
+ }
7
+ a {
8
+ text-decoration: none;
9
+
10
+ img {
11
+ margin-right: 5px;
12
+ }
13
+ }
14
+ }
15
+
16
+ #wphtc-main {
17
+ float: left;
18
+ width: 80%;
19
+ margin-bottom: 25px;
20
+ }
21
+
22
+ div.updated p {
23
+ img {
24
+ margin: -5px 15px;
25
+ }
26
+ span {
27
+ float: right;
28
+ }
29
+ }
30
+
31
+ .wphtc-menu {
32
+ margin: 10px 0;
33
+ }
34
+
35
+ .wphtc-section {
36
+ background: #ddd;
37
+ border: 1px solid #ddd;
38
+ border-bottom: 0;
39
+ margin-top: 15px;
40
+ -moz-border-radius: 6px;
41
+ -webkit-border-radius: 6px;
42
+ }
43
+
44
+ .wphtc-section-title {
45
+ -moz-user-select: none;
46
+ -khtml-user-select: none;
47
+ user-select: none;
48
+ margin-bottom: 0;
49
+ width: 100%;
50
+ border: 0;
51
+
52
+ h3 {
53
+ margin: 0;
54
+ padding: 10px;
55
+ cursor: pointer;
56
+ border-bottom: 0;
57
+ -moz-border-radius: 6px;
58
+ -webkit-border-radius: 6px;
59
+ }
60
+ .handlediv {
61
+ float: right;
62
+ height: 34px;
63
+ width: 23px;
64
+ cursor: pointer;
65
+ }
66
+ }
67
+
68
+ .wphtc-inputs {
69
+ background: #fff;
70
+ border: 1px solid #ddd;
71
+ border-left: 0;
72
+ border-right: 0;
73
+ -moz-border-radius: 6px;
74
+ -webkit-border-radius: 6px;
75
+
76
+ p, ul {
77
+ margin-left: 10px
78
+ }
79
+
80
+ th {
81
+ font-weight: bold;
82
+ padding-left:12px;
83
+ }
84
+
85
+ tr {
86
+ border-bottom: 1px solid #ddd
87
+ }
88
+
89
+ caption {
90
+ text-align: left;
91
+ padding: 10px;
92
+ background: #ddd;
93
+ }
94
+
95
+ pre {
96
+ margin: 2.5%;
97
+ width: 95%;
98
+ overflow: auto;
99
+ }
100
+ }
101
+
102
+ .form-table {
103
+ margin: 0;
104
+ }
105
+
106
+ #foot {
107
+ text-align: center;
108
+ font-size: 8px;
109
+ color: #aaa;
110
+ margin: 2em 0;
111
+ }
112
+
113
+ textarea.readonly {
114
+ background-color: #eee;
115
+ }
116
+
117
+ ul.description {
118
+ margin-top: 1em;
119
+ margin-left:2em;
120
+ font-style:italic;
121
+ a {
122
+ text-decoration: none;
123
+ }
124
+ li{
125
+ color:#666;
126
+ }
127
+ }
wp-htaccess-control.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /*
3
  Plugin Name: WP htaccess Control
4
- Plugin URI: http://dardna.com/wp-htaccess-control
5
- Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
6
- Version: 3.3.4
7
  Author: António Andrade
8
  Author URI: http://antonioandra.de
9
  */
10
- /* Copyright 2010-2012 António Andrade (email : antonio@antonioandra.de)
11
 
12
  This program is free software; you can redistribute it and/or modify
13
  it under the terms of the GNU General Public License as published by
@@ -136,7 +136,7 @@ if (!class_exists("WPhtc")) {
136
  function refresh_rewrite_rules_later(){
137
  wp_schedule_single_event(time(), 'flush_event');
138
  }
139
- # Filter pagination links generated by Wordpress
140
  function filter_get_pagenum_link($result){
141
  $result=preg_replace("/".urlencode($this->data['cpp'])."\/[0-9]+[\/]?/","",$result);
142
  $result=str_replace("page",urlencode($this->data['cpp']),$result);
@@ -195,18 +195,8 @@ if (!class_exists("WPhtc")) {
195
  else{
196
  $ancestors="";
197
  }
198
-
199
- # some query vars differ from tax name
200
- switch($taxonomy->name){
201
- case "post_tag":
202
- $tax_name="tag";
203
- break;
204
- case "category":
205
- $tax_name="category_name";
206
- break;
207
- default:
208
- $tax_name=$taxonomy->name;
209
- }
210
 
211
  # create archives
212
  if(isset($this->data['create_archive'][$tax_name])){
@@ -241,14 +231,14 @@ if (!class_exists("WPhtc")) {
241
  foreach ($blogusers as $user) {
242
 
243
  $new_rules = array(
244
- '('.$user->user_nicename.')/([^/]+)/([0-9]{4})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]',
245
- '('.$user->user_nicename.')/([^/]+)/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
246
 
247
- '('.$user->user_nicename.')/([^/]+)/([0-9]{4})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
248
- '('.$user->user_nicename.')/([^/]+)/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]',
249
 
250
- '('.$user->user_nicename.')/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]',
251
- '('.$user->user_nicename.')/([^/]+)/([0-9]{4})/([0-9]{2})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]');
252
 
253
  $rewrite_rules = $new_rules + $rewrite_rules;
254
  }
@@ -324,18 +314,18 @@ if (!class_exists("WPhtc")) {
324
  }
325
  }
326
  }
327
- # Adding rewrite pairs to the .htaccess generated by Wordpress, everytime the rules are flush
328
  /*
329
  * @var $wp_rewrite WP_Rewrite
330
  * @return WP_Rewrite
331
  */
332
  function wp_rewrite_rules($wp_rewrite){
333
  # Keeping a copy of the generated htaccess in our option array for later reviewing
334
- $this->data['cur_hta']='# BEGIN Wordpress<br/>'.nl2br($wp_rewrite->mod_rewrite_rules())."# END Wordpress";
335
  update_option('WPhtc_data',$this->data);
336
  return $wp_rewrite;
337
  }
338
- # Adding Custom Rules to htaccess file generated by Wordpress, everytime the rules are flush
339
  function hta_rules($rules){
340
  $new_rules="";
341
  # keeping original hta
@@ -596,7 +586,7 @@ if (!class_exists("WPhtc")) {
596
  $this->check_first_run();
597
  if(isset($_REQUEST['action'])){
598
  $action=$_REQUEST['action'];
599
- global $echo;
600
 
601
  switch($action){
602
  # Hide donation message for one month
@@ -613,7 +603,7 @@ if (!class_exists("WPhtc")) {
613
  $this->data=array();
614
  delete_option('WPhtc_data');
615
  //update_option('WPhtc_data',$this->data);
616
- $echo.=__('All rules reset.', 'wp-htaccess-control');
617
  $this->refresh_rewrite_rules();
618
  break;
619
  # if updating, save new rules in database and flush rewrite rules
@@ -634,24 +624,6 @@ if (!class_exists("WPhtc")) {
634
 
635
  # wordpress htaccess and jim morgan's htaccess
636
  $this->data['wp_hta']=$_POST['WPhtc_wp_hta']."\n";
637
- if($this->data['jim_morgan_hta']){
638
- $this->data['wp_hta'] ="\nRewriteEngine on\n";
639
- $this->data['wp_hta'].="# Unless you have set a different RewriteBase preceding this point,\n";
640
- $this->data['wp_hta'].="# you may delete or comment-out the following RewriteBase directive:\n";
641
- $this->data['wp_hta'].="RewriteBase /\n";
642
- $this->data['wp_hta'].="# if this request is for \"/\" or has already been rewritten to WP\n";
643
- $this->data['wp_hta'].="RewriteCond $1 ^(index\.php)?$ [OR]\n";
644
- $this->data['wp_hta'].="# or if request is for image, css, or js file\n";
645
- $this->data['wp_hta'].="RewriteCond $1 \.(gif|jpg|jpeg|png|css|js|ico)$ [NC,OR]\n";
646
- $this->data['wp_hta'].="# or if URL resolves to existing file\n";
647
- $this->data['wp_hta'].="RewriteCond %{REQUEST_FILENAME} -f [OR]\n";
648
- $this->data['wp_hta'].="# or if URL resolves to existing directory\n";
649
- $this->data['wp_hta'].="RewriteCond %{REQUEST_FILENAME} -d\n";
650
- $this->data['wp_hta'].="# then skip the rewrite to WP\n";
651
- $this->data['wp_hta'].="RewriteRule ^(.*)$ - [S=1]\n";
652
- $this->data['wp_hta'].="# else rewrite the request to WP\n";
653
- $this->data['wp_hta'].="RewriteRule . /index.php [L]\n";
654
- }
655
 
656
  # get htaccess Suggestions
657
  $this->data['up_limit']=(is_numeric($_POST['WPhtc_up_limit'])&&$_POST['WPhtc_up_limit']>0)?$_POST['WPhtc_up_limit']:'';
@@ -704,9 +676,10 @@ if (!class_exists("WPhtc")) {
704
 
705
  # Update WP htaccess Control options
706
  update_option('WPhtc_data',$this->data);
 
707
  # Flush Rewrite Rules
708
  $this->refresh_rewrite_rules();
709
- $echo.=__('All options updated.', 'wp-htaccess-control');
710
  break;
711
  }
712
  }
@@ -745,7 +718,7 @@ if (isset($WPhtc)) {
745
 
746
  add_action('sm_buildmap',array($WPhtc,'set_sm'));
747
 
748
- /* Taxonomy Base Removal*/
749
  if($WPhtc->data['remove_taxonomy_base']){
750
  add_filter('term_link',array($WPhtc,'filter_term_link'),10,3);
751
  foreach($WPhtc->data['remove_taxonomy_base'] as $tax=>$v){
1
  <?php
2
  /*
3
  Plugin Name: WP htaccess Control
4
+ Plugin URI: http://antonioandra.de
5
+ Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by WordPress.
6
+ Version: 3.4
7
  Author: António Andrade
8
  Author URI: http://antonioandra.de
9
  */
10
+ /* Copyright 2010-2014 António Andrade (email : antonio@antonioandra.de)
11
 
12
  This program is free software; you can redistribute it and/or modify
13
  it under the terms of the GNU General Public License as published by
136
  function refresh_rewrite_rules_later(){
137
  wp_schedule_single_event(time(), 'flush_event');
138
  }
139
+ # Filter pagination links generated by WordPress
140
  function filter_get_pagenum_link($result){
141
  $result=preg_replace("/".urlencode($this->data['cpp'])."\/[0-9]+[\/]?/","",$result);
142
  $result=str_replace("page",urlencode($this->data['cpp']),$result);
195
  else{
196
  $ancestors="";
197
  }
198
+
199
+ $tax_name=$taxonomy->name;
 
 
 
 
 
 
 
 
 
 
200
 
201
  # create archives
202
  if(isset($this->data['create_archive'][$tax_name])){
231
  foreach ($blogusers as $user) {
232
 
233
  $new_rules = array(
234
+ '('.$user->user_nicename.')/([0-9]{4})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]',
235
+ '('.$user->user_nicename.')/([0-9]{4})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&paged=$matches[3]',
236
 
237
+ '('.$user->user_nicename.')/([0-9]{4})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]',
238
+ '('.$user->user_nicename.')/([0-9]{4})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]',
239
 
240
+ '('.$user->user_nicename.')/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]',
241
+ '('.$user->user_nicename.')/([0-9]{4})/([0-9]{2})/([0-9]{2})/'.$page_base.'/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]');
242
 
243
  $rewrite_rules = $new_rules + $rewrite_rules;
244
  }
314
  }
315
  }
316
  }
317
+ # Adding rewrite pairs to the .htaccess generated by WordPress, everytime the rules are flush
318
  /*
319
  * @var $wp_rewrite WP_Rewrite
320
  * @return WP_Rewrite
321
  */
322
  function wp_rewrite_rules($wp_rewrite){
323
  # Keeping a copy of the generated htaccess in our option array for later reviewing
324
+ $this->data['cur_hta']='# BEGIN WordPress<br/>'.nl2br($wp_rewrite->mod_rewrite_rules())."# END WordPress";
325
  update_option('WPhtc_data',$this->data);
326
  return $wp_rewrite;
327
  }
328
+ # Adding Custom Rules to htaccess file generated by WordPress, everytime the rules are flush
329
  function hta_rules($rules){
330
  $new_rules="";
331
  # keeping original hta
586
  $this->check_first_run();
587
  if(isset($_REQUEST['action'])){
588
  $action=$_REQUEST['action'];
589
+ global $WPhtcEcho;
590
 
591
  switch($action){
592
  # Hide donation message for one month
603
  $this->data=array();
604
  delete_option('WPhtc_data');
605
  //update_option('WPhtc_data',$this->data);
606
+ $WPhtcEcho.=__('All rules reset.', 'wp-htaccess-control');
607
  $this->refresh_rewrite_rules();
608
  break;
609
  # if updating, save new rules in database and flush rewrite rules
624
 
625
  # wordpress htaccess and jim morgan's htaccess
626
  $this->data['wp_hta']=$_POST['WPhtc_wp_hta']."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
627
 
628
  # get htaccess Suggestions
629
  $this->data['up_limit']=(is_numeric($_POST['WPhtc_up_limit'])&&$_POST['WPhtc_up_limit']>0)?$_POST['WPhtc_up_limit']:'';
676
 
677
  # Update WP htaccess Control options
678
  update_option('WPhtc_data',$this->data);
679
+
680
  # Flush Rewrite Rules
681
  $this->refresh_rewrite_rules();
682
+ $WPhtcEcho.=__('All options updated.', 'wp-htaccess-control');
683
  break;
684
  }
685
  }
718
 
719
  add_action('sm_buildmap',array($WPhtc,'set_sm'));
720
 
721
+ // Taxonomy Base Removal
722
  if($WPhtc->data['remove_taxonomy_base']){
723
  add_filter('term_link',array($WPhtc,'filter_term_link'),10,3);
724
  foreach($WPhtc->data['remove_taxonomy_base'] as $tax=>$v){