WordPress HTTPS (SSL) - Version 3.3.0

Version Description

  • Tested with WordPress v3.5.
  • Added German translation and gettext support. Thanks Christian Foellmann.
  • Large sites using the default SSL Host (matching the Site URL) should experience a significant performance increase.
  • Added the Access-Control-Allow-Origin header to AJAX calls to allow local HTTP pages make HTTPS AJAX calls.
Download this release

Release Info

Developer Mvied
Plugin Icon wp plugin WordPress HTTPS (SSL)
Version 3.3.0
Comparing to
See all releases

Code changes from version 3.2.3 to 3.3.0

admin/templates/metabox/domain_mapping.php CHANGED
@@ -1,7 +1,7 @@
1
  <form name="<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_form" id="<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
2
  <?php settings_fields($this->getPlugin()->getSlug()); ?>
3
 
4
- <p>Domain mapping allows you to map external domains that host their HTTPS content on a different domain. You may use <a href="#TB_inline?height=155&width=350&inlineId=regex-help&" class="thickbox" title="Regular Expressions Help">regular expressions</a>.</p>
5
 
6
  <table class="form-table" id="domain_mapping">
7
  <thead>
@@ -27,8 +27,8 @@
27
  <input type="text" name="https_domain[]" value="<?php echo $https_domain; ?>" />
28
  </td>
29
  <td class="controls">
30
- <a class="remove" href="#" title="Remove URL Filter">Remove</a>
31
- <a class="add" href="#" title="Add URL Filter">Add</a>
32
  </td>
33
  </tr>
34
 
@@ -50,8 +50,8 @@
50
  <input type="text" name="https_domain[]" value="" />
51
  </td>
52
  <td class="controls">
53
- <a class="remove" href="#" title="Remove URL Filter">Remove</a>
54
- <a class="add" href="#" title="Add URL Filter">Add</a>
55
  </td>
56
  </tr>
57
  </table>
@@ -59,9 +59,9 @@
59
  <input type="hidden" name="action" value="wphttps-domain-mapping" />
60
 
61
  <p class="button-controls">
62
- <input type="submit" name="domain_mapping-save" value="Save Changes" class="button-primary" id="domain_mapping-save" />
63
- <input type="submit" name="domain_mapping-reset" value="Reset" class="button-secondary" id="domain_mapping-reset" />
64
- <img alt="Waiting..." src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
65
  </p>
66
  </form>
67
  <script type="text/javascript">
@@ -108,7 +108,7 @@ jQuery(document).ready(function($) {
108
  });
109
 
110
  $('#domain_mapping-reset').click(function(e, el) {
111
- if ( ! confirm('Are you sure you want to reset all WordPress HTTPS domain mappings?') ) {
112
  e.preventDefault();
113
  return false;
114
  }
1
  <form name="<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_form" id="<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
2
  <?php settings_fields($this->getPlugin()->getSlug()); ?>
3
 
4
+ <p><?php printf( __('Domain mapping allows you to map external domains that host their HTTPS content on a different domain. You may use %s regular expressions %s','wordpress-https'),'<a href="#TB_inline?height=155&width=350&inlineId=regex-help&" class="thickbox" title="' . __('Regular Expressions Help','wordpress-https') . '">', '</a>') ; ?>.</p>
5
 
6
  <table class="form-table" id="domain_mapping">
7
  <thead>
27
  <input type="text" name="https_domain[]" value="<?php echo $https_domain; ?>" />
28
  </td>
29
  <td class="controls">
30
+ <a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
31
+ <a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
32
  </td>
33
  </tr>
34
 
50
  <input type="text" name="https_domain[]" value="" />
51
  </td>
52
  <td class="controls">
53
+ <a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
54
+ <a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
55
  </td>
56
  </tr>
57
  </table>
59
  <input type="hidden" name="action" value="wphttps-domain-mapping" />
60
 
61
  <p class="button-controls">
62
+ <input type="submit" name="domain_mapping-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="domain_mapping-save" />
63
+ <input type="submit" name="domain_mapping-reset" value="<?php _e('Reset','wordpress-https'); ?>" class="button-secondary" id="domain_mapping-reset" />
64
+ <img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
65
  </p>
66
  </form>
67
  <script type="text/javascript">
108
  });
109
 
110
  $('#domain_mapping-reset').click(function(e, el) {
111
+ if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS domain mappings?','wordpress-https'); ?>') ) {
112
  e.preventDefault();
113
  return false;
114
  }
admin/templates/metabox/filters.php CHANGED
@@ -3,8 +3,8 @@
3
  <table class="form-table">
4
  <tr valign="top" id="secure_filter_row">
5
  <th scope="row">
6
- Secure Filters
7
- <p class="description">Example: If you have an E-commerce shop and all of the URL's begin with /store/, you could secure all store links by entering '/store/' on one line. You may use <a href="#TB_inline?height=155&width=350&inlineId=regex-help" class="thickbox" title="Regular Expressions Help">regular expressions</a>.</p>
8
  </th>
9
  <td>
10
  <textarea name="secure_filter" id="secure_filter"><?php echo implode("\n", $this->getPlugin()->getSetting('secure_filter')); ?></textarea>
@@ -13,9 +13,9 @@
13
  </table>
14
  <input type="hidden" name="action" value="wphttps-filters" />
15
  <p class="button-controls">
16
- <input type="submit" name="filters-save" value="Save Changes" class="button-primary" id="filters-save" />
17
- <input type="submit" name="filters-reset" value="Reset" class="button-secondary" id="filters-reset" />
18
- <img alt="Waiting..." src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
19
  </p>
20
  </form>
21
 
@@ -32,7 +32,7 @@ jQuery(document).ready(function($) {
32
  });
33
 
34
  $('#filters-reset').click(function(e, el) {
35
- if ( ! confirm('Are you sure you want to reset all WordPress HTTPS filters?') ) {
36
  e.preventDefault();
37
  return false;
38
  }
3
  <table class="form-table">
4
  <tr valign="top" id="secure_filter_row">
5
  <th scope="row">
6
+ <?php _e('Secure Filters','wordpress-https'); ?>
7
+ <p class="description"><?php printf( __("Example: If you have an E-commerce shop and all of the URL's begin with /store/, you could secure all store links by entering '/store/' on one line. You may use %s regular expressions %s",'wordpress-https'),'<a href="#TB_inline?height=155&width=350&inlineId=regex-help" class="thickbox" title="' . __('Regular Expressions Help','wordpress-https') . '">','</a>'); ?>.</p>
8
  </th>
9
  <td>
10
  <textarea name="secure_filter" id="secure_filter"><?php echo implode("\n", $this->getPlugin()->getSetting('secure_filter')); ?></textarea>
13
  </table>
14
  <input type="hidden" name="action" value="wphttps-filters" />
15
  <p class="button-controls">
16
+ <input type="submit" name="filters-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="filters-save" />
17
+ <input type="submit" name="filters-reset" value="<?php _e('Reset','wordpress-https'); ?>" class="button-secondary" id="filters-reset" />
18
+ <img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
19
  </p>
20
  </form>
21
 
32
  });
33
 
34
  $('#filters-reset').click(function(e, el) {
35
+ if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS filters?','wordpress-https'); ?>') ) {
36
  e.preventDefault();
37
  return false;
38
  }
admin/templates/metabox/network.php CHANGED
@@ -4,20 +4,20 @@
4
  <table id="blog-table">
5
  <thead>
6
  <tr>
7
- <th class="blog-blog">Blog</th>
8
- <th class="blog-host">SSL Host</th>
9
- <th class="blog-ssl_admin">Force SSL Admin</th>
10
- <th class="blog-exclusive_https">Force SSL Exclusively</th>
11
- <th class="blog-remove_unsecure">Remove Unsecure Elements</th>
12
- <th class="blog-debug">Debug Mode</th>
13
- <th class="blog-proxy">Proxy</th>
14
- <th class="blog-admin_menu">Admin Menu Location</th>
15
  </tr>
16
  </thead>
17
  <tbody>
18
  <?php
19
  global $wpdb;
20
- $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs));
21
  foreach($blogs as $blog_id) {
22
  $ssl_host = ($this->getPlugin()->getSetting('ssl_host', $blog_id) != '' ? $this->getPlugin()->getSetting('ssl_host', $blog_id) : get_site_url($blog_id, '', 'https'));
23
  $ssl_host = preg_replace('/http[s]?:\/\//', '', $ssl_host);
@@ -32,15 +32,15 @@
32
  <td class="blog-debug"><input type="hidden" name="blog[<?php echo $blog_id; ?>][debug]" value="0" /><input name="blog[<?php echo $blog_id; ?>][debug]" type="checkbox" value="1"<?php echo (($this->getPlugin()->getSetting('debug', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
33
  <td class="blog-proxy">
34
  <select name="blog[<?php echo $blog_id; ?>][ssl_proxy]">
35
- <option value="0"<?php echo ((! $this->getPlugin()->getSetting('ssl_proxy', $blog_id)) ? ' selected="selected"' : ''); ?>>No</option>
36
- <option value="auto"<?php echo (($this->getPlugin()->getSetting('ssl_proxy', $blog_id) === 'auto') ? ' selected="selected"' : ''); ?>>Auto</option>
37
- <option value="1"<?php echo (($this->getPlugin()->getSetting('ssl_proxy', $blog_id) == 1) ? ' selected="selected"' : ''); ?>>Yes</option>
38
  </select>
39
  </td>
40
  <td class="blog-admin_menu">
41
  <select name="blog[<?php echo $blog_id; ?>][admin_menu]">
42
- <option value="side"<?php echo (($this->getPlugin()->getSetting('admin_menu', $blog_id) === 'side') ? ' selected="selected"' : ''); ?>>Sidebar</option>
43
- <option value="settings"<?php echo (($this->getPlugin()->getSetting('admin_menu', $blog_id) === 'settings') ? ' selected="selected"' : ''); ?>>Settings</option>
44
  </select>
45
  </td>
46
  </tr>
@@ -64,15 +64,15 @@
64
  <td class="blog-debug"><input type="hidden" name="blog_default[debug]" value="0" /><input name="blog_default[debug]" type="checkbox" value="1"<?php echo ($defaults['debug'] ? ' checked="checked"' : ''); ?> /></td>
65
  <td class="blog-proxy">
66
  <select name="blog_default[ssl_proxy]">
67
- <option value="0"<?php echo (! $defaults['ssl_proxy'] ? ' selected="selected"' : ''); ?>>No</option>
68
- <option value="auto"<?php echo ($defaults['ssl_proxy'] === 'auto' ? ' selected="selected"' : ''); ?>>Auto</option>
69
- <option value="1"<?php echo ($defaults['ssl_proxy'] === 1 ? ' selected="selected"' : ''); ?>>Yes</option>
70
  </select>
71
  </td>
72
  <td class="blog-admin_menu">
73
  <select name="blog_default[admin_menu]">
74
- <option value="side"<?php echo ($defaults['admin_menu'] === 'side' ? ' selected="selected"' : ''); ?>>Sidebar</option>
75
- <option value="settings"<?php echo ($defaults['admin_menu'] === 'settings' ? ' selected="selected"' : ''); ?>>Settings</option>
76
  </select>
77
  </td>
78
  </tr>
@@ -83,8 +83,8 @@
83
  <input type="hidden" name="action" value="wphttps-network" />
84
 
85
  <p class="button-controls">
86
- <input type="submit" name="network-settings-save" value="Save Changes" class="button-primary" id="network-settings-save" />
87
- <img alt="Waiting..." src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
88
  </p>
89
  </form>
90
  <script type="text/javascript">
4
  <table id="blog-table">
5
  <thead>
6
  <tr>
7
+ <th class="blog-blog"><?php _e('Blog','wordpress-https'); ?></th>
8
+ <th class="blog-host"><?php _e('SSL Host','wordpress-https'); ?></th>
9
+ <th class="blog-ssl_admin"><?php _e('Force SSL Admin','wordpress-https'); ?></th>
10
+ <th class="blog-exclusive_https"><?php _e('Force SSL Exclusively','wordpress-https'); ?></th>
11
+ <th class="blog-remove_unsecure"><?php _e('Remove Unsecure Elements','wordpress-https'); ?></th>
12
+ <th class="blog-debug"><?php _e('Debug Mode','wordpress-https'); ?></th>
13
+ <th class="blog-proxy"><?php _e('Proxy','wordpress-https'); ?></th>
14
+ <th class="blog-admin_menu"><?php _e('Admin Menu Location','wordpress-https'); ?></th>
15
  </tr>
16
  </thead>
17
  <tbody>
18
  <?php
19
  global $wpdb;
20
+ $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL));
21
  foreach($blogs as $blog_id) {
22
  $ssl_host = ($this->getPlugin()->getSetting('ssl_host', $blog_id) != '' ? $this->getPlugin()->getSetting('ssl_host', $blog_id) : get_site_url($blog_id, '', 'https'));
23
  $ssl_host = preg_replace('/http[s]?:\/\//', '', $ssl_host);
32
  <td class="blog-debug"><input type="hidden" name="blog[<?php echo $blog_id; ?>][debug]" value="0" /><input name="blog[<?php echo $blog_id; ?>][debug]" type="checkbox" value="1"<?php echo (($this->getPlugin()->getSetting('debug', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
33
  <td class="blog-proxy">
34
  <select name="blog[<?php echo $blog_id; ?>][ssl_proxy]">
35
+ <option value="0"<?php echo ((! $this->getPlugin()->getSetting('ssl_proxy', $blog_id)) ? ' selected="selected"' : ''); ?>><?php _e('No','wordpress-https'); ?></option>
36
+ <option value="auto"<?php echo (($this->getPlugin()->getSetting('ssl_proxy', $blog_id) === 'auto') ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
37
+ <option value="1"<?php echo (($this->getPlugin()->getSetting('ssl_proxy', $blog_id) == 1) ? ' selected="selected"' : ''); ?>><?php _e('Yes','wordpress-https'); ?></option>
38
  </select>
39
  </td>
40
  <td class="blog-admin_menu">
41
  <select name="blog[<?php echo $blog_id; ?>][admin_menu]">
42
+ <option value="side"<?php echo (($this->getPlugin()->getSetting('admin_menu', $blog_id) === 'side') ? ' selected="selected"' : ''); ?>><?php _e('Sidebar','wordpress-https'); ?></option>
43
+ <option value="settings"<?php echo (($this->getPlugin()->getSetting('admin_menu', $blog_id) === 'settings') ? ' selected="selected"' : ''); ?>><?php _e('Settings','wordpress-https'); ?></option>
44
  </select>
45
  </td>
46
  </tr>
64
  <td class="blog-debug"><input type="hidden" name="blog_default[debug]" value="0" /><input name="blog_default[debug]" type="checkbox" value="1"<?php echo ($defaults['debug'] ? ' checked="checked"' : ''); ?> /></td>
65
  <td class="blog-proxy">
66
  <select name="blog_default[ssl_proxy]">
67
+ <option value="0"<?php echo (! $defaults['ssl_proxy'] ? ' selected="selected"' : ''); ?>><?php _e('No','wordpress-https'); ?></option>
68
+ <option value="auto"<?php echo ($defaults['ssl_proxy'] === 'auto' ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
69
+ <option value="1"<?php echo ($defaults['ssl_proxy'] === 1 ? ' selected="selected"' : ''); ?>><?php _e('Yes','wordpress-https'); ?></option>
70
  </select>
71
  </td>
72
  <td class="blog-admin_menu">
73
  <select name="blog_default[admin_menu]">
74
+ <option value="side"<?php echo ($defaults['admin_menu'] === 'side' ? ' selected="selected"' : ''); ?>><?php _e('Sidebar','wordpress-https'); ?></option>
75
+ <option value="settings"<?php echo ($defaults['admin_menu'] === 'settings' ? ' selected="selected"' : ''); ?>><?php _e('Settings','wordpress-https'); ?></option>
76
  </select>
77
  </td>
78
  </tr>
83
  <input type="hidden" name="action" value="wphttps-network" />
84
 
85
  <p class="button-controls">
86
+ <input type="submit" name="network-settings-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="network-settings-save" />
87
+ <img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
88
  </p>
89
  </form>
90
  <script type="text/javascript">
admin/templates/metabox/post.php CHANGED
@@ -21,8 +21,8 @@ wp_nonce_field($this->getPlugin()->getSlug(), $this->getPlugin()->getSlug());
21
  <?php if ( isset($parent_force_ssl_children) ) { ?>
22
  <input type="hidden" value="<?php echo ( $force_ssl ? 1 : 0 ); ?>" name="force_ssl" />
23
  <?php } ?>
24
- <label<?php echo ( isset($parent_force_ssl_children) ? ' title="This post\'s parent page \'' . $parent_force_ssl_children->post_title . '\' has \'Secure child posts\' enabled."' : '' ); ?>><input type="checkbox" value="1" name="force_ssl" <?php echo ( $force_ssl ? ' checked="checked"' : '' ); ?><?php echo ( isset($parent_force_ssl_children) ? ' disabled="disabled="' : '' ); ?> /> Secure post</label>
25
  </div>
26
  <div class="misc-pub-section misc-pub-section-last">
27
- <label><input type="checkbox" value="1" name="force_ssl_children" <?php echo ( $force_ssl_children ? ' checked="checked"' : '' ); ?> /> Secure child posts</label>
28
  </div>
21
  <?php if ( isset($parent_force_ssl_children) ) { ?>
22
  <input type="hidden" value="<?php echo ( $force_ssl ? 1 : 0 ); ?>" name="force_ssl" />
23
  <?php } ?>
24
+ <label<?php echo ( isset($parent_force_ssl_children) ? ' title="' . printf( __("This post's parent page '%s' has 'Secure child posts' enabled.",'wordpress-https'), $parent_force_ssl_children->post_title) . '"' : '' ); ?>><input type="checkbox" value="1" name="force_ssl" <?php echo ( $force_ssl ? ' checked="checked"' : '' ); ?><?php echo ( isset($parent_force_ssl_children) ? ' disabled="disabled="' : '' ); ?> /> <?php _e('Secure post','wordpress-https'); ?></label>
25
  </div>
26
  <div class="misc-pub-section misc-pub-section-last">
27
+ <label><input type="checkbox" value="1" name="force_ssl_children" <?php echo ( $force_ssl_children ? ' checked="checked"' : '' ); ?> /> <?php _e('Secure child posts','wordpress-https'); ?></label>
28
  </div>
admin/templates/metabox/settings.php CHANGED
@@ -12,88 +12,88 @@
12
 
13
  <table class="form-table">
14
  <tr valign="top" id="ssl_host_row">
15
- <th scope="row">SSL Host</th>
16
  <td>
17
  <fieldset>
18
  <label for="ssl_host" id="ssl_host_label">
19
  <input name="ssl_host" type="text" id="ssl_host" class="regular-text code" value="<?php echo $ssl_host; ?>" />
20
  </label>
21
- <label for="ssl_port" id="ssl_port_label">Port
22
  <input name="ssl_port" type="text" id="ssl_port" class="small-text" value="<?php echo $this->getPlugin()->getSetting('ssl_port'); ?>" />
23
  </label>
24
  </fieldset>
25
  </td>
26
  </tr>
27
  <tr valign="top" id="ssl_admin_row">
28
- <th scope="row">Force SSL Administration</th>
29
  <td>
30
  <fieldset>
31
  <label for="ssl_admin">
32
  <input type="hidden" name="ssl_admin" value="0" />
33
  <input name="ssl_admin" type="checkbox" id="ssl_admin" value="1"<?php echo ((force_ssl_admin()) ? ' checked="checked" disabled="disabled" title="FORCE_SSL_ADMIN is true in wp-config.php"' : (($this->getPlugin()->getSetting('ssl_admin')) ? ' checked="checked"' : '') ); ?> />
34
- <p class="description">Always use HTTPS while in the admin panel. This setting is identical to <a href="http://codex.wordpress.org/Administration_Over_SSL#Example_2" target="_blank">FORCE_SSL_ADMIN</a>.</p>
35
  </label>
36
  </fieldset>
37
  </td>
38
  </tr>
39
  <tr valign="top" id="exclusive_https_row">
40
- <th scope="row">Force SSL Exclusively</th>
41
  <td>
42
  <fieldset>
43
  <label for="exclusive_https">
44
  <input type="hidden" name="exclusive_https" value="0" />
45
  <input name="exclusive_https" type="checkbox" id="exclusive_https" value="1"<?php echo (($this->getPlugin()->getSetting('exclusive_https')) ? ' checked="checked"' : ''); ?> />
46
- <p class="description">Any page that is not secured via <a href="<?php echo parse_url($this->getPlugin()->getPluginUrl(), PHP_URL_PATH); ?>/screenshot-2.png" class="thickbox">Force SSL</a> or URL Filters will be redirected to HTTP.</p>
47
  </label>
48
  </fieldset>
49
  </td>
50
  </tr>
51
  <tr valign="top" id="remove_unsecure_row">
52
- <th scope="row">Remove Unsecure Elements</th>
53
  <td>
54
  <fieldset>
55
  <label for="remove_unsecure">
56
  <input type="hidden" name="remove_unsecure" value="0" />
57
  <input name="remove_unsecure" type="checkbox" id="remove_unsecure" value="1"<?php echo (($this->getPlugin()->getSetting('remove_unsecure')) ? ' checked="checked"' : ''); ?> />
58
- <p class="description">Remove elements inaccessible over HTTPS. May break other plugins' functionality.</p>
59
  </label>
60
  </fieldset>
61
  </td>
62
  </tr>
63
  <tr valign="top" id="debug_row">
64
- <th scope="row">Debug Mode</th>
65
  <td>
66
  <fieldset>
67
  <label for="debug">
68
  <input type="hidden" name="debug" value="0" />
69
  <input name="debug" type="checkbox" id="debug" value="1"<?php echo (($this->getPlugin()->getSetting('debug')) ? ' checked="checked"' : ''); ?> />
70
- <p class="description">Outputs debug information to the browser's console.</p>
71
  </label>
72
  </fieldset>
73
  </td>
74
  </tr>
75
  <tr valign="top" id="ssl_proxy_row">
76
- <th scope="row">Proxy</th>
77
  <td>
78
  <fieldset>
79
  <label for="ssl_proxy" class="label-radio">
80
- <input type="radio" name="ssl_proxy" value="0"<?php echo ((! $this->getPlugin()->getSetting('ssl_proxy')) ? ' checked="checked"' : ''); ?>> <span>No</span>
81
- <input type="radio" name="ssl_proxy" value="auto"<?php echo (($this->getPlugin()->getSetting('ssl_proxy') === 'auto') ? ' checked="checked"' : ''); ?>> <span>Auto</span>
82
- <input type="radio" name="ssl_proxy" value="1"<?php echo (($this->getPlugin()->getSetting('ssl_proxy') == 1) ? ' checked="checked"' : ''); ?>> <span>Yes</span>
83
  </label>
84
- <p class="description">If you think you may behind a proxy, set to Auto. Otherwise, leave the setting on No.</p>
85
  </fieldset>
86
  </td>
87
  </tr>
88
  <tr valign="top" id="admin_menu_row">
89
- <th scope="row">Admin Menu Location</th>
90
  <td>
91
  <fieldset>
92
  <label for="admin_menu_side" class="label-radio">
93
- <input type="radio" name="admin_menu" id="admin_menu_side" value="side"<?php echo (($this->getPlugin()->getSetting('admin_menu') === 'side') ? ' checked="checked"' : ''); ?>> <span>Sidebar</span>
94
  </label>
95
  <label for="admin_menu_settings" class="label-radio">
96
- <input type="radio" name="admin_menu" id="admin_menu_settings" value="settings"<?php echo (($this->getPlugin()->getSetting('admin_menu') === 'settings') ? ' checked="checked"' : ''); ?>> <span>Settings</span>
97
  </label>
98
  </fieldset>
99
  </td>
@@ -105,9 +105,9 @@
105
  <input type="hidden" name="ssl_host_diff" value="<?php echo (($this->getPlugin()->getSetting('ssl_host_diff') != 1) ? 0 : 1); ?>" />
106
 
107
  <p class="button-controls">
108
- <input type="submit" name="settings-save" value="Save Changes" class="button-primary" id="settings-save" />
109
- <input type="submit" name="settings-reset" value="Reset" class="button-secondary" id="settings-reset" />
110
- <img alt="Waiting..." src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
111
  </p>
112
  </form>
113
  <script type="text/javascript">
@@ -123,7 +123,7 @@ jQuery(document).ready(function($) {
123
  });
124
 
125
  $('#settings-reset').click(function(e, el) {
126
- if ( ! confirm('Are you sure you want to reset all WordPress HTTPS settings?') ) {
127
  e.preventDefault();
128
  return false;
129
  }
12
 
13
  <table class="form-table">
14
  <tr valign="top" id="ssl_host_row">
15
+ <th scope="row"><?php _e('SSL Host','wordpress-https'); ?></th>
16
  <td>
17
  <fieldset>
18
  <label for="ssl_host" id="ssl_host_label">
19
  <input name="ssl_host" type="text" id="ssl_host" class="regular-text code" value="<?php echo $ssl_host; ?>" />
20
  </label>
21
+ <label for="ssl_port" id="ssl_port_label"><?php _e('Port','wordpress-https'); ?>
22
  <input name="ssl_port" type="text" id="ssl_port" class="small-text" value="<?php echo $this->getPlugin()->getSetting('ssl_port'); ?>" />
23
  </label>
24
  </fieldset>
25
  </td>
26
  </tr>
27
  <tr valign="top" id="ssl_admin_row">
28
+ <th scope="row"><?php _e('Force SSL Administration','wordpress-https'); ?></th>
29
  <td>
30
  <fieldset>
31
  <label for="ssl_admin">
32
  <input type="hidden" name="ssl_admin" value="0" />
33
  <input name="ssl_admin" type="checkbox" id="ssl_admin" value="1"<?php echo ((force_ssl_admin()) ? ' checked="checked" disabled="disabled" title="FORCE_SSL_ADMIN is true in wp-config.php"' : (($this->getPlugin()->getSetting('ssl_admin')) ? ' checked="checked"' : '') ); ?> />
34
+ <p class="description"><?php printf( __('Always use HTTPS while in the admin panel. This setting is identical to %s FORCE_SSL_ADMIN','wordpress-https'),'<a href="http://codex.wordpress.org/Administration_Over_SSL#Example_2" target="_blank">'); ?></a>.</p>
35
  </label>
36
  </fieldset>
37
  </td>
38
  </tr>
39
  <tr valign="top" id="exclusive_https_row">
40
+ <th scope="row"><?php _e('Force SSL Exclusively','wordpress-https'); ?></th>
41
  <td>
42
  <fieldset>
43
  <label for="exclusive_https">
44
  <input type="hidden" name="exclusive_https" value="0" />
45
  <input name="exclusive_https" type="checkbox" id="exclusive_https" value="1"<?php echo (($this->getPlugin()->getSetting('exclusive_https')) ? ' checked="checked"' : ''); ?> />
46
+ <p class="description"><?php printf( __('Any page that is not secured via %s Force SSL %s or URL Filters will be redirected to HTTP.','wordpress-https'),'<a href="' . parse_url($this->getPlugin()->getPluginUrl(), PHP_URL_PATH) . '/screenshot-2.png" class="thickbox">', '</a> '); ?></a>.</p>
47
  </label>
48
  </fieldset>
49
  </td>
50
  </tr>
51
  <tr valign="top" id="remove_unsecure_row">
52
+ <th scope="row"><?php _e('Remove Unsecure Elements','wordpress-https'); ?></th>
53
  <td>
54
  <fieldset>
55
  <label for="remove_unsecure">
56
  <input type="hidden" name="remove_unsecure" value="0" />
57
  <input name="remove_unsecure" type="checkbox" id="remove_unsecure" value="1"<?php echo (($this->getPlugin()->getSetting('remove_unsecure')) ? ' checked="checked"' : ''); ?> />
58
+ <p class="description"><?php _e('Remove elements inaccessible over HTTPS. May break other plugins\' functionality.','wordpress-https'); ?></p>
59
  </label>
60
  </fieldset>
61
  </td>
62
  </tr>
63
  <tr valign="top" id="debug_row">
64
+ <th scope="row"><?php _e('Debug Mode','wordpress-https'); ?></th>
65
  <td>
66
  <fieldset>
67
  <label for="debug">
68
  <input type="hidden" name="debug" value="0" />
69
  <input name="debug" type="checkbox" id="debug" value="1"<?php echo (($this->getPlugin()->getSetting('debug')) ? ' checked="checked"' : ''); ?> />
70
+ <p class="description"><?php _e('Outputs debug information to the browser\'s console.','wordpress-https'); ?></p>
71
  </label>
72
  </fieldset>
73
  </td>
74
  </tr>
75
  <tr valign="top" id="ssl_proxy_row">
76
+ <th scope="row"><?php _e('Proxy','wordpress-https'); ?></th>
77
  <td>
78
  <fieldset>
79
  <label for="ssl_proxy" class="label-radio">
80
+ <input type="radio" name="ssl_proxy" value="0"<?php echo ((! $this->getPlugin()->getSetting('ssl_proxy')) ? ' checked="checked"' : ''); ?>> <span><?php _e('No','wordpress-https'); ?></span>
81
+ <input type="radio" name="ssl_proxy" value="auto"<?php echo (($this->getPlugin()->getSetting('ssl_proxy') === 'auto') ? ' checked="checked"' : ''); ?>> <span><?php _e('Auto','wordpress-https'); ?></span>
82
+ <input type="radio" name="ssl_proxy" value="1"<?php echo (($this->getPlugin()->getSetting('ssl_proxy') == 1) ? ' checked="checked"' : ''); ?>> <span><?php _e('Yes','wordpress-https'); ?></span>
83
  </label>
84
+ <p class="description"><?php _e('If you think you may behind a proxy, set to Auto. Otherwise, leave the setting on No.','wordpress-https'); ?></p>
85
  </fieldset>
86
  </td>
87
  </tr>
88
  <tr valign="top" id="admin_menu_row">
89
+ <th scope="row"><?php _e('Admin Menu Location','wordpress-https'); ?></th>
90
  <td>
91
  <fieldset>
92
  <label for="admin_menu_side" class="label-radio">
93
+ <input type="radio" name="admin_menu" id="admin_menu_side" value="side"<?php echo (($this->getPlugin()->getSetting('admin_menu') === 'side') ? ' checked="checked"' : ''); ?>> <span><?php _e('Sidebar','wordpress-https'); ?></span>
94
  </label>
95
  <label for="admin_menu_settings" class="label-radio">
96
+ <input type="radio" name="admin_menu" id="admin_menu_settings" value="settings"<?php echo (($this->getPlugin()->getSetting('admin_menu') === 'settings') ? ' checked="checked"' : ''); ?>> <span><?php _e('Settings','wordpress-https'); ?></span>
97
  </label>
98
  </fieldset>
99
  </td>
105
  <input type="hidden" name="ssl_host_diff" value="<?php echo (($this->getPlugin()->getSetting('ssl_host_diff') != 1) ? 0 : 1); ?>" />
106
 
107
  <p class="button-controls">
108
+ <input type="submit" name="settings-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="settings-save" />
109
+ <input type="submit" name="settings-reset" value="<?php _e('Reset','wordpress-https'); ?>" class="button-secondary" id="settings-reset" />
110
+ <img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
111
  </p>
112
  </form>
113
  <script type="text/javascript">
123
  });
124
 
125
  $('#settings-reset').click(function(e, el) {
126
+ if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS settings?','wordpress-https'); ?>') ) {
127
  e.preventDefault();
128
  return false;
129
  }
admin/templates/network.php CHANGED
@@ -6,7 +6,7 @@ require_once('../includes/template.php'); // WordPress Dashboard Functions
6
 
7
  <div class="wrap" id="wphttps-main">
8
  <div id="icon-options-https" class="icon32"><br /></div>
9
- <h2>HTTPS</h2>
10
 
11
  <?php
12
  wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false );
6
 
7
  <div class="wrap" id="wphttps-main">
8
  <div id="icon-options-https" class="icon32"><br /></div>
9
+ <h2><?php _e('HTTPS','wordpress-https'); ?></h2>
10
 
11
  <?php
12
  wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false );
admin/templates/settings.php CHANGED
@@ -6,7 +6,7 @@ require_once('includes/template.php'); // WordPress Dashboard Functions
6
 
7
  <div class="wrap" id="wphttps-main">
8
  <div id="icon-options-https" class="icon32"><br /></div>
9
- <h2>HTTPS</h2>
10
 
11
  <?php
12
  wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false );
@@ -22,99 +22,98 @@ require_once('includes/template.php'); // WordPress Dashboard Functions
22
  </div>
23
 
24
  <div id="regex-help">
25
- <h3>Expressions</h3>
26
  <table class="regex-help">
27
  <tr>
28
  <td>[abc]</td>
29
- <td>A single character: a, b, or c</td>
30
  </tr>
31
  <tr>
32
  <td>[^abc]</td>
33
- <td>Any single character <em>but</em> a, b, or c</td>
34
  </tr>
35
  <tr>
36
  <td>[a-z]</td>
37
- <td>Any character in the range a-z</td>
38
  </tr>
39
  <tr>
40
  <td>[a-zA-Z]</td>
41
- <td>Any character in the range a-z or A-Z (any alphabetical character)</td>
42
  </tr>
43
  <tr>
44
  <td>\s</td>
45
- <td>Any whitespace character [ \t\n\r\f\v]</td>
46
  </tr>
47
  <tr>
48
  <td>\S</td>
49
- <td>Any non-whitespace character [^ \t\n\r\f\v]</td>
50
  </tr>
51
  <tr>
52
  <td>\d</td>
53
- <td>Any digit [0-9]</td>
54
  </tr>
55
  <tr>
56
  <td>\D</td>
57
- <td>Any non-digit [^0-9]</td>
58
  </tr>
59
  <tr>
60
  <td>\w</td>
61
- <td>Any word character [a-zA-Z0-9_]</td>
62
  </tr>
63
  <tr>
64
  <td>\W</td>
65
- <td>Any non-word character [^a-zA-Z0-9_]</td>
66
  </tr>
67
  <tr>
68
  <td>\b</td>
69
- <td>A word boundary between \w and \W</td>
70
  </tr>
71
  <tr>
72
  <td>\B</td>
73
- <td>A position that is not a word boundary</td>
74
  </tr>
75
  <tr>
76
  <td>|</td>
77
- <td>Alternation: matches either the subexpression to the left or to the right</td>
78
  </tr>
79
  <tr>
80
  <td>()</td>
81
- <td>Grouping: group all together for repetition operators</td>
82
  </tr>
83
  <tr>
84
  <td>^</td>
85
- <td>Beginning of the string</td>
86
  </tr>
87
  <tr>
88
  <td>$</td>
89
- <td>End of the string</td>
90
  </tr>
91
  </table>
92
- <h3>Repetition&#160;Operators</h3>
93
  <table class="regex-help">
94
  <tr>
95
  <td>{n,m}</td>
96
- <td>Match the previous item at least <em>n</em> times but no more than <em>m</em>
97
- times</td>
98
  </tr>
99
  <tr>
100
  <td>{n,}</td>
101
- <td>Match the previous item <em>n</em> or more times</td>
102
  </tr>
103
  <tr>
104
  <td>{n}</td>
105
- <td>Match exactly <em>n</em> occurrences of the previous item</td>
106
  </tr>
107
  <tr>
108
  <td>?</td>
109
- <td>Match 0 or 1 occurrences of the previous item {0,1}</td>
110
  </tr>
111
  <tr>
112
  <td>+</td>
113
- <td>Match 1 or more occurrences of the previous item {1,}</td>
114
  </tr>
115
  <tr>
116
  <td>*</td>
117
- <td>Match 0 or more occurrences of the previous item {0,}</td>
118
  </tr>
119
  </table>
120
  </div>
6
 
7
  <div class="wrap" id="wphttps-main">
8
  <div id="icon-options-https" class="icon32"><br /></div>
9
+ <h2><?php _e('HTTPS','wordpress-https'); ?></h2>
10
 
11
  <?php
12
  wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false );
22
  </div>
23
 
24
  <div id="regex-help">
25
+ <h3><?php _e('Expressions','wordpress-https'); ?></h3>
26
  <table class="regex-help">
27
  <tr>
28
  <td>[abc]</td>
29
+ <td><?php _e('A single character: a, b, or c','wordpress-https'); ?></td>
30
  </tr>
31
  <tr>
32
  <td>[^abc]</td>
33
+ <td><?php _e('Any single character <em>but</em> a, b, or c','wordpress-https'); ?></td>
34
  </tr>
35
  <tr>
36
  <td>[a-z]</td>
37
+ <td><?php _e('Any character in the range a-z','wordpress-https'); ?></td>
38
  </tr>
39
  <tr>
40
  <td>[a-zA-Z]</td>
41
+ <td><?php _e('Any character in the range a-z or A-Z (any alphabetical character)','wordpress-https'); ?></td>
42
  </tr>
43
  <tr>
44
  <td>\s</td>
45
+ <td><?php _e('Any whitespace character [ \t\n\r\f\v]','wordpress-https'); ?></td>
46
  </tr>
47
  <tr>
48
  <td>\S</td>
49
+ <td><?php _e('Any non-whitespace character [^ \t\n\r\f\v]','wordpress-https'); ?></td>
50
  </tr>
51
  <tr>
52
  <td>\d</td>
53
+ <td><?php _e('Any digit [0-9]','wordpress-https'); ?></td>
54
  </tr>
55
  <tr>
56
  <td>\D</td>
57
+ <td><?php _e('Any non-digit [^0-9]','wordpress-https'); ?></td>
58
  </tr>
59
  <tr>
60
  <td>\w</td>
61
+ <td><?php _e('Any word character [a-zA-Z0-9_]','wordpress-https'); ?></td>
62
  </tr>
63
  <tr>
64
  <td>\W</td>
65
+ <td><?php _e('Any non-word character [^a-zA-Z0-9_]','wordpress-https'); ?></td>
66
  </tr>
67
  <tr>
68
  <td>\b</td>
69
+ <td><?php _e('A word boundary between \w and \W','wordpress-https'); ?></td>
70
  </tr>
71
  <tr>
72
  <td>\B</td>
73
+ <td><?php _e('A position that is not a word boundary','wordpress-https'); ?></td>
74
  </tr>
75
  <tr>
76
  <td>|</td>
77
+ <td><?php _e('Alternation: matches either the subexpression to the left or to the right','wordpress-https'); ?></td>
78
  </tr>
79
  <tr>
80
  <td>()</td>
81
+ <td><?php _e('Grouping: group all together for repetition operators','wordpress-https'); ?></td>
82
  </tr>
83
  <tr>
84
  <td>^</td>
85
+ <td><?php _e('Beginning of the string','wordpress-https'); ?></td>
86
  </tr>
87
  <tr>
88
  <td>$</td>
89
+ <td><?php _e('End of the string','wordpress-https'); ?></td>
90
  </tr>
91
  </table>
92
+ <h3><?php _e('Repetition&#160;Operators','wordpress-https'); ?></h3>
93
  <table class="regex-help">
94
  <tr>
95
  <td>{n,m}</td>
96
+ <td><?php _e('Match the previous item at least <em>n</em> times but no more than <em>m</em> times','wordpress-https'); ?></td>
 
97
  </tr>
98
  <tr>
99
  <td>{n,}</td>
100
+ <td><?php _e('Match the previous item <em>n</em> or more times','wordpress-https'); ?></td>
101
  </tr>
102
  <tr>
103
  <td>{n}</td>
104
+ <td><?php _e('Match exactly <em>n</em> occurrences of the previous item','wordpress-https'); ?></td>
105
  </tr>
106
  <tr>
107
  <td>?</td>
108
+ <td><?php _e('Match 0 or 1 occurrences of the previous item {0,1}','wordpress-https'); ?></td>
109
  </tr>
110
  <tr>
111
  <td>+</td>
112
+ <td><?php _e('Match 1 or more occurrences of the previous item {1,}','wordpress-https'); ?></td>
113
  </tr>
114
  <tr>
115
  <td>*</td>
116
+ <td><?php _e('Match 0 or more occurrences of the previous item {0,}','wordpress-https'); ?></td>
117
  </tr>
118
  </table>
119
  </div>
languages/wordpress-https-de_DE.mo ADDED
Binary file
languages/wordpress-https-de_DE.po ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of WordPress HTTPS in German
2
+ # This file is distributed under the same license as the WordPress HTTPS package.
3
+ msgid ""
4
+ msgstr ""
5
+ "PO-Revision-Date: 2012-12-18 11:26:32+0000\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
10
+ "X-Generator: GlotPress/0.1\n"
11
+ "Project-Id-Version: WordPress HTTPS\n"
12
+
13
+ #: admin/templates/metabox/network.php:9
14
+ msgid "Force SSL Admin"
15
+ msgstr "Force SSL Admin"
16
+
17
+ #: admin/templates/metabox/post.php:24
18
+ msgid "This post's parent page ' %s ' has 'Secure child posts' enabled."
19
+ msgstr "Die übergeordnete Seite dieses Artikels ' %s ' hat 'Sichere Unter-Artikel' aktiviert."
20
+
21
+ #: wordpress-https.php:5
22
+ msgid "WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites."
23
+ msgstr "WordPress HTTPS ist eine All-in-One Lösung für SSL auf WordPress Seiten"
24
+
25
+ #: admin/templates/metabox/network.php:7
26
+ msgid "Blog"
27
+ msgstr "Seite"
28
+
29
+ #: admin/templates/network.php:9 admin/templates/settings.php:9
30
+ #: lib/WordPressHTTPS/Module/Post.php:42
31
+ msgid "HTTPS"
32
+ msgstr "HTTPS"
33
+
34
+ #: lib/WordPressHTTPS/Module/Settings.php:61
35
+ msgid "General Settings"
36
+ msgstr "Allgemeine Einstellungen"
37
+
38
+ #: lib/WordPressHTTPS/Module/Settings.php:70
39
+ msgid "Developer Updates"
40
+ msgstr "Entwickler-Updates"
41
+
42
+ #: lib/WordPressHTTPS/Module/Settings.php:88
43
+ msgid "Feedback"
44
+ msgstr "Feedback"
45
+
46
+ #: lib/WordPressHTTPS/Module/UrlFilters.php:63
47
+ msgid "URL Filters"
48
+ msgstr "URL Filter"
49
+
50
+ #: admin/templates/settings.php:96
51
+ msgid "Match the previous item at least <em>n</em> times but no more than <em>m</em> times"
52
+ msgstr "Entspricht einer Häufigkeit von mindestens <em>n</em> aber nicht mehr als <em>m</em>"
53
+
54
+ #: admin/templates/settings.php:100
55
+ msgid "Match the previous item <em>n</em> or more times"
56
+ msgstr "Entspricht einer Häufigkeit von <em>n</em> oder mehr"
57
+
58
+ #: admin/templates/settings.php:104
59
+ msgid "Match exactly <em>n</em> occurrences of the previous item"
60
+ msgstr "Entspricht einer Häufigkeit von genau <em>n</em> des vorherigen Elements"
61
+
62
+ #: admin/templates/settings.php:108
63
+ msgid "Match 0 or 1 occurrences of the previous item {0,1}"
64
+ msgstr "Entspricht einer Häufigkeit von 0 oder 1 des vorherigen Elements {0,1} "
65
+
66
+ #: admin/templates/settings.php:112
67
+ msgid "Match 1 or more occurrences of the previous item {1,}"
68
+ msgstr "Entspricht einer Häufigkeit von 1 oder mehr des vorherigen Elements {1,}"
69
+
70
+ #: admin/templates/settings.php:116
71
+ msgid "Match 0 or more occurrences of the previous item {0,}"
72
+ msgstr "Entspricht einer Häufigkeit von 0 oder mehr des vorherigen Elements {0,} "
73
+
74
+ #: lib/WordPressHTTPS/Module/Settings.php:79
75
+ msgid "Support"
76
+ msgstr "Support"
77
+
78
+ #: lib/WordPressHTTPS/Module/Settings.php:97
79
+ msgid "Donate"
80
+ msgstr "Spende"
81
+
82
+ #: lib/WordPressHTTPS/Module/DomainMapping.php:61
83
+ msgid "Domain Mapping"
84
+ msgstr "Domain Mapping"
85
+
86
+ #: lib/WordPressHTTPS/Module/Network.php:61
87
+ msgid "Network Settings"
88
+ msgstr "Netzwerk-Einstellungen"
89
+
90
+ #: lib/WordPressHTTPS/Module/Network.php:70
91
+ #: lib/WordPressHTTPS/Module/Settings.php:106
92
+ msgid "Loading..."
93
+ msgstr "Lade..."
94
+
95
+ #: lib/WordPressHTTPS/Module/Network.php:87
96
+ #: lib/WordPressHTTPS/Module/Settings.php:123
97
+ msgid "You do not have sufficient permissions to access this page."
98
+ msgstr "Sie haben keine Berechtigung diese Seite anzuzeigen."
99
+
100
+ #: admin/templates/settings.php:25
101
+ msgid "Expressions"
102
+ msgstr "Ausdrücke"
103
+
104
+ #: admin/templates/settings.php:29
105
+ msgid "A single character: a, b, or c"
106
+ msgstr "Jedes einzelne Zeichen: a, b, oder c "
107
+
108
+ #: admin/templates/settings.php:33
109
+ msgid "Any single character <em>but</em> a, b, or c"
110
+ msgstr "Jedes einzelne Zeichen <em>außer</em> a, b, oder c"
111
+
112
+ #: admin/templates/settings.php:37
113
+ msgid "Any character in the range a-z"
114
+ msgstr "Jedes Zeichen im Bereich a-z"
115
+
116
+ #: admin/templates/settings.php:41
117
+ msgid "Any character in the range a-z or A-Z (any alphabetical character)"
118
+ msgstr "Jedes Zeichen im Bereich a-z oder A-Z (alle alphabetischen Zeichen)"
119
+
120
+ #: admin/templates/settings.php:45
121
+ msgid "Any whitespace character [ \\t\\n\\r\\f\\v]"
122
+ msgstr "Jedes Leerzeichen [ \\t\\n\\r\\f\\v]"
123
+
124
+ #: admin/templates/settings.php:49
125
+ msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]"
126
+ msgstr "Jedes Nicht-Leerzeichen [^ \\t\\n\\r\\f\\v]"
127
+
128
+ #: admin/templates/settings.php:53
129
+ msgid "Any digit [0-9]"
130
+ msgstr "Jede Ziffer [0-9]"
131
+
132
+ #: admin/templates/settings.php:57
133
+ msgid "Any non-digit [^0-9]"
134
+ msgstr "Jede Nicht-Ziffer [^0-9]"
135
+
136
+ #: admin/templates/settings.php:61
137
+ msgid "Any word character [a-zA-Z0-9_]"
138
+ msgstr "Jedes Wort-Zeichen [a-zA-Z0-9_]"
139
+
140
+ #: admin/templates/settings.php:65
141
+ msgid "Any non-word character [^a-zA-Z0-9_]"
142
+ msgstr "Jedes Nicht-Wort-Zeichen [^a-zA-Z0-9_]"
143
+
144
+ #: admin/templates/settings.php:69
145
+ msgid "A word boundary between \\w and \\W"
146
+ msgstr "Eine Wortgrenze zwischen \\w und \\W"
147
+
148
+ #: admin/templates/settings.php:73
149
+ msgid "A position that is not a word boundary"
150
+ msgstr "Eine Position, die keine Wortgrenze ist"
151
+
152
+ #: admin/templates/settings.php:77
153
+ msgid "Alternation: matches either the subexpression to the left or to the right"
154
+ msgstr "Wechsel: Entspricht entweder des Unter-Ausdrucks zur Linken oder zur Rechten"
155
+
156
+ #: admin/templates/settings.php:81
157
+ msgid "Grouping: group all together for repetition operators"
158
+ msgstr "Bündelung: Gruppiere alle für Wiederholungsoperatoren"
159
+
160
+ #: admin/templates/settings.php:85
161
+ msgid "Beginning of the string"
162
+ msgstr "Anfang des Strings"
163
+
164
+ #: admin/templates/settings.php:89
165
+ msgid "End of the string"
166
+ msgstr "Ende des Strings"
167
+
168
+ #: admin/templates/settings.php:92
169
+ msgid "Repetition&#160;Operators"
170
+ msgstr "Wiederholungs&#160;Operatoren"
171
+
172
+ #: admin/templates/metabox/settings.php:21
173
+ msgid "Port"
174
+ msgstr "Port"
175
+
176
+ #: admin/templates/metabox/settings.php:28
177
+ msgid "Force SSL Administration"
178
+ msgstr "Force SSL Administration"
179
+
180
+ #: admin/templates/metabox/settings.php:34
181
+ msgid "Always use HTTPS while in the admin panel. This setting is identical to %s FORCE_SSL_ADMIN"
182
+ msgstr "Nutze immer HTTPS für den Admin-Bereich. Diese Einstellung ist identisch mit %s FORCE_SSL_ADMIN"
183
+
184
+ #: admin/templates/metabox/network.php:10
185
+ #: admin/templates/metabox/settings.php:40
186
+ msgid "Force SSL Exclusively"
187
+ msgstr "Force SSL Exklusiv"
188
+
189
+ #: admin/templates/metabox/settings.php:46
190
+ msgid "Any page that is not secured via %s Force SSL %s or URL Filters will be redirected to HTTP."
191
+ msgstr "Alle Seiten, die nicht durch %s Force SSL %s oder URL Filter gesichert werden, werde auf HTTP umgeleitet."
192
+
193
+ #: admin/templates/metabox/network.php:11
194
+ #: admin/templates/metabox/settings.php:52
195
+ msgid "Remove Unsecure Elements"
196
+ msgstr "Unsichere Elemente entfernen"
197
+
198
+ #: admin/templates/metabox/settings.php:58
199
+ msgid "Remove elements inaccessible over HTTPS. May break other plugins' functionality."
200
+ msgstr "Entferne alle Elemente unerreichbar über HTTPS. Könnte Funktionen anderer Plugins beeinträchtigen."
201
+
202
+ #: admin/templates/metabox/network.php:12
203
+ #: admin/templates/metabox/settings.php:64
204
+ msgid "Debug Mode"
205
+ msgstr "Debug Mode"
206
+
207
+ #: admin/templates/metabox/settings.php:70
208
+ msgid "Outputs debug information to the browser's console."
209
+ msgstr "Gibt Debug-Informationen in der Konsole des Browsers aus."
210
+
211
+ #: admin/templates/metabox/network.php:13
212
+ #: admin/templates/metabox/settings.php:76
213
+ msgid "Proxy"
214
+ msgstr "Proxy"
215
+
216
+ #: admin/templates/metabox/network.php:35
217
+ #: admin/templates/metabox/network.php:67
218
+ #: admin/templates/metabox/settings.php:80
219
+ msgid "No"
220
+ msgstr "Nein"
221
+
222
+ #: admin/templates/metabox/network.php:36
223
+ #: admin/templates/metabox/network.php:68
224
+ #: admin/templates/metabox/settings.php:81
225
+ msgid "Auto"
226
+ msgstr "Auto"
227
+
228
+ #: admin/templates/metabox/network.php:37
229
+ #: admin/templates/metabox/network.php:69
230
+ #: admin/templates/metabox/settings.php:82
231
+ msgid "Yes"
232
+ msgstr "Ja"
233
+
234
+ #: admin/templates/metabox/settings.php:84
235
+ msgid "If you think you may behind a proxy, set to Auto. Otherwise, leave the setting on No."
236
+ msgstr "Wenn Sie denken, dass Sie sich hinter einem Proxy befinden, wählen Sie Auto. Ansonsten lassen Sie es auf Nein."
237
+
238
+ #: admin/templates/metabox/network.php:14
239
+ #: admin/templates/metabox/settings.php:89
240
+ msgid "Admin Menu Location"
241
+ msgstr "Position des Admin-Menüs"
242
+
243
+ #: admin/templates/metabox/network.php:42
244
+ #: admin/templates/metabox/network.php:74
245
+ #: admin/templates/metabox/settings.php:93
246
+ msgid "Sidebar"
247
+ msgstr ""
248
+
249
+ #: admin/templates/metabox/network.php:43
250
+ #: admin/templates/metabox/network.php:75
251
+ #: admin/templates/metabox/settings.php:96
252
+ msgid "Settings"
253
+ msgstr "Einstellungen"
254
+
255
+ #: admin/templates/metabox/settings.php:126
256
+ msgid "Are you sure you want to reset all WordPress HTTPS settings?"
257
+ msgstr "Sind Sie sicher, dass Sie alle WordPress HTTPS Einstellungen zurücksetzen wollen?"
258
+
259
+ #: admin/templates/metabox/domain_mapping.php:4
260
+ #: admin/templates/metabox/filters.php:7
261
+ msgid "Regular Expressions Help"
262
+ msgstr "Hilfe zu Regulären Ausdrücken"
263
+
264
+ #: admin/templates/metabox/domain_mapping.php:30
265
+ #: admin/templates/metabox/domain_mapping.php:53
266
+ msgid "Remove URL Filter"
267
+ msgstr "URL Filter entfernen"
268
+
269
+ #: admin/templates/metabox/domain_mapping.php:30
270
+ #: admin/templates/metabox/domain_mapping.php:53
271
+ msgid "Remove"
272
+ msgstr "Entfernen"
273
+
274
+ #: admin/templates/metabox/domain_mapping.php:31
275
+ #: admin/templates/metabox/domain_mapping.php:54
276
+ msgid "Add URL Filter"
277
+ msgstr "URL Filter hinzufügen"
278
+
279
+ #: admin/templates/metabox/domain_mapping.php:31
280
+ #: admin/templates/metabox/domain_mapping.php:54
281
+ msgid "Add"
282
+ msgstr "Hinzufügen"
283
+
284
+ #: admin/templates/metabox/domain_mapping.php:111
285
+ msgid "Are you sure you want to reset all WordPress HTTPS domain mappings?"
286
+ msgstr "Sind Sie sicher, dass du alle WordPress HTTPS domain mappings zurücksetzen willst?"
287
+
288
+ #: admin/templates/metabox/filters.php:6
289
+ msgid "Secure Filters"
290
+ msgstr "Sicherheits-Filter"
291
+
292
+ #: admin/templates/metabox/filters.php:7
293
+ msgid "Example: If you have an E-commerce shop and all of the URL's begin with /store/, you could secure all store links by entering '/store/' on one line. You may use %s regular expressions %s"
294
+ msgstr "Beispiel: Sollten Sie einen E-Commerce Shop betreiben und alle URLs beginnen mit /store/, können Sie alle Links zum Shop durch die Eingabe von '/store/' in einer Zeile sichern. Sie können auch %s Reguläre Ausdrücke %s nutzen"
295
+
296
+ #: admin/templates/metabox/domain_mapping.php:62
297
+ #: admin/templates/metabox/filters.php:16
298
+ #: admin/templates/metabox/network.php:86
299
+ #: admin/templates/metabox/settings.php:108
300
+ msgid "Save Changes"
301
+ msgstr "Änderungen speichern"
302
+
303
+ #: admin/templates/metabox/domain_mapping.php:63
304
+ #: admin/templates/metabox/filters.php:17
305
+ #: admin/templates/metabox/settings.php:109
306
+ msgid "Reset"
307
+ msgstr "Reset"
308
+
309
+ #: admin/templates/metabox/filters.php:18
310
+ #: admin/templates/metabox/network.php:87
311
+ #: admin/templates/metabox/settings.php:110
312
+ msgid "Waiting..."
313
+ msgstr "Warte..."
314
+
315
+ #: admin/templates/metabox/filters.php:35
316
+ msgid "Are you sure you want to reset all WordPress HTTPS filters?"
317
+ msgstr "Sind Sie sicher, dass Sie alle WordPress HTTPS Filter zurücksetzen wollen?"
318
+
319
+ #: admin/templates/metabox/post.php:24
320
+ msgid "Secure post"
321
+ msgstr "Sicherer Artikel"
322
+
323
+ #: admin/templates/metabox/post.php:27
324
+ msgid "Secure child posts"
325
+ msgstr "Sichere Unter-Artikel"
326
+
327
+ #: admin/templates/metabox/network.php:8
328
+ #: admin/templates/metabox/settings.php:15
329
+ msgid "SSL Host"
330
+ msgstr "SSL Host"
331
+
332
+ #: admin/templates/metabox/domain_mapping.php:4
333
+ msgid "Domain mapping allows you to map external domains that host their HTTPS content on a different domain. You may use %s regular expressions %s"
334
+ msgstr "Domain Mapping erlaubt es externe Domains auf deren HTTPS Domains umzuleiten. Sie können auch %s Reguläre Ausdrücke %s nutzen"
languages/wordpress-https.pot ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2012
2
+ # This file is distributed under the same license as the package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: \n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp\n"
7
+ "POT-Creation-Date: 2012-12-18 09:24:12+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: 2012-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: wordpress-https.php:5
16
+ msgid "WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites."
17
+ msgstr ""
18
+
19
+ #: admin/templates/metabox/domain_mapping.php:4
20
+ msgid ""
21
+ "Domain mapping allows you to map external domains that host their HTTPS "
22
+ "content on a different domain. You may use %s regular expressions %s"
23
+ msgstr ""
24
+
25
+ #: admin/templates/metabox/domain_mapping.php:4
26
+ #: admin/templates/metabox/filters.php:7
27
+ msgid "Regular Expressions Help"
28
+ msgstr ""
29
+
30
+ #: admin/templates/metabox/domain_mapping.php:30
31
+ #: admin/templates/metabox/domain_mapping.php:53
32
+ msgid "Remove URL Filter"
33
+ msgstr ""
34
+
35
+ #: admin/templates/metabox/domain_mapping.php:30
36
+ #: admin/templates/metabox/domain_mapping.php:53
37
+ msgid "Remove"
38
+ msgstr ""
39
+
40
+ #: admin/templates/metabox/domain_mapping.php:31
41
+ #: admin/templates/metabox/domain_mapping.php:54
42
+ msgid "Add URL Filter"
43
+ msgstr ""
44
+
45
+ #: admin/templates/metabox/domain_mapping.php:31
46
+ #: admin/templates/metabox/domain_mapping.php:54
47
+ msgid "Add"
48
+ msgstr ""
49
+
50
+ #: admin/templates/metabox/domain_mapping.php:62
51
+ #: admin/templates/metabox/filters.php:16
52
+ #: admin/templates/metabox/network.php:86
53
+ #: admin/templates/metabox/settings.php:108
54
+ msgid "Save Changes"
55
+ msgstr ""
56
+
57
+ #: admin/templates/metabox/domain_mapping.php:63
58
+ #: admin/templates/metabox/filters.php:17
59
+ #: admin/templates/metabox/settings.php:109
60
+ msgid "Reset"
61
+ msgstr ""
62
+
63
+ #: admin/templates/metabox/domain_mapping.php:111
64
+ msgid "Are you sure you want to reset all WordPress HTTPS domain mappings?"
65
+ msgstr ""
66
+
67
+ #: admin/templates/metabox/filters.php:6
68
+ msgid "Secure Filters"
69
+ msgstr ""
70
+
71
+ #: admin/templates/metabox/filters.php:7
72
+ msgid ""
73
+ "Example: If you have an E-commerce shop and all of the URL's begin with /"
74
+ "store/, you could secure all store links by entering '/store/' on one line. "
75
+ "You may use %s regular expressions %s"
76
+ msgstr ""
77
+
78
+ #: admin/templates/metabox/filters.php:18
79
+ #: admin/templates/metabox/network.php:87
80
+ #: admin/templates/metabox/settings.php:110
81
+ msgid "Waiting..."
82
+ msgstr ""
83
+
84
+ #: admin/templates/metabox/filters.php:35
85
+ msgid "Are you sure you want to reset all WordPress HTTPS filters?"
86
+ msgstr ""
87
+
88
+ #: admin/templates/metabox/network.php:7
89
+ msgid "Blog"
90
+ msgstr ""
91
+
92
+ #: admin/templates/metabox/network.php:8
93
+ #: admin/templates/metabox/settings.php:15
94
+ msgid "SSL Host"
95
+ msgstr ""
96
+
97
+ #: admin/templates/metabox/network.php:9
98
+ msgid "Force SSL Admin"
99
+ msgstr ""
100
+
101
+ #: admin/templates/metabox/network.php:10
102
+ #: admin/templates/metabox/settings.php:40
103
+ msgid "Force SSL Exclusively"
104
+ msgstr ""
105
+
106
+ #: admin/templates/metabox/network.php:11
107
+ #: admin/templates/metabox/settings.php:52
108
+ msgid "Remove Unsecure Elements"
109
+ msgstr ""
110
+
111
+ #: admin/templates/metabox/network.php:12
112
+ #: admin/templates/metabox/settings.php:64
113
+ msgid "Debug Mode"
114
+ msgstr ""
115
+
116
+ #: admin/templates/metabox/network.php:13
117
+ #: admin/templates/metabox/settings.php:76
118
+ msgid "Proxy"
119
+ msgstr ""
120
+
121
+ #: admin/templates/metabox/network.php:14
122
+ #: admin/templates/metabox/settings.php:89
123
+ msgid "Admin Menu Location"
124
+ msgstr ""
125
+
126
+ #: admin/templates/metabox/network.php:35
127
+ #: admin/templates/metabox/network.php:67
128
+ #: admin/templates/metabox/settings.php:80
129
+ msgid "No"
130
+ msgstr ""
131
+
132
+ #: admin/templates/metabox/network.php:36
133
+ #: admin/templates/metabox/network.php:68
134
+ #: admin/templates/metabox/settings.php:81
135
+ msgid "Auto"
136
+ msgstr ""
137
+
138
+ #: admin/templates/metabox/network.php:37
139
+ #: admin/templates/metabox/network.php:69
140
+ #: admin/templates/metabox/settings.php:82
141
+ msgid "Yes"
142
+ msgstr ""
143
+
144
+ #: admin/templates/metabox/network.php:42
145
+ #: admin/templates/metabox/network.php:74
146
+ #: admin/templates/metabox/settings.php:93
147
+ msgid "Sidebar"
148
+ msgstr ""
149
+
150
+ #: admin/templates/metabox/network.php:43
151
+ #: admin/templates/metabox/network.php:75
152
+ #: admin/templates/metabox/settings.php:96
153
+ msgid "Settings"
154
+ msgstr ""
155
+
156
+ #: admin/templates/metabox/post.php:24
157
+ msgid "This post's parent page ' %s ' has 'Secure child posts' enabled."
158
+ msgstr ""
159
+
160
+ #: admin/templates/metabox/post.php:24
161
+ msgid "Secure post"
162
+ msgstr ""
163
+
164
+ #: admin/templates/metabox/post.php:27
165
+ msgid "Secure child posts"
166
+ msgstr ""
167
+
168
+ #: admin/templates/metabox/settings.php:21
169
+ msgid "Port"
170
+ msgstr ""
171
+
172
+ #: admin/templates/metabox/settings.php:28
173
+ msgid "Force SSL Administration"
174
+ msgstr ""
175
+
176
+ #: admin/templates/metabox/settings.php:34
177
+ msgid ""
178
+ "Always use HTTPS while in the admin panel. This setting is identical to %s "
179
+ "FORCE_SSL_ADMIN"
180
+ msgstr ""
181
+
182
+ #: admin/templates/metabox/settings.php:46
183
+ msgid ""
184
+ "Any page that is not secured via %s Force SSL %s or URL Filters will be "
185
+ "redirected to HTTP."
186
+ msgstr ""
187
+
188
+ #: admin/templates/metabox/settings.php:58
189
+ msgid ""
190
+ "Remove elements inaccessible over HTTPS. May break other plugins' "
191
+ "functionality."
192
+ msgstr ""
193
+
194
+ #: admin/templates/metabox/settings.php:70
195
+ msgid "Outputs debug information to the browser's console."
196
+ msgstr ""
197
+
198
+ #: admin/templates/metabox/settings.php:84
199
+ msgid ""
200
+ "If you think you may behind a proxy, set to Auto. Otherwise, leave the "
201
+ "setting on No."
202
+ msgstr ""
203
+
204
+ #: admin/templates/metabox/settings.php:126
205
+ msgid "Are you sure you want to reset all WordPress HTTPS settings?"
206
+ msgstr ""
207
+
208
+ #: admin/templates/network.php:9 admin/templates/settings.php:9
209
+ #: lib/WordPressHTTPS/Module/Post.php:42
210
+ msgid "HTTPS"
211
+ msgstr ""
212
+
213
+ #: admin/templates/settings.php:25
214
+ msgid "Expressions"
215
+ msgstr ""
216
+
217
+ #: admin/templates/settings.php:29
218
+ msgid "A single character: a, b, or c"
219
+ msgstr ""
220
+
221
+ #: admin/templates/settings.php:33
222
+ msgid "Any single character <em>but</em> a, b, or c"
223
+ msgstr ""
224
+
225
+ #: admin/templates/settings.php:37
226
+ msgid "Any character in the range a-z"
227
+ msgstr ""
228
+
229
+ #: admin/templates/settings.php:41
230
+ msgid "Any character in the range a-z or A-Z (any alphabetical character)"
231
+ msgstr ""
232
+
233
+ #: admin/templates/settings.php:45
234
+ msgid "Any whitespace character [ \\t\\n\\r\\f\\v]"
235
+ msgstr ""
236
+
237
+ #: admin/templates/settings.php:49
238
+ msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]"
239
+ msgstr ""
240
+
241
+ #: admin/templates/settings.php:53
242
+ msgid "Any digit [0-9]"
243
+ msgstr ""
244
+
245
+ #: admin/templates/settings.php:57
246
+ msgid "Any non-digit [^0-9]"
247
+ msgstr ""
248
+
249
+ #: admin/templates/settings.php:61
250
+ msgid "Any word character [a-zA-Z0-9_]"
251
+ msgstr ""
252
+
253
+ #: admin/templates/settings.php:65
254
+ msgid "Any non-word character [^a-zA-Z0-9_]"
255
+ msgstr ""
256
+
257
+ #: admin/templates/settings.php:69
258
+ msgid "A word boundary between \\w and \\W"
259
+ msgstr ""
260
+
261
+ #: admin/templates/settings.php:73
262
+ msgid "A position that is not a word boundary"
263
+ msgstr ""
264
+
265
+ #: admin/templates/settings.php:77
266
+ msgid ""
267
+ "Alternation: matches either the subexpression to the left or to the right"
268
+ msgstr ""
269
+
270
+ #: admin/templates/settings.php:81
271
+ msgid "Grouping: group all together for repetition operators"
272
+ msgstr ""
273
+
274
+ #: admin/templates/settings.php:85
275
+ msgid "Beginning of the string"
276
+ msgstr ""
277
+
278
+ #: admin/templates/settings.php:89
279
+ msgid "End of the string"
280
+ msgstr ""
281
+
282
+ #: admin/templates/settings.php:92
283
+ msgid "Repetition&#160;Operators"
284
+ msgstr ""
285
+
286
+ #: admin/templates/settings.php:96
287
+ msgid ""
288
+ "Match the previous item at least <em>n</em> times but no more than <em>m</"
289
+ "em> times"
290
+ msgstr ""
291
+
292
+ #: admin/templates/settings.php:100
293
+ msgid "Match the previous item <em>n</em> or more times"
294
+ msgstr ""
295
+
296
+ #: admin/templates/settings.php:104
297
+ msgid "Match exactly <em>n</em> occurrences of the previous item"
298
+ msgstr ""
299
+
300
+ #: admin/templates/settings.php:108
301
+ msgid "Match 0 or 1 occurrences of the previous item {0,1}"
302
+ msgstr ""
303
+
304
+ #: admin/templates/settings.php:112
305
+ msgid "Match 1 or more occurrences of the previous item {1,}"
306
+ msgstr ""
307
+
308
+ #: admin/templates/settings.php:116
309
+ msgid "Match 0 or more occurrences of the previous item {0,}"
310
+ msgstr ""
311
+
312
+ #: lib/WordPressHTTPS/Module/DomainMapping.php:61
313
+ msgid "Domain Mapping"
314
+ msgstr ""
315
+
316
+ #: lib/WordPressHTTPS/Module/Network.php:61
317
+ msgid "Network Settings"
318
+ msgstr ""
319
+
320
+ #: lib/WordPressHTTPS/Module/Network.php:70
321
+ #: lib/WordPressHTTPS/Module/Settings.php:106
322
+ msgid "Loading..."
323
+ msgstr ""
324
+
325
+ #: lib/WordPressHTTPS/Module/Network.php:87
326
+ #: lib/WordPressHTTPS/Module/Settings.php:123
327
+ msgid "You do not have sufficient permissions to access this page."
328
+ msgstr ""
329
+
330
+ #: lib/WordPressHTTPS/Module/Settings.php:61
331
+ msgid "General Settings"
332
+ msgstr ""
333
+
334
+ #: lib/WordPressHTTPS/Module/Settings.php:70
335
+ msgid "Developer Updates"
336
+ msgstr ""
337
+
338
+ #: lib/WordPressHTTPS/Module/Settings.php:79
339
+ msgid "Support"
340
+ msgstr ""
341
+
342
+ #: lib/WordPressHTTPS/Module/Settings.php:88
343
+ msgid "Feedback"
344
+ msgstr ""
345
+
346
+ #: lib/WordPressHTTPS/Module/Settings.php:97
347
+ msgid "Donate"
348
+ msgstr ""
349
+
350
+ #: lib/WordPressHTTPS/Module/UrlFilters.php:63
351
+ msgid "URL Filters"
352
+ msgstr ""
lib/Mvied/README.md DELETED
@@ -1,9 +0,0 @@
1
- Mvied
2
- =============
3
-
4
- This library was created by Mvied for quickly creating Plugins and Themes with WordPress.
5
-
6
- Tutorial
7
- -------
8
-
9
- You can find an example plugin using this library at https://github.com/Mvied/mvied-example-plugin
 
 
 
 
 
 
 
 
 
lib/WordPressHTTPS.php CHANGED
@@ -1,423 +1,425 @@
1
- <?php
2
- /**
3
- * WordPress HTTPS
4
- *
5
- * @author Mike Ems
6
- * @package WordPressHTTPS
7
- *
8
- */
9
-
10
- class WordPressHTTPS extends Mvied_Plugin {
11
-
12
- /**
13
- * HTTP URL
14
- *
15
- * @var WordPressHTTPS_Url
16
- */
17
- protected $_http_url;
18
-
19
- /**
20
- * HTTPS URL
21
- *
22
- * @var WordPressHTTPS_Url
23
- */
24
- protected $_https_url;
25
-
26
- /**
27
- * Plugin Settings
28
- *
29
- * setting_name => default_value
30
- *
31
- * @var array
32
- */
33
- protected $_settings = array(
34
- 'ssl_host' => '', // Hostname for SSL Host
35
- 'ssl_port' => '', // Port number for SSL Host
36
- 'secure_external_urls' => array(), // Secure external URL's
37
- 'unsecure_external_urls' => array(), // Unsecure external URL's
38
- 'ssl_host_diff' => 0, // Is SSL Host different than WordPress host
39
- 'ssl_host_subdomain' => 0, // Is SSL Host a subdomain of WordPress host
40
- 'exclusive_https' => 0, // Redirect pages that are not secured to HTTP
41
- 'remove_unsecure' => 0, // Remove unsecure elements from HTML
42
- 'ssl_admin' => 0, // Force SSL Over Administration Panel (The same as FORCE_SSL_ADMIN)
43
- 'ssl_proxy' => 0, // Proxy detection
44
- 'debug' => 0, // Debug Mode
45
- 'admin_menu' => 'side', // HTTPS Admin Menu location
46
- 'secure_filter' => array(), // Expressions to secure URL's against
47
- 'ssl_host_mapping' => array(), // External SSL Hosts whose HTTPS content is on another domain
48
- 'network_defaults' => array(), // Default settings for new blogs on a multisite network
49
- );
50
-
51
- /**
52
- * File extensions to be loaded securely.
53
- *
54
- * @var array
55
- */
56
- protected $_file_extensions = array('jpg', 'jpeg', 'png', 'gif', 'css', 'js');
57
-
58
- /**
59
- * Default External SSL Host Mapping
60
- * @var array
61
- */
62
- public static $ssl_host_mapping = array(
63
- 'w.sharethis.com' => 'ws.sharethis.com',
64
- '\d.gravatar.com' => 'secure.gravatar.com',
65
- );
66
-
67
- /**
68
- * Get File Extensions to Secure
69
- *
70
- * @param none
71
- * @return array
72
- */
73
- public function getFileExtensions() {
74
- return $this->_file_extensions;
75
- }
76
-
77
- /**
78
- * Get HTTP Url
79
- *
80
- * @param none
81
- * @return WordPressHTTPS_Url
82
- */
83
- public function getHttpUrl() {
84
- if ( !isset($this->_http_url) ) {
85
- $this->_http_url = WordPressHTTPS_Url::fromString('http://' . parse_url(get_bloginfo('template_url'), PHP_URL_HOST) . parse_url(home_url('/'), PHP_URL_PATH));
86
- }
87
- return $this->_http_url;
88
- }
89
-
90
- /**
91
- * Get HTTPS Url
92
- *
93
- * @param none
94
- * @return WordPressHTTPS_Url
95
- */
96
- public function getHttpsUrl() {
97
- if ( !isset($this->_https_url) ) {
98
- $this->_https_url = WordPressHTTPS_Url::fromString('https://' . parse_url(get_bloginfo('template_url'), PHP_URL_HOST) . parse_url(home_url('/'), PHP_URL_PATH));
99
-
100
- // If using a different host for SSL
101
- if ( is_string($this->getSetting('ssl_host')) && $this->getSetting('ssl_host') != '' && $this->getSetting('ssl_host') != $this->_https_url->toString() ) {
102
- // Assign HTTPS URL to SSL Host
103
- $this->setSetting('ssl_host_diff', 1);
104
- $ssl_host = rtrim($this->getSetting('ssl_host'), '/') . '/';
105
- if ( strpos($ssl_host, 'http://') === false && strpos($ssl_host, 'https://') === false ) {
106
- $ssl_host = 'https://' . $ssl_host;
107
- }
108
- $this->_https_url = WordPressHTTPS_Url::fromString( $ssl_host );
109
- } else {
110
- $this->setSetting('ssl_host_diff', 0);
111
- }
112
-
113
- // Prepend SSL Host path
114
- if ( strpos($this->_https_url->getPath(), $this->getHttpUrl()->getPath()) === false ) {
115
- $this->_https_url->setPath( $this->_https_url->getPath() . $this->getHttpUrl()->getPath() );
116
- }
117
-
118
- // Add SSL Port to HTTPS URL
119
- $this->_https_url->setPort($this->getSetting('ssl_port'));
120
- }
121
-
122
- return $this->_https_url;
123
- }
124
-
125
- /**
126
- * Initialize
127
- *
128
- * @param none
129
- * @return void
130
- */
131
- public function init() {
132
- $this->getLogger()->log('Version: ' . $this->getVersion());
133
- $this->getLogger()->log('HTTP URL: ' . $this->getHttpUrl()->toString());
134
- $this->getLogger()->log('HTTPS URL: ' . $this->getHttpsUrl()->toString());
135
- $this->getLogger()->log('SSL: ' . ( $this->isSsl() ? 'Yes' : 'No' ));
136
- $this->getLogger()->log('Diff Host: ' . ( $this->getSetting('ssl_host_diff') ? 'Yes' : 'No' ));
137
- $this->getLogger()->log('Subdomain: ' . ( $this->getSetting('ssl_host_subdomain') ? 'Yes' : 'No' ));
138
- $this->getLogger()->log('Proxy: ' . ( $this->getSetting('ssl_proxy') === 'auto' ? 'Auto' : ( $this->getSetting('ssl_proxy') ? 'Yes' : 'No' ) ));
139
- $this->getLogger()->log('Secure External URLs: [ ' . implode(', ', (array)$this->getSetting('secure_external_urls')) . ' ]');
140
- $this->getLogger()->log('Unsecure External URLs: [ ' . implode(', ', (array)$this->getSetting('unsecure_external_urls')) . ' ]');
141
-
142
- parent::init();
143
- }
144
-
145
- /**
146
- * Install
147
- *
148
- * @param none
149
- * @return void
150
- */
151
- public function install() {
152
- global $wpdb;
153
-
154
- if ( is_multisite() && is_network_admin() ) {
155
- $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs));
156
- } else {
157
- $blogs = array($wpdb->blogid);
158
- }
159
-
160
- $defaults = $this->getSetting('network_defaults');
161
- foreach ( $blogs as $blog_id ) {
162
- // Add Settings
163
- foreach ( $this->getSettings() as $option => $value ) {
164
- if ( is_multisite() ) {
165
- if ( add_blog_option($blog_id, $option, $value) && isset($defaults[$option]) ) {
166
- $value = $defaults[$option];
167
- $this->setSetting($option, $value, $blog_id);
168
- }
169
- } else {
170
- add_option($option, $value);
171
- }
172
- }
173
-
174
- // Fix a bug that saved the ssl_host as an object
175
- if ( ! is_string($this->getSetting('ssl_host', $blog_id)) ) {
176
- $this->setSetting('ssl_host', $this->_settings['ssl_host'], $blog_id);
177
- $this->setSetting('ssl_port', $this->_settings['ssl_port'], $blog_id);
178
- $this->setSetting('ssl_host_diff', $this->_settings['ssl_host_diff'], $blog_id);
179
- $this->setSetting('ssl_host_subdomain', $this->_settings['ssl_host_subdomain'], $blog_id);
180
- }
181
-
182
- // If secure front page option exists, create front page filter
183
- if ( $this->getSetting('frontpage', $blog_id) ) {
184
- $this->setSetting('secure_filter', array_merge($this->getSetting('secure_filter'), array(rtrim(str_replace('http://', '', $this->getHttpUrl()->toString()), '/') . '/$')));
185
- $this->setSetting('frontpage', 0, $blog_id);
186
- }
187
-
188
- // Reset cache
189
- $this->setSetting('secure_external_urls', $this->_settings['secure_external_urls'], $blog_id);
190
- $this->setSetting('unsecure_external_urls', $this->_settings['unsecure_external_urls'], $blog_id);
191
-
192
- // Set default domain mapping
193
- if ( $this->getSetting('ssl_host_mapping', $blog_id) == array() ) {
194
- $this->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping, $blog_id);
195
- }
196
- }
197
-
198
- // Checks to see if the SSL Host is a subdomain
199
- $http_domain = $this->getHttpUrl()->getBaseHost();
200
- $https_domain = $this->getHttpsUrl()->getBaseHost();
201
-
202
- if ( $this->getHttpsUrl()->setScheme('http')->toString() != $this->getHttpUrl()->toString() && $http_domain == $https_domain ) {
203
- $subdomain = true;
204
- } else {
205
- $subdomain = false;
206
- }
207
- foreach ( $blogs as $blog_id ) {
208
- $this->setSetting('ssl_host_subdomain', $subdomain, $blog_id);
209
- }
210
- }
211
-
212
- /**
213
- * Is Local URL
214
- *
215
- * Determines if URL is local or external
216
- *
217
- * @param string $url
218
- * @return boolean
219
- */
220
- public function isUrlLocal($url) {
221
- if ( ($url_parts = parse_url($url)) && isset($url_parts['host']) && $this->getHttpUrl()->getHost() != $url_parts['host'] && $this->getHttpsUrl()->getHost() != $url_parts['host'] ) {
222
- return false;
223
- }
224
- return true;
225
- }
226
-
227
- /**
228
- * Replaces HTTP Host with HTTPS Host
229
- *
230
- * @param string $string
231
- * @return string $string
232
- */
233
- public function makeUrlHttps( $string ) {
234
- if ( (string)$string == '' ) {
235
- return false;
236
- }
237
-
238
- // If relative, prepend appropriate path
239
- if ( strpos($string, '/') === 0 ) {
240
- if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) === false ) {
241
- if ( $this->getHttpUrl()->getPath() == '/' ) {
242
- $string = rtrim($this->getHttpsUrl()->getPath(), '/') . $string;
243
- } else {
244
- $string = str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $string);
245
- }
246
- }
247
- } else if ( $url = WordPressHTTPS_Url::fromString( $string ) ) {
248
- if ( $this->isUrlLocal($url) ) {
249
- $has_host = ( $this->getHttpUrl()->getHost() == $this->getHttpsUrl()->getHost() ) || strpos($url, $this->getHttpsUrl()->getHost()) !== false;
250
- $has_path = ( $this->getHttpUrl()->getPath() == $this->getHttpsUrl()->getPath() ) || strpos($url, $this->getHttpsUrl()->getPath()) !== false;
251
- $has_port = ( (int)$this->getHttpsUrl()->getPort() > 0 ? strpos($url, ':' . $this->getHttpsUrl()->getPort()) !== false : true );
252
- if ( $url->getScheme() == 'http' || !$has_host || !$has_path || !$has_port ) {
253
- $updated = clone $url;
254
- $updated->setScheme('https');
255
- $updated->setHost($this->getHttpsUrl()->getHost());
256
- $updated->setPort($this->getHttpsUrl()->getPort());
257
- if ( $this->getSetting('ssl_host_diff') && strpos($updated->getPath(), $this->getHttpsUrl()->getPath()) === false ) {
258
- if ( $this->getHttpUrl()->getPath() == '/' ) {
259
- $updated->setPath(rtrim($this->getHttpsUrl()->getPath(), '/') . $updated->getPath());
260
- } else if ( strpos($updated->getPath(), $this->getHttpUrl()->getPath()) !== false ) {
261
- $updated->setPath(str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $updated->getPath()));
262
- } else if ( strpos($updated->getPath(), rtrim($this->getHttpUrl()->getPath(), '/')) !== false ) {
263
- $updated->setPath(str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), $this->getHttpsUrl()->getPath(), $updated->getPath()));
264
- }
265
- }
266
- if ( ( ( $this->isSsl() && !$this->getSetting('exclusive_https') ) || ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $this->getSetting('ssl_admin') ) && strpos($url, 'wp-admin') !== false && preg_match('/redirect_to=([^&]+)/i', $updated->toString(), $redirect) && isset($redirect[1]) ) {
267
- $redirect_url = $redirect[1];
268
- $updated = str_replace($redirect_url, urlencode($this->makeUrlHttps(urldecode($redirect_url))), $updated->toString());
269
- }
270
- $string = str_replace($url, $updated, $string);
271
- }
272
- } else {
273
- $updated = clone $url;
274
- $updated = WordPressHTTPS_Url::fromString( apply_filters('https_external_url', $updated->toString()) );
275
- if ( @in_array($updated->toString(), $this->getSetting('secure_external_urls')) == false && @in_array($updated->toString(), $this->getSetting('unsecure_external_urls')) == false ) {
276
- $test = clone $updated;
277
- $test->setScheme('https');
278
- if ( $test->isValid() ) {
279
- // Cache this URL as available over HTTPS for future reference
280
- $this->addSecureExternalUrl($updated->toString());
281
- $updated->setScheme('https');
282
- } else {
283
- // If not available over HTTPS, mark as an unsecure external URL
284
- $this->addUnsecureExternalUrl($updated->toString());
285
- }
286
- } else if ( in_array($updated->toString(), $this->getSetting('secure_external_urls')) ) {
287
- $updated->setScheme('https');
288
- }
289
- if ( $url->toString() != $updated->toString() ) {
290
- $string = str_replace($url, $updated, $string);
291
- }
292
- }
293
- unset($test);
294
- unset($updated);
295
- unset($url);
296
- }
297
- return $string;
298
- }
299
-
300
- /**
301
- * Replaces HTTPS Host with HTTP Host
302
- *
303
- * @param string $string
304
- * @return string $string
305
- */
306
- public function makeUrlHttp( $string ) {
307
- if ( (string)$string == '' ) {
308
- return false;
309
- }
310
-
311
- // If relative
312
- if ( strpos($string, '/') === 0 ) {
313
- if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) !== false ) {
314
- $string = str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $string);
315
- }
316
- } else if ( $url = WordPressHTTPS_Url::fromString( $string ) ) {
317
- if ( $this->isUrlLocal($url) ) {
318
- if ( $url->getScheme() == 'https' ) {
319
- $updated = clone $url;
320
- $updated->setScheme('http');
321
- $updated->setHost($this->getHttpUrl()->getHost());
322
- $updated->setPort($this->getHttpUrl()->getPort());
323
- if ( $this->getSetting('ssl_host_diff') && strpos($updated->getPath(), $this->getHttpsUrl()->getPath()) !== false ) {
324
- $updated->setPath(str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $updated->getPath()));
325
- }
326
- if ( strpos($url, 'wp-admin') !== false && preg_match('/redirect_to=([^&]+)/i', $url, $redirect) && isset($redirect[1]) ) {
327
- $redirect_url = $redirect[1];
328
- $url = str_replace($redirect_url, urlencode($this->makeUrlHttp(urldecode($redirect_url))), $url);
329
- }
330
- $string = str_replace($url, $updated, $string);
331
- }
332
- } else {
333
- $updated = apply_filters('http_external_url', str_replace('https://', 'http://', $url));
334
- $string = str_replace($url, $updated, $string);
335
- }
336
- }
337
- unset($updated);
338
- unset($url);
339
- return $string;
340
- }
341
-
342
- /**
343
- * Add Secure External URL
344
- *
345
- * @param string $value
346
- * @return $this
347
- */
348
- public function addSecureExternalUrl( $value ) {
349
- if ( trim($value) == '' ) {
350
- return $this;
351
- }
352
-
353
- $secure_external_urls = (array) $this->getSetting('secure_external_urls');
354
- array_push($secure_external_urls, (string) $value);
355
- $this->setSetting('secure_external_urls', $secure_external_urls);
356
-
357
- return $this;
358
- }
359
-
360
- /**
361
- * Add Unsecure External URL
362
- *
363
- * @param string $value
364
- * @return $this
365
- */
366
- public function addUnsecureExternalUrl( $value ) {
367
- if ( trim($value) == '' ) {
368
- return $this;
369
- }
370
-
371
- $unsecure_external_urls = (array) $this->getSetting('unsecure_external_urls');
372
- array_push($unsecure_external_urls, (string) $value);
373
- $this->setSetting('unsecure_external_urls', $unsecure_external_urls);
374
-
375
- return $this;
376
- }
377
-
378
- /**
379
- * Checks if the current page is SSL
380
- *
381
- * @param none
382
- * @return bool
383
- */
384
- public function isSsl() {
385
- // Some extra checks for Shared SSL
386
- if ( is_ssl() && strpos($_SERVER['HTTP_HOST'], $this->getHttpsUrl()->getHost()) === false && $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST'] ) {
387
- return false;
388
- } else if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
389
- return true;
390
- } else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
391
- return true;
392
- } else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_X_FORWARDED_SERVER'] ) {
393
- return true;
394
- } else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_HOST'] && ( $this->getHttpsUrl()->getPort() <= 0 || $_SERVER['SERVER_PORT'] == $this->getHttpsUrl()->getPort() ) && strpos($_SERVER['REQUEST_URI'], $this->getHttpsUrl()->getPath()) !== false ) {
395
- return true;
396
- }
397
- return is_ssl();
398
- }
399
-
400
- /**
401
- * Maintained for backwards compatibility.
402
- *
403
- * @param none
404
- * @return bool
405
- */
406
- public function is_ssl() {
407
- return $this->isSsl();
408
- }
409
-
410
- /**
411
- * Redirects page to HTTP or HTTPS accordingly
412
- *
413
- * @param string $scheme Either http or https
414
- * @return void
415
- */
416
- public function redirect( $scheme = 'https' ) {
 
 
417
  $current_path = ( isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], 'index.php') === false ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI'] );
418
  if ( strpos($_SERVER['REQUEST_URI'], '?') !== false && isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], '?') === false ) {
419
  $current_path .= substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?'));
420
- }
421
 
422
  $current_url = ( $this->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $current_path;
423
  if ( $scheme == 'https' ) {
@@ -425,51 +427,51 @@ class WordPressHTTPS extends Mvied_Plugin {
425
  } else {
426
  $url = $this->makeUrlHttp($current_url);
427
  }
428
-
429
- if ( $current_url != $url ) {
430
- // Use a cookie to detect redirect loops
431
- $redirect_count = ( isset($_COOKIE['redirect_count']) && is_numeric($_COOKIE['redirect_count']) ? (int)$_COOKIE['redirect_count']+1 : 1 );
432
- setcookie('redirect_count', $redirect_count, 0, '/');
433
- // If redirect count is greater than 2, prevent redirect and log the redirect loop
434
- if ( $redirect_count > 2 ) {
435
- setcookie('redirect_count', null, -time(), '/');
436
- $this->getLogger()->log('[ERROR] Redirect Loop!');
437
- return;
438
- }
439
-
440
- // Redirect
441
- if ( function_exists('wp_redirect') ) {
442
- wp_redirect($url, 301);
443
- } else {
444
- // End all output buffering and redirect
445
- while(@ob_end_clean());
446
- header("Location: " . $url, true, 301);
447
- }
448
- exit();
449
- }
450
- }
451
-
452
- /**
453
- * Get relevent files and directories within WordPress
454
- *
455
- * @param none
456
- * @return void
457
- */
458
- public function getDirectories() {
459
- $directories = array();
460
- $scannedDirectories = array();
461
- $directories[] = get_theme_root() . '/' . get_template();
462
-
463
- foreach( $directories as $directory ) {
464
- $scannedDirectories[$directory]['name'] = $directory;
465
- if ( is_readable($directory) && ($files = scandir($directory)) ) {
466
- $scannedDirectories[$directory]['files'] = $files;
467
- unset($files);
468
- } else {
469
- $scannedDirectories[$directory]['error'] = "Unable to read directory.";
470
- }
471
- }
472
- return $scannedDirectories;
473
- }
474
-
475
  }
1
+ <?php
2
+ /**
3
+ * WordPress HTTPS
4
+ *
5
+ * @author Mike Ems
6
+ * @package WordPressHTTPS
7
+ *
8
+ */
9
+
10
+ class WordPressHTTPS extends Mvied_Plugin {
11
+
12
+ /**
13
+ * HTTP URL
14
+ *
15
+ * @var WordPressHTTPS_Url
16
+ */
17
+ protected $_http_url;
18
+
19
+ /**
20
+ * HTTPS URL
21
+ *
22
+ * @var WordPressHTTPS_Url
23
+ */
24
+ protected $_https_url;
25
+
26
+ /**
27
+ * Plugin Settings
28
+ *
29
+ * setting_name => default_value
30
+ *
31
+ * @var array
32
+ */
33
+ protected $_settings = array(
34
+ 'ssl_host' => '', // Hostname for SSL Host
35
+ 'ssl_port' => '', // Port number for SSL Host
36
+ 'secure_external_urls' => array(), // Secure external URL's
37
+ 'unsecure_external_urls' => array(), // Unsecure external URL's
38
+ 'ssl_host_diff' => 0, // Is SSL Host different than WordPress host
39
+ 'ssl_host_subdomain' => 0, // Is SSL Host a subdomain of WordPress host
40
+ 'exclusive_https' => 0, // Redirect pages that are not secured to HTTP
41
+ 'remove_unsecure' => 0, // Remove unsecure elements from HTML
42
+ 'ssl_admin' => 0, // Force SSL Over Administration Panel (The same as FORCE_SSL_ADMIN)
43
+ 'ssl_proxy' => 0, // Proxy detection
44
+ 'debug' => 0, // Debug Mode
45
+ 'admin_menu' => 'side', // HTTPS Admin Menu location
46
+ 'secure_filter' => array(), // Expressions to secure URL's against
47
+ 'ssl_host_mapping' => array(), // External SSL Hosts whose HTTPS content is on another domain
48
+ 'network_defaults' => array(), // Default settings for new blogs on a multisite network
49
+ );
50
+
51
+ /**
52
+ * File extensions to be loaded securely.
53
+ *
54
+ * @var array
55
+ */
56
+ protected $_file_extensions = array('jpg', 'jpeg', 'png', 'gif', 'css', 'js');
57
+
58
+ /**
59
+ * Default External SSL Host Mapping
60
+ * @var array
61
+ */
62
+ public static $ssl_host_mapping = array(
63
+ 'w.sharethis.com' => 'ws.sharethis.com',
64
+ '\d.gravatar.com' => 'secure.gravatar.com',
65
+ );
66
+
67
+ /**
68
+ * Get File Extensions to Secure
69
+ *
70
+ * @param none
71
+ * @return array
72
+ */
73
+ public function getFileExtensions() {
74
+ return $this->_file_extensions;
75
+ }
76
+
77
+ /**
78
+ * Get HTTP Url
79
+ *
80
+ * @param none
81
+ * @return WordPressHTTPS_Url
82
+ */
83
+ public function getHttpUrl() {
84
+ if ( !isset($this->_http_url) ) {
85
+ $this->_http_url = WordPressHTTPS_Url::fromString('http://' . parse_url(get_bloginfo('template_url'), PHP_URL_HOST) . parse_url(home_url('/'), PHP_URL_PATH));
86
+ }
87
+ return $this->_http_url;
88
+ }
89
+
90
+ /**
91
+ * Get HTTPS Url
92
+ *
93
+ * @param none
94
+ * @return WordPressHTTPS_Url
95
+ */
96
+ public function getHttpsUrl() {
97
+ if ( !isset($this->_https_url) ) {
98
+ $this->_https_url = WordPressHTTPS_Url::fromString('https://' . parse_url(get_bloginfo('template_url'), PHP_URL_HOST) . parse_url(home_url('/'), PHP_URL_PATH));
99
+
100
+ // If using a different host for SSL
101
+ if ( is_string($this->getSetting('ssl_host')) && $this->getSetting('ssl_host') != '' && $this->getSetting('ssl_host') != $this->_https_url->toString() ) {
102
+ // Assign HTTPS URL to SSL Host
103
+ $this->setSetting('ssl_host_diff', 1);
104
+ $ssl_host = rtrim($this->getSetting('ssl_host'), '/') . '/';
105
+ if ( strpos($ssl_host, 'http://') === false && strpos($ssl_host, 'https://') === false ) {
106
+ $ssl_host = 'https://' . $ssl_host;
107
+ }
108
+ $this->_https_url = WordPressHTTPS_Url::fromString( $ssl_host );
109
+ } else {
110
+ $this->setSetting('ssl_host_diff', 0);
111
+ }
112
+
113
+ // Prepend SSL Host path
114
+ if ( strpos($this->_https_url->getPath(), $this->getHttpUrl()->getPath()) === false ) {
115
+ $this->_https_url->setPath( $this->_https_url->getPath() . $this->getHttpUrl()->getPath() );
116
+ }
117
+
118
+ // Add SSL Port to HTTPS URL
119
+ $this->_https_url->setPort($this->getSetting('ssl_port'));
120
+ }
121
+
122
+ return $this->_https_url;
123
+ }
124
+
125
+ /**
126
+ * Initialize
127
+ *
128
+ * @param none
129
+ * @return void
130
+ */
131
+ public function init() {
132
+ $this->getLogger()->log('Version: ' . $this->getVersion());
133
+ $this->getLogger()->log('HTTP URL: ' . $this->getHttpUrl()->toString());
134
+ $this->getLogger()->log('HTTPS URL: ' . $this->getHttpsUrl()->toString());
135
+ $this->getLogger()->log('SSL: ' . ( $this->isSsl() ? 'Yes' : 'No' ));
136
+ $this->getLogger()->log('Diff Host: ' . ( $this->getSetting('ssl_host_diff') ? 'Yes' : 'No' ));
137
+ $this->getLogger()->log('Subdomain: ' . ( $this->getSetting('ssl_host_subdomain') ? 'Yes' : 'No' ));
138
+ $this->getLogger()->log('Proxy: ' . ( $this->getSetting('ssl_proxy') === 'auto' ? 'Auto' : ( $this->getSetting('ssl_proxy') ? 'Yes' : 'No' ) ));
139
+ $this->getLogger()->log('Secure External URLs: [ ' . implode(', ', (array)$this->getSetting('secure_external_urls')) . ' ]');
140
+ $this->getLogger()->log('Unsecure External URLs: [ ' . implode(', ', (array)$this->getSetting('unsecure_external_urls')) . ' ]');
141
+
142
+ parent::init();
143
+ }
144
+
145
+ /**
146
+ * Install
147
+ *
148
+ * @param none
149
+ * @return void
150
+ */
151
+ public function install() {
152
+ global $wpdb;
153
+
154
+ if ( is_multisite() && is_network_admin() ) {
155
+ $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL));
156
+ } else {
157
+ $blogs = array($wpdb->blogid);
158
+ }
159
+
160
+ $defaults = $this->getSetting('network_defaults');
161
+ foreach ( $blogs as $blog_id ) {
162
+ // Add Settings
163
+ foreach ( $this->getSettings() as $option => $value ) {
164
+ if ( is_multisite() ) {
165
+ if ( add_blog_option($blog_id, $option, $value) && isset($defaults[$option]) ) {
166
+ $value = $defaults[$option];
167
+ $this->setSetting($option, $value, $blog_id);
168
+ }
169
+ } else {
170
+ add_option($option, $value);
171
+ }
172
+ }
173
+
174
+ // Fix a bug that saved the ssl_host as an object
175
+ if ( ! is_string($this->getSetting('ssl_host', $blog_id)) ) {
176
+ $this->setSetting('ssl_host', $this->_settings['ssl_host'], $blog_id);
177
+ $this->setSetting('ssl_port', $this->_settings['ssl_port'], $blog_id);
178
+ $this->setSetting('ssl_host_diff', $this->_settings['ssl_host_diff'], $blog_id);
179
+ $this->setSetting('ssl_host_subdomain', $this->_settings['ssl_host_subdomain'], $blog_id);
180
+ }
181
+
182
+ // If secure front page option exists, create front page filter
183
+ if ( $this->getSetting('frontpage', $blog_id) ) {
184
+ $this->setSetting('secure_filter', array_merge($this->getSetting('secure_filter'), array(rtrim(str_replace('http://', '', $this->getHttpUrl()->toString()), '/') . '/$')));
185
+ $this->setSetting('frontpage', 0, $blog_id);
186
+ }
187
+
188
+ // Reset cache
189
+ $this->setSetting('secure_external_urls', $this->_settings['secure_external_urls'], $blog_id);
190
+ $this->setSetting('unsecure_external_urls', $this->_settings['unsecure_external_urls'], $blog_id);
191
+
192
+ // Set default domain mapping
193
+ if ( $this->getSetting('ssl_host_mapping', $blog_id) == array() ) {
194
+ $this->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping, $blog_id);
195
+ }
196
+ }
197
+
198
+ // Checks to see if the SSL Host is a subdomain
199
+ $http_domain = $this->getHttpUrl()->getBaseHost();
200
+ $https_domain = $this->getHttpsUrl()->getBaseHost();
201
+
202
+ if ( $this->getHttpsUrl()->setScheme('http')->toString() != $this->getHttpUrl()->toString() && $http_domain == $https_domain ) {
203
+ $subdomain = true;
204
+ } else {
205
+ $subdomain = false;
206
+ }
207
+ foreach ( $blogs as $blog_id ) {
208
+ $this->setSetting('ssl_host_subdomain', $subdomain, $blog_id);
209
+ }
210
+ }
211
+
212
+ /**
213
+ * Is Local URL
214
+ *
215
+ * Determines if URL is local or external
216
+ *
217
+ * @param string $url
218
+ * @return boolean
219
+ */
220
+ public function isUrlLocal($url) {
221
+ if ( ($url_parts = parse_url($url)) && isset($url_parts['host']) && $this->getHttpUrl()->getHost() != $url_parts['host'] && $this->getHttpsUrl()->getHost() != $url_parts['host'] ) {
222
+ return false;
223
+ }
224
+ return true;
225
+ }
226
+
227
+ /**
228
+ * Replaces HTTP Host with HTTPS Host
229
+ *
230
+ * @param string $string
231
+ * @return string $string
232
+ */
233
+ public function makeUrlHttps( $string ) {
234
+ if ( (string)$string == '' ) {
235
+ return false;
236
+ }
237
+
238
+ // If relative, prepend appropriate path
239
+ if ( strpos($string, '/') === 0 ) {
240
+ if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) === false ) {
241
+ if ( $this->getHttpUrl()->getPath() == '/' ) {
242
+ $string = rtrim($this->getHttpsUrl()->getPath(), '/') . $string;
243
+ } else {
244
+ $string = str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $string);
245
+ }
246
+ }
247
+ } else if ( $url = WordPressHTTPS_Url::fromString( $string ) ) {
248
+ if ( $this->isUrlLocal($url) ) {
249
+ if ( $url->getScheme() == 'http' || ( $url->getScheme() == 'https' && $this->getSetting('ssl_host_diff') ) ) {
250
+ $has_host = ( $this->getHttpUrl()->getHost() == $this->getHttpsUrl()->getHost() ) || strpos($url, $this->getHttpsUrl()->getHost()) !== false;
251
+ $has_path = ( $this->getHttpUrl()->getPath() == $this->getHttpsUrl()->getPath() ) || strpos($url, $this->getHttpsUrl()->getPath()) !== false;
252
+ $has_port = ( (int)$this->getHttpsUrl()->getPort() > 0 ? strpos($url, ':' . $this->getHttpsUrl()->getPort()) !== false : true );
253
+ if ( $url->getScheme() == 'http' || !$has_host || !$has_path || !$has_port ) {
254
+ $updated = clone $url;
255
+ $updated->setScheme('https');
256
+ $updated->setHost($this->getHttpsUrl()->getHost());
257
+ $updated->setPort($this->getHttpsUrl()->getPort());
258
+ if ( $this->getSetting('ssl_host_diff') && strpos($updated->getPath(), $this->getHttpsUrl()->getPath()) === false ) {
259
+ if ( $this->getHttpUrl()->getPath() == '/' ) {
260
+ $updated->setPath(rtrim($this->getHttpsUrl()->getPath(), '/') . $updated->getPath());
261
+ } else if ( strpos($updated->getPath(), $this->getHttpUrl()->getPath()) !== false ) {
262
+ $updated->setPath(str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $updated->getPath()));
263
+ } else if ( strpos($updated->getPath(), rtrim($this->getHttpUrl()->getPath(), '/')) !== false ) {
264
+ $updated->setPath(str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), $this->getHttpsUrl()->getPath(), $updated->getPath()));
265
+ }
266
+ }
267
+ if ( ( ( $this->isSsl() && !$this->getSetting('exclusive_https') ) || ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $this->getSetting('ssl_admin') ) && strpos($url, 'wp-admin') !== false && preg_match('/redirect_to=([^&]+)/i', $updated->toString(), $redirect) && isset($redirect[1]) ) {
268
+ $redirect_url = $redirect[1];
269
+ $updated = str_replace($redirect_url, urlencode($this->makeUrlHttps(urldecode($redirect_url))), $updated->toString());
270
+ }
271
+ $string = str_replace($url, $updated, $string);
272
+ }
273
+ }
274
+ } else {
275
+ $updated = clone $url;
276
+ $updated = WordPressHTTPS_Url::fromString( apply_filters('https_external_url', $updated->toString()) );
277
+ if ( @in_array($updated->toString(), $this->getSetting('secure_external_urls')) == false && @in_array($updated->toString(), $this->getSetting('unsecure_external_urls')) == false ) {
278
+ $test = clone $updated;
279
+ $test->setScheme('https');
280
+ if ( $test->isValid() ) {
281
+ // Cache this URL as available over HTTPS for future reference
282
+ $this->addSecureExternalUrl($updated->toString());
283
+ $updated->setScheme('https');
284
+ } else {
285
+ // If not available over HTTPS, mark as an unsecure external URL
286
+ $this->addUnsecureExternalUrl($updated->toString());
287
+ }
288
+ } else if ( in_array($updated->toString(), $this->getSetting('secure_external_urls')) ) {
289
+ $updated->setScheme('https');
290
+ }
291
+ if ( $url->toString() != $updated->toString() ) {
292
+ $string = str_replace($url, $updated, $string);
293
+ }
294
+ }
295
+ unset($test);
296
+ unset($updated);
297
+ unset($url);
298
+ }
299
+ return $string;
300
+ }
301
+
302
+ /**
303
+ * Replaces HTTPS Host with HTTP Host
304
+ *
305
+ * @param string $string
306
+ * @return string $string
307
+ */
308
+ public function makeUrlHttp( $string ) {
309
+ if ( (string)$string == '' ) {
310
+ return false;
311
+ }
312
+
313
+ // If relative
314
+ if ( strpos($string, '/') === 0 ) {
315
+ if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) !== false ) {
316
+ $string = str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $string);
317
+ }
318
+ } else if ( $url = WordPressHTTPS_Url::fromString( $string ) ) {
319
+ if ( $this->isUrlLocal($url) ) {
320
+ if ( $url->getScheme() == 'https' ) {
321
+ $updated = clone $url;
322
+ $updated->setScheme('http');
323
+ $updated->setHost($this->getHttpUrl()->getHost());
324
+ $updated->setPort($this->getHttpUrl()->getPort());
325
+ if ( $this->getSetting('ssl_host_diff') && strpos($updated->getPath(), $this->getHttpsUrl()->getPath()) !== false ) {
326
+ $updated->setPath(str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $updated->getPath()));
327
+ }
328
+ if ( strpos($url, 'wp-admin') !== false && preg_match('/redirect_to=([^&]+)/i', $url, $redirect) && isset($redirect[1]) ) {
329
+ $redirect_url = $redirect[1];
330
+ $url = str_replace($redirect_url, urlencode($this->makeUrlHttp(urldecode($redirect_url))), $url);
331
+ }
332
+ $string = str_replace($url, $updated, $string);
333
+ }
334
+ } else {
335
+ $updated = apply_filters('http_external_url', str_replace('https://', 'http://', $url));
336
+ $string = str_replace($url, $updated, $string);
337
+ }
338
+ }
339
+ unset($updated);
340
+ unset($url);
341
+ return $string;
342
+ }
343
+
344
+ /**
345
+ * Add Secure External URL
346
+ *
347
+ * @param string $value
348
+ * @return $this
349
+ */
350
+ public function addSecureExternalUrl( $value ) {
351
+ if ( trim($value) == '' ) {
352
+ return $this;
353
+ }
354
+
355
+ $secure_external_urls = (array) $this->getSetting('secure_external_urls');
356
+ array_push($secure_external_urls, (string) $value);
357
+ $this->setSetting('secure_external_urls', $secure_external_urls);
358
+
359
+ return $this;
360
+ }
361
+
362
+ /**
363
+ * Add Unsecure External URL
364
+ *
365
+ * @param string $value
366
+ * @return $this
367
+ */
368
+ public function addUnsecureExternalUrl( $value ) {
369
+ if ( trim($value) == '' ) {
370
+ return $this;
371
+ }
372
+
373
+ $unsecure_external_urls = (array) $this->getSetting('unsecure_external_urls');
374
+ array_push($unsecure_external_urls, (string) $value);
375
+ $this->setSetting('unsecure_external_urls', $unsecure_external_urls);
376
+
377
+ return $this;
378
+ }
379
+
380
+ /**
381
+ * Checks if the current page is SSL
382
+ *
383
+ * @param none
384
+ * @return bool
385
+ */
386
+ public function isSsl() {
387
+ // Some extra checks for Shared SSL
388
+ if ( is_ssl() && strpos($_SERVER['HTTP_HOST'], $this->getHttpsUrl()->getHost()) === false && $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST'] ) {
389
+ return false;
390
+ } else if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
391
+ return true;
392
+ } else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
393
+ return true;
394
+ } else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_X_FORWARDED_SERVER'] ) {
395
+ return true;
396
+ } else if ( $this->getSetting('ssl_host_diff') && !is_ssl() && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_HOST'] && ( $this->getHttpsUrl()->getPort() <= 0 || $_SERVER['SERVER_PORT'] == $this->getHttpsUrl()->getPort() ) && strpos($_SERVER['REQUEST_URI'], $this->getHttpsUrl()->getPath()) !== false ) {
397
+ return true;
398
+ }
399
+ return is_ssl();
400
+ }
401
+
402
+ /**
403
+ * Maintained for backwards compatibility.
404
+ *
405
+ * @param none
406
+ * @return bool
407
+ */
408
+ public function is_ssl() {
409
+ return $this->isSsl();
410
+ }
411
+
412
+ /**
413
+ * Redirects page to HTTP or HTTPS accordingly
414
+ *
415
+ * @param string $scheme Either http or https
416
+ * @return void
417
+ */
418
+ public function redirect( $scheme = 'https' ) {
419
  $current_path = ( isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], 'index.php') === false ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI'] );
420
  if ( strpos($_SERVER['REQUEST_URI'], '?') !== false && isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], '?') === false ) {
421
  $current_path .= substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?'));
422
+ }
423
 
424
  $current_url = ( $this->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $current_path;
425
  if ( $scheme == 'https' ) {
427
  } else {
428
  $url = $this->makeUrlHttp($current_url);
429
  }
430
+
431
+ if ( $current_url != $url ) {
432
+ // Use a cookie to detect redirect loops
433
+ $redirect_count = ( isset($_COOKIE['redirect_count']) && is_numeric($_COOKIE['redirect_count']) ? (int)$_COOKIE['redirect_count']+1 : 1 );
434
+ setcookie('redirect_count', $redirect_count, 0, '/');
435
+ // If redirect count is greater than 2, prevent redirect and log the redirect loop
436
+ if ( $redirect_count > 2 ) {
437
+ setcookie('redirect_count', null, -time(), '/');
438
+ $this->getLogger()->log('[ERROR] Redirect Loop!');
439
+ return;
440
+ }
441
+
442
+ // Redirect
443
+ if ( function_exists('wp_redirect') ) {
444
+ wp_redirect($url, 301);
445
+ } else {
446
+ // End all output buffering and redirect
447
+ while(@ob_end_clean());
448
+ header("Location: " . $url, true, 301);
449
+ }
450
+ exit();
451
+ }
452
+ }
453
+
454
+ /**
455
+ * Get relevent files and directories within WordPress
456
+ *
457
+ * @param none
458
+ * @return void
459
+ */
460
+ public function getDirectories() {
461
+ $directories = array();
462
+ $scannedDirectories = array();
463
+ $directories[] = get_theme_root() . '/' . get_template();
464
+
465
+ foreach( $directories as $directory ) {
466
+ $scannedDirectories[$directory]['name'] = $directory;
467
+ if ( is_readable($directory) && ($files = scandir($directory)) ) {
468
+ $scannedDirectories[$directory]['files'] = $files;
469
+ unset($files);
470
+ } else {
471
+ $scannedDirectories[$directory]['error'] = "Unable to read directory.";
472
+ }
473
+ }
474
+ return $scannedDirectories;
475
+ }
476
+
477
  }
lib/WordPressHTTPS/Logger.php CHANGED
@@ -49,7 +49,7 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
49
  /**
50
  * Adds a string to an array of log entries
51
  *
52
- * @param none
53
  * @return $this
54
  */
55
  public function log( $string ) {
49
  /**
50
  * Adds a string to an array of log entries
51
  *
52
+ * @param string $string
53
  * @return $this
54
  */
55
  public function log( $string ) {
lib/WordPressHTTPS/Module/Core.php CHANGED
@@ -41,8 +41,10 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
41
  add_filter('plugins_url', array(&$this, 'element_url'), 10);
42
  add_filter('includes_url', array(&$this, 'element_url'), 10);
43
 
44
- // Filter site_url
45
- add_filter('site_url', array(&$this, 'site_url'), 10, 4);
 
 
46
 
47
  // Filter force_ssl
48
  add_filter('force_ssl', array(&$this, 'secure_wordpress_forms'), 20, 3);
@@ -62,6 +64,9 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
62
  // Run install when new blog is created
63
  add_action('wpmu_new_blog', array($this->getPlugin(), 'install'), 10, 0);
64
 
 
 
 
65
  if ( $this->getPlugin()->getSetting('ssl_host_diff') ) {
66
  // Remove SSL Host authentication cookies on logout
67
  add_action('clear_auth_cookie', array(&$this, 'clear_cookies'));
@@ -477,6 +482,18 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
477
  }
478
  }
479
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  /**
481
  * Set Cookie
482
  * WordPress Hook - set_auth_cookie, set_logged_in_cookie
41
  add_filter('plugins_url', array(&$this, 'element_url'), 10);
42
  add_filter('includes_url', array(&$this, 'element_url'), 10);
43
 
44
+ // Filter site_url, excluding admin panel. Admin_url filter should catch everything.
45
+ if ( !is_admin() ) {
46
+ add_filter('site_url', array(&$this, 'site_url'), 10, 4);
47
+ }
48
 
49
  // Filter force_ssl
50
  add_filter('force_ssl', array(&$this, 'secure_wordpress_forms'), 20, 3);
64
  // Run install when new blog is created
65
  add_action('wpmu_new_blog', array($this->getPlugin(), 'install'), 10, 0);
66
 
67
+ // Set response headers
68
+ add_action($this->getPlugin()->getSlug() . '_init', array(&$this, 'set_headers'), 9, 1);
69
+
70
  if ( $this->getPlugin()->getSetting('ssl_host_diff') ) {
71
  // Remove SSL Host authentication cookies on logout
72
  add_action('clear_auth_cookie', array(&$this, 'clear_cookies'));
482
  }
483
  }
484
 
485
+ /**
486
+ * Add Access-Control-Allow-Origin header to AJAX calls
487
+ *
488
+ * @param none
489
+ * @return void
490
+ */
491
+ public function set_headers() {
492
+ if ( !headers_sent() && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest' ) {
493
+ header("Access-Control-Allow-Origin: " . $this->getPlugin()->getHttpsUrl());
494
+ }
495
+ }
496
+
497
  /**
498
  * Set Cookie
499
  * WordPress Hook - set_auth_cookie, set_logged_in_cookie
lib/WordPressHTTPS/Url.php CHANGED
@@ -453,16 +453,16 @@ class WordPressHTTPS_Url {
453
  if ( sizeof($array) <= 1 ) {
454
  return false;
455
  }
456
-
457
  $url = new WordPressHTTPS_Url;
458
- foreach( $array as $key => $value ) {
459
- $property = '_' . $key;
460
- $camelCase = create_function('$c', 'return strtoupper($c[1]);');
461
- $method = 'set' . preg_replace_callback('/_([a-z])/', $camelCase, $property);
462
- if ( method_exists($url, $method) ) {
463
- call_user_func(array($url, $method), $value);
464
- }
465
- }
466
 
467
  return $url;
468
  }
@@ -482,15 +482,14 @@ class WordPressHTTPS_Url {
482
  @preg_match_all('/((http|https):\/\/[^\'"]+)[\'"\)]?/i', $string, $url_parts);
483
  if ( isset($url_parts[1][0]) ) {
484
  if ( $url_parts = parse_url( $url_parts[1][0] ) ) {
485
- foreach( $url_parts as $key => $value ) {
486
- $property = '_' . $key;
487
- $camelCase = create_function('$c', 'return strtoupper($c[1]);');
488
- $method = 'set' . preg_replace_callback('/_([a-z])/', $camelCase, $property);
489
- if ( method_exists($url, $method) ) {
490
- call_user_func(array($url, $method), $value);
491
- }
492
- }
493
-
494
  return $url;
495
  }
496
  } else {
453
  if ( sizeof($array) <= 1 ) {
454
  return false;
455
  }
456
+
457
  $url = new WordPressHTTPS_Url;
458
+ $url->setScheme(@$array['scheme']);
459
+ $url->setUser(@$array['user']);
460
+ $url->setPass(@$array['pass']);
461
+ $url->setHost(@$array['host']);
462
+ $url->setPort(@$array['port']);
463
+ $url->setPath(@$array['path']);
464
+ $url->setQuery(@$array['query']);
465
+ $url->setFragment(@$array['fragment']);
466
 
467
  return $url;
468
  }
482
  @preg_match_all('/((http|https):\/\/[^\'"]+)[\'"\)]?/i', $string, $url_parts);
483
  if ( isset($url_parts[1][0]) ) {
484
  if ( $url_parts = parse_url( $url_parts[1][0] ) ) {
485
+ $url->setScheme(@$url_parts['scheme']);
486
+ $url->setUser(@$url_parts['user']);
487
+ $url->setPass(@$url_parts['pass']);
488
+ $url->setHost(@$url_parts['host']);
489
+ $url->setPort(@$url_parts['port']);
490
+ $url->setPath(@$url_parts['path']);
491
+ $url->setQuery(@$url_parts['query']);
492
+ $url->setFragment(@$url_parts['fragment']);
 
493
  return $url;
494
  }
495
  } else {
readme.txt CHANGED
@@ -3,18 +3,29 @@ Contributors: Mvied
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9NFVADLVUR7A
4
  Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
5
  Requires at least: 3.0
6
- Tested up to: 3.4
7
- Stable tag: 3.2.3
8
  License: GPLv3
9
 
10
  WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
11
 
12
  == Description ==
13
- If you're having partially encrypted/mixed content errors or other problems, please read the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/">FAQ</a>. If you're still having trouble, please <a href="http://wordpress.org/support/plugin/wordpress-https">start a support topic</a> and I will do my best to assist you.
 
 
 
 
 
14
 
15
  == Installation ==
16
  1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory.
17
  1. Activate the plugin through the 'Plugins' menu in WordPress.
 
 
 
 
 
 
18
 
19
  == Frequently Asked Questions ==
20
  = How do I fix partially encrypted/mixed content errors? =
@@ -34,9 +45,15 @@ Once you have identified the insecure elements, you need to figure out what them
34
  </ul>
35
 
36
  = I can't get into my admin panel. How do I fix it? =
 
 
 
37
  Go to /wp-content/plugins/wordpress-https/wordpress-https.php and uncomment (remove the two forward slashes before) the line below, or go to your wp-config.php file and add this line. Hit any page on your site, and then remove it or comment it out again.
38
  `define('WPHTTPS_RESET', true);`
39
 
 
 
 
40
  = How do I make my whole website secure? =
41
  To make your entire website secure, you simply need to change your site url to use HTTPS instead of HTTP. Please read <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">how to change the site url</a>.
42
  Alternatively, you can use URL Filters in the WordPress HTTPS Settings to secure your entire site by putting just '/' as a filter. This will cause any URL with a forward slash to be secure (all of them).
@@ -80,6 +97,11 @@ add_filter('force_ssl', 'store_force_ssl', 10, 3);`
80
  2. Force SSL checkbox added to add/edit posts screen
81
 
82
  == Changelog ==
 
 
 
 
 
83
  = 3.2.3 =
84
  * Bug Fix - Sites prevented from logging into the admin panel after the previous release should now be working again.
85
  * Bug Fix - Fixed bug in Parser where links and forms could be written incorrectly.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9NFVADLVUR7A
4
  Tags: security, encryption, ssl, shared ssl, private ssl, public ssl, private ssl, http, https
5
  Requires at least: 3.0
6
+ Tested up to: 3.5
7
+ Stable tag: 3.3.0
8
  License: GPLv3
9
 
10
  WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
11
 
12
  == Description ==
13
+ Read the <a href="http://wordpress.org/extend/plugins/wordpress-https/installation/">Installation Guide</a>.
14
+ If after setting up the plugin you are experiencing issues, please check the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/">FAQ</a>. If you are still unable to resolve your issue, <a href="http://wordpress.org/support/plugin/wordpress-https">start a support topic</a> and I will do my best to assist you.
15
+
16
+ = Development =
17
+ Contribute Code at [https://github.com/Mvied/wordpress-https](https://github.com/Mvied/wordpress-https)
18
+ Contribute Translations at [https://translate.foe-services.de/projects/wordpress-https](https://translate.foe-services.de/projects/wordpress-https)
19
 
20
  == Installation ==
21
  1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory.
22
  1. Activate the plugin through the 'Plugins' menu in WordPress.
23
+ 1. Navigate to the HTTPS settings page in the admin sidebar in the dashboard.
24
+ 1. If you are using a non-default SSL Host for your HTTPS connection (e.g., a subdomain or shared SSL host) enter the entire secure URL into SSL Host. If your installation is located in a folder, you can choose to include it in the URL or not. If you set this to a domain that is not currently serving your WordPress installation over HTTPS and enable Force SSL Admin, you will lock yourself out of your dashboard. Follow instructions in the FAQ to reset the plugin.
25
+ 1. If you would like connections to your admin panel to be secure, enable Force SSL Admin. If you are using a non-default SSL Host, do not use WordPress' built-in FORCE_SSL_ADMIN or FORCE_SSL_LOGIN.
26
+ 1. If you are looking to secure only your admin panel and/or posts and pages you specify, enable Force SSL Exclusively. This will ensure that any content not specified to be secure is always served over HTTP.
27
+ 1. You can individually secure post and pages when editing them by updating the settings located in the HTTPS box on the right sidebar.
28
+ 1. You can use simple text match or regular expressions to specify URL's that should be secure using URL Filters in the WordPress HTTPS settings. Each filter should be on one line.
29
 
30
  == Frequently Asked Questions ==
31
  = How do I fix partially encrypted/mixed content errors? =
45
  </ul>
46
 
47
  = I can't get into my admin panel. How do I fix it? =
48
+ Since it is possible to lock yourself out of the dasboard, WordPress HTTPS comes with a way to reset the plugin's settings. The plugin makes no permanent changes to WordPress, so this will restore all settings to their defaults. Follow directions under "How do I reset the plugin's settings?"
49
+
50
+ = How do I reset the plugin's settings? =
51
  Go to /wp-content/plugins/wordpress-https/wordpress-https.php and uncomment (remove the two forward slashes before) the line below, or go to your wp-config.php file and add this line. Hit any page on your site, and then remove it or comment it out again.
52
  `define('WPHTTPS_RESET', true);`
53
 
54
+ = The settings won't save! =
55
+ Did you reset the plugin following the steps above and forget to comment the line back out or remove it from wp-config.php?
56
+
57
  = How do I make my whole website secure? =
58
  To make your entire website secure, you simply need to change your site url to use HTTPS instead of HTTP. Please read <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">how to change the site url</a>.
59
  Alternatively, you can use URL Filters in the WordPress HTTPS Settings to secure your entire site by putting just '/' as a filter. This will cause any URL with a forward slash to be secure (all of them).
97
  2. Force SSL checkbox added to add/edit posts screen
98
 
99
  == Changelog ==
100
+ = 3.3.0 =
101
+ * Tested with WordPress v3.5.
102
+ * Added German translation and gettext support. Thanks <a href="https://github.com/cfoellmann">Christian Foellmann</a>.
103
+ * Large sites using the default SSL Host (matching the Site URL) should experience a significant performance increase.
104
+ * Added the Access-Control-Allow-Origin header to AJAX calls to allow local HTTP pages make HTTPS AJAX calls.
105
  = 3.2.3 =
106
  * Bug Fix - Sites prevented from logging into the admin panel after the previous release should now be working again.
107
  * Bug Fix - Fixed bug in Parser where links and forms could be written incorrectly.
uninstall.php CHANGED
@@ -28,7 +28,7 @@ $options = array(
28
 
29
  global $wpdb;
30
  if ( is_multisite() && is_network_admin() ) {
31
- $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs));
32
  } else {
33
  $blogs = array($wpdb->blogid);
34
  }
28
 
29
  global $wpdb;
30
  if ( is_multisite() && is_network_admin() ) {
31
+ $blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL));
32
  } else {
33
  $blogs = array($wpdb->blogid);
34
  }
wordpress-https.php CHANGED
@@ -1,11 +1,14 @@
1
  <?php
2
  /**
3
- Plugin Name: WordPress HTTPS
4
- Plugin URI: http://mvied.com/projects/wordpress-https/
5
- Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
6
- Author: Mike Ems
7
- Version: 3.2.3
8
- Author URI: http://mvied.com/
 
 
 
9
  */
10
 
11
  /*
@@ -25,6 +28,8 @@
25
  along with this program. If not, see <http://www.gnu.org/licenses/>.
26
  */
27
 
 
 
28
  function wphttps_autoloader($class) {
29
  $filename = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
30
  @include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $filename;
@@ -41,7 +46,7 @@ spl_autoload_register('wphttps_autoloader');
41
  if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
42
  $wordpress_https = new WordPressHTTPS;
43
  $wordpress_https->setSlug('wordpress-https');
44
- $wordpress_https->setVersion('3.2.3');
45
  $wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
46
  $wordpress_https->setDirectory(dirname(__FILE__));
47
  $wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');
1
  <?php
2
  /**
3
+ Plugin Name: WordPress HTTPS
4
+ Plugin URI: http://mvied.com/projects/wordpress-https/
5
+ Description: WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
6
+ Author: Mike Ems
7
+ Version: 3.3.0
8
+ Author URI: http://mvied.com/
9
+
10
+ Text Domain: wordpress-https
11
+ Domain Path: /languages/
12
  */
13
 
14
  /*
28
  along with this program. If not, see <http://www.gnu.org/licenses/>.
29
  */
30
 
31
+ load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
32
+
33
  function wphttps_autoloader($class) {
34
  $filename = str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
35
  @include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $filename;
46
  if ( function_exists('get_bloginfo') && ! defined('WP_UNINSTALL_PLUGIN') ) {
47
  $wordpress_https = new WordPressHTTPS;
48
  $wordpress_https->setSlug('wordpress-https');
49
+ $wordpress_https->setVersion('3.3.0');
50
  $wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
51
  $wordpress_https->setDirectory(dirname(__FILE__));
52
  $wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');