Version Description
- [Feature] Content Fixer is now optional in the plugin settings. This option should be on by default and is the preferred method to use the plugin.
- [Feature] Output buffering optional via
wordpress_https_parser_ob
filter. #56 - [Bug] External resources being changed to local URL #59
- [Bug] Added RSS permalink to filtered URLs.
- [Bug] Remove network defaults on uninstall.
- [Bug] Fixed displaying of Admin CSS when
site_url
is HTTP. #58 - [Bug] Fixed issues displaying and resetting network settings introduced by 3.4.0.
Download this release
Release Info
Developer | Mvied |
Plugin | WordPress HTTPS (SSL) |
Version | 3.4.1 |
Comparing to | |
See all releases |
Code changes from version 3.3.6 to 3.4.1
- .gitignore +6 -0
- .gitmodules +3 -0
- README.md +39 -0
- admin/css/admin.css +0 -19
- admin/js/metabox.php +0 -26
- admin/templates/metabox/ajax.php +0 -20
- admin/templates/metabox/domain_mapping.php +0 -122
- admin/templates/metabox/filters.php +0 -49
- css/admin.css +11 -0
- {admin/css → css}/network.css +0 -0
- {admin/css → css}/settings.css +56 -36
- {admin/css/images → img}/add.png +0 -0
- {admin/css/images → img}/admin-icon.png +0 -0
- {admin/css/images → img}/admin-icon32.png +0 -0
- {admin/css/images → img}/arrow_left.png +0 -0
- {admin/css/images → img}/arrow_right.png +0 -0
- {admin/css/images → img}/delete.png +0 -0
- {admin/css/images → img}/lock-icon.png +0 -0
- lang/wordpress-https-de_DE.mo +0 -0
- lang/wordpress-https-de_DE.po +351 -0
- lang/wordpress-https-fr_FR.mo +0 -0
- lang/wordpress-https-fr_FR.po +445 -0
- lang/wordpress-https-pt_BR.mo +0 -0
- lang/wordpress-https-pt_BR.po +519 -0
- lang/wordpress-https.pot +401 -0
- languages/wordpress-https-de_DE.mo +0 -0
- languages/wordpress-https-de_DE.po +0 -334
- languages/wordpress-https.pot +0 -352
- lib/Mvied/Base.php +248 -0
- lib/{WordPressHTTPS → Mvied}/Logger.php +21 -12
- lib/Mvied/Model.php +90 -20
- lib/Mvied/Modular.php +190 -0
- lib/Mvied/Plugin.php +0 -438
- lib/Mvied/Plugin/Base.php +38 -0
- lib/Mvied/Plugin/Modular.php +66 -0
- lib/Mvied/Plugin/Module.php +4 -5
- lib/Mvied/Plugin/Module/Interface.php +3 -4
- lib/Mvied/Post.php +190 -0
- lib/Mvied/README.md +7 -0
- lib/Mvied/Theme.php +0 -389
- lib/Mvied/Theme/Base.php +10 -0
- lib/Mvied/Theme/Modular.php +38 -0
- lib/Mvied/Theme/Module.php +5 -6
- lib/Mvied/Theme/Module/Interface.php +3 -4
- lib/{WordPressHTTPS → Mvied}/Url.php +32 -33
- lib/WordPressHTTPS.php +273 -107
- lib/WordPressHTTPS/Module/Admin.php +9 -8
- lib/WordPressHTTPS/Module/Core.php +220 -129
- lib/WordPressHTTPS/Module/DomainMapping.php +0 -116
- lib/WordPressHTTPS/Module/Ecommerce.php +2 -0
- lib/WordPressHTTPS/Module/Network.php +14 -18
- lib/WordPressHTTPS/Module/Parser.php +102 -104
- lib/WordPressHTTPS/Module/Post.php +5 -5
- lib/WordPressHTTPS/Module/Settings.php +45 -63
- lib/WordPressHTTPS/Module/UrlFilters.php +48 -16
- lib/WordPressHTTPS/Module/UrlMapping.php +160 -0
- readme.txt +37 -6
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- uninstall.php +7 -2
- {admin/templates → view}/ajax_message.php +1 -1
- view/metabox/donate.php +6 -0
- view/metabox/donate2.php +2 -0
- view/metabox/feedback.php +1 -0
- {admin/templates → view}/metabox/network.php +29 -23
- {admin/templates → view}/metabox/post.php +3 -1
- {admin/templates → view}/metabox/settings.php +55 -41
- view/metabox/support.php +6 -0
- view/metabox/url_filters.php +158 -0
- view/metabox/url_mapping.php +210 -0
- {admin/templates → view}/network.php +2 -1
- {admin/templates → view}/settings.php +3 -2
- wordpress-https.php +11 -7
.gitignore
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.project
|
2 |
+
.settings/
|
3 |
+
/nbproject/
|
4 |
+
phpunit.xml
|
5 |
+
/tests/
|
6 |
+
.idea
|
.gitmodules
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
[submodule "lib/Mvied"]
|
2 |
+
path = lib/Mvied
|
3 |
+
url = https://Mvied@github.com/Mvied/Mvied.git
|
README.md
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## WordPress HTTPS (SSL) - WordPress Plugin
|
2 |
+
|
3 |
+
[Homepage](http://mvied.com/projects/wordpress-https/) |
|
4 |
+
[WordPress.org](https://wordpress.org/extend/plugins/wordpress-https/) |
|
5 |
+
[GitHub-Repository](https://github.com/Mvied/wordpress-https) |
|
6 |
+
[WordPress.org-SVN](http://plugins.trac.wordpress.org/browser/wordpress-https/) |
|
7 |
+
[Issue Tracker](https://github.com/Mvied/wordpress-https/issues)
|
8 |
+
|
9 |
+
### WordPress
|
10 |
+
* Requires at least: 3.5
|
11 |
+
* Tested up to: 4.9.1
|
12 |
+
|
13 |
+
### About
|
14 |
+
WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
15 |
+
|
16 |
+
### Support
|
17 |
+
Read the <a href="http://wordpress.org/extend/plugins/wordpress-https/installation/">Installation Guide</a>. 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>.
|
18 |
+
If you are still unable to resolve your issue, <a href="http://wordpress.org/support/plugin/wordpress-https">start a support topic</a> and someone from the community may be able to assist you. If you need immediate assistance, I am available for hire. Unfortunately, I do not have time to support the plugin for free.
|
19 |
+
|
20 |
+
### Languages
|
21 |
+
* Help to translate at [https://translate.wordpress.org/projects/wp-plugins/wordpress-https](https://translate.wordpress.org/projects/wp-plugins/wordpress-https)
|
22 |
+
|
23 |
+
### Roadmap
|
24 |
+
* [v3.5.0](https://github.com/mvied/wordpress-https/projects/1)
|
25 |
+
* Automated testing [#57](https://github.com/mvied/wordpress-https/issues/57)
|
26 |
+
* Make output buffering optional [#56](https://github.com/mvied/wordpress-https/issues/56)
|
27 |
+
* Store URL cache in a table to increase performance for large sites [#25](https://github.com/mvied/wordpress-https/issues/25)
|
28 |
+
* Compatibility with multi-lingual websites [#42](https://github.com/mvied/wordpress-https/issues/42)
|
29 |
+
* Cross-browser cookie issues on Shared SSL [#27](https://github.com/mvied/wordpress-https/issues/27)
|
30 |
+
* Multisite links broken [#46](https://github.com/mvied/wordpress-https/issues/46)
|
31 |
+
|
32 |
+
### Resources
|
33 |
+
* [Changelog](https://wordpress.org/extend/plugins/wordpress-https/changelog/)
|
34 |
+
* [Installation](https://wordpress.org/extend/plugins/wordpress-https/installation/)
|
35 |
+
|
36 |
+
### Developers
|
37 |
+
* Mike Ems (Mvied): [Github](https://github.com/Mvied) | [WordPress.org](https://profiles.wordpress.org/Mvied) | [Web](http://mvied.com/)
|
38 |
+
|
39 |
+
### Contributions are always welcome
|
admin/css/admin.css
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
#adminmenu .menu-top.toplevel_page_wordpress-https.current .wp-menu-image,
|
2 |
-
#adminmenu .menu-top.toplevel_page_wordpress-https.wp-has-current-submenu .wp-menu-image,
|
3 |
-
#adminmenu .menu-top.toplevel_page_wordpress-https:hover .wp-menu-image,
|
4 |
-
#adminmenu .menu-top.toplevel_page_wordpress-https.focused .wp-menu-image {
|
5 |
-
/* background-position: -360px -1px; */
|
6 |
-
background-position: 0% 0%;
|
7 |
-
}
|
8 |
-
#adminmenu .menu-top.toplevel_page_wordpress-https .wp-menu-image img {
|
9 |
-
display: none;
|
10 |
-
}
|
11 |
-
|
12 |
-
#adminmenu .menu-top.toplevel_page_wordpress-https div.wp-menu-image {
|
13 |
-
/* background: url('../../../../../wp-admin/images/menu.png') no-repeat scroll -360px -33px; */
|
14 |
-
background: url('images/admin-icon.png') no-repeat 0% 100%;;
|
15 |
-
}
|
16 |
-
#side-sortables #wordpress-https .inside {
|
17 |
-
padding: 0;
|
18 |
-
margin: 0;
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/metabox.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once(realpath(dirname(__FILE__) . '/../../../../..') . '/wp-load.php');
|
4 |
-
|
5 |
-
// Disable errors
|
6 |
-
error_reporting(0);
|
7 |
-
|
8 |
-
// Set headers
|
9 |
-
header("Status: 200");
|
10 |
-
header("HTTP/1.1 200 OK");
|
11 |
-
header('Content-Type: text/html');
|
12 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
13 |
-
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
14 |
-
header('Pragma: no-cache');
|
15 |
-
header("Vary: Accept-Encoding");
|
16 |
-
|
17 |
-
if ( ! wp_verify_nonce($_POST['_nonce'], 'wordpress-https') ) {
|
18 |
-
exit;
|
19 |
-
}
|
20 |
-
|
21 |
-
$content = WordPressHTTPS_Url::fromString( $_POST['url'] )->getContent();
|
22 |
-
|
23 |
-
if ( $content ) {
|
24 |
-
echo $content;
|
25 |
-
}
|
26 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/templates/metabox/ajax.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$nonce = wp_create_nonce($this->getPlugin()->getSlug());
|
3 |
-
?><script type="text/javascript">
|
4 |
-
jQuery(document).ready(function($) {
|
5 |
-
var loading = $('<img alt="Loading..." src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="loading" />');
|
6 |
-
|
7 |
-
$('#<?php echo $metabox['id']; ?> .handlediv').append( loading );
|
8 |
-
$('#<?php echo $metabox['id']; ?> .handlediv .loading').fadeIn('fast');
|
9 |
-
|
10 |
-
$.post(ajaxurl, {
|
11 |
-
action : '<?php echo $this->getPlugin()->getSlug(); ?>_ajax_metabox',
|
12 |
-
id : '<?php echo $metabox['id']; ?>',
|
13 |
-
url : '<?php echo $metabox['args']['url']; ?>',
|
14 |
-
_nonce : '<?php echo $nonce; ?>'
|
15 |
-
}, function(response) {
|
16 |
-
$('#<?php echo $metabox['id']; ?> .inside').html(response);
|
17 |
-
$('#<?php echo $metabox['id']; ?> .handlediv .loading').fadeIn(0).fadeOut('fast');
|
18 |
-
});
|
19 |
-
});
|
20 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/templates/metabox/domain_mapping.php
DELETED
@@ -1,122 +0,0 @@
|
|
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 wp_nonce_field($this->getPlugin()->getSlug()); ?>
|
3 |
-
<input type="hidden" name="action" id="action" value="" />
|
4 |
-
|
5 |
-
<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>
|
6 |
-
|
7 |
-
<table class="form-table" id="domain_mapping">
|
8 |
-
<thead>
|
9 |
-
</thead>
|
10 |
-
<?php
|
11 |
-
$ssl_host_mapping = ( is_array($this->getPlugin()->getSetting('ssl_host_mapping')) ? $this->getPlugin()->getSetting('ssl_host_mapping') : array() );
|
12 |
-
foreach( $ssl_host_mapping as $http_domain => $https_domain ) {
|
13 |
-
?>
|
14 |
-
<tr valign="top" class="domain_mapping_row">
|
15 |
-
<td class="http_scheme">
|
16 |
-
<span class="label">http://</span>
|
17 |
-
</td>
|
18 |
-
<td class="http_domain">
|
19 |
-
<input type="text" name="http_domain[]" value="<?php echo $http_domain; ?>" />
|
20 |
-
</td>
|
21 |
-
<td class="arrow">
|
22 |
-
<span class="label">></span>
|
23 |
-
</td>
|
24 |
-
<td class="https_scheme">
|
25 |
-
<span class="label">https://</span>
|
26 |
-
</td>
|
27 |
-
<td class="https_domain">
|
28 |
-
<input type="text" name="https_domain[]" value="<?php echo $https_domain; ?>" />
|
29 |
-
</td>
|
30 |
-
<td class="controls">
|
31 |
-
<a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
32 |
-
<a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
33 |
-
</td>
|
34 |
-
</tr>
|
35 |
-
|
36 |
-
<?php } ?>
|
37 |
-
<tr valign="top" class="domain_mapping_row">
|
38 |
-
<td class="http_scheme">
|
39 |
-
<span class="label">http://</span>
|
40 |
-
</td>
|
41 |
-
<td class="http_domain">
|
42 |
-
<input type="text" name="http_domain[]" value="" />
|
43 |
-
</td>
|
44 |
-
<td class="arrow">
|
45 |
-
<span class="label">></span>
|
46 |
-
</td>
|
47 |
-
<td class="https_scheme">
|
48 |
-
<span class="label">https://</span>
|
49 |
-
</td>
|
50 |
-
<td class="https_domain">
|
51 |
-
<input type="text" name="https_domain[]" value="" />
|
52 |
-
</td>
|
53 |
-
<td class="controls">
|
54 |
-
<a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
55 |
-
<a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
56 |
-
</td>
|
57 |
-
</tr>
|
58 |
-
</table>
|
59 |
-
|
60 |
-
<p class="button-controls">
|
61 |
-
<input type="submit" name="domain-mapping-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="domain-mapping-save" />
|
62 |
-
<input type="submit" name="domain-mapping-reset" value="<?php _e('Reset','wordpress-https'); ?>" class="button-secondary" id="domain-mapping-reset" />
|
63 |
-
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
64 |
-
</p>
|
65 |
-
</form>
|
66 |
-
<script type="text/javascript">
|
67 |
-
jQuery(document).ready(function($) {
|
68 |
-
var form = $('#<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_form').first();
|
69 |
-
$('#domain-mapping-save').click(function() {
|
70 |
-
$(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_save');
|
71 |
-
});
|
72 |
-
$('#domain-mapping-reset').click(function() {
|
73 |
-
$(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_reset');
|
74 |
-
});
|
75 |
-
$(form).submit(function(e) {
|
76 |
-
e.preventDefault();
|
77 |
-
$(form).find('.submit-waiting').show();
|
78 |
-
$.post(ajaxurl, $(form).serialize(), function(response) {
|
79 |
-
$(form).find('.submit-waiting').hide();
|
80 |
-
$('#message-body').html(response).fadeOut(0).fadeIn().delay(5000).fadeOut();
|
81 |
-
});
|
82 |
-
});
|
83 |
-
|
84 |
-
if ( $('#domain_mapping tr').length <= 1 ) {
|
85 |
-
$('#domain_mapping .remove').hide();
|
86 |
-
} else {
|
87 |
-
$('#domain_mapping .remove').show();
|
88 |
-
$('#domain_mapping .add').hide();
|
89 |
-
$('#domain_mapping tr:last-child .add').show();
|
90 |
-
}
|
91 |
-
|
92 |
-
$('.domain_mapping_row .add').live('click', function(e) {
|
93 |
-
e.preventDefault();
|
94 |
-
var row = $(this).parents('tr').clone();
|
95 |
-
row.find('input').val('');
|
96 |
-
$(this).parents('table').append(row);
|
97 |
-
$(this).hide();
|
98 |
-
$('#domain_mapping .remove').show();
|
99 |
-
return false;
|
100 |
-
});
|
101 |
-
|
102 |
-
$('.domain_mapping_row .remove').live('click', function(e) {
|
103 |
-
e.preventDefault();
|
104 |
-
$(this).parents('tr').remove();
|
105 |
-
if ( $('#domain_mapping tr').length <= 1 ) {
|
106 |
-
$('#domain_mapping .remove').hide();
|
107 |
-
} else {
|
108 |
-
$('#domain_mapping .remove').show();
|
109 |
-
}
|
110 |
-
$('#domain_mapping .add').hide();
|
111 |
-
$('#domain_mapping tr:last-child .add').show();
|
112 |
-
return false;
|
113 |
-
});
|
114 |
-
|
115 |
-
$('#domain_mapping-reset').click(function(e, el) {
|
116 |
-
if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS domain mappings?','wordpress-https'); ?>') ) {
|
117 |
-
e.preventDefault();
|
118 |
-
return false;
|
119 |
-
}
|
120 |
-
});
|
121 |
-
});
|
122 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/templates/metabox/filters.php
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<form name="<?php echo $this->getPlugin()->getSlug(); ?>_filters_form" id="<?php echo $this->getPlugin()->getSlug(); ?>_filters_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
2 |
-
<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
|
3 |
-
<input type="hidden" name="action" id="action" value="" />
|
4 |
-
|
5 |
-
<table class="form-table">
|
6 |
-
<tr valign="top" id="secure_filter_row">
|
7 |
-
<th scope="row">
|
8 |
-
<?php _e('Secure Filters','wordpress-https'); ?>
|
9 |
-
<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>
|
10 |
-
</th>
|
11 |
-
<td>
|
12 |
-
<textarea name="secure_filter" id="secure_filter"><?php echo implode("\n", $this->getPlugin()->getSetting('secure_filter')); ?></textarea>
|
13 |
-
</td>
|
14 |
-
</tr>
|
15 |
-
</table>
|
16 |
-
|
17 |
-
<p class="button-controls">
|
18 |
-
<input type="submit" name="filters-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="filters-save" />
|
19 |
-
<input type="submit" name="filters-reset" value="<?php _e('Reset','wordpress-https'); ?>" class="button-secondary" id="filters-reset" />
|
20 |
-
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
21 |
-
</p>
|
22 |
-
</form>
|
23 |
-
|
24 |
-
<script type="text/javascript">
|
25 |
-
jQuery(document).ready(function($) {
|
26 |
-
var form = $('#<?php echo $this->getPlugin()->getSlug(); ?>_filters_form').first();
|
27 |
-
$('#filters-save').click(function() {
|
28 |
-
$(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_filters_save');
|
29 |
-
});
|
30 |
-
$('#filters-reset').click(function() {
|
31 |
-
$(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_filters_reset');
|
32 |
-
});
|
33 |
-
$(form).submit(function(e) {
|
34 |
-
e.preventDefault();
|
35 |
-
$(form).find('.submit-waiting').show();
|
36 |
-
$.post(ajaxurl, $(form).serialize(), function(response) {
|
37 |
-
$(form).find('.submit-waiting').hide();
|
38 |
-
$('#message-body').html(response).fadeOut(0).fadeIn().delay(5000).fadeOut();
|
39 |
-
});
|
40 |
-
});
|
41 |
-
|
42 |
-
$('#filters-reset').click(function(e, el) {
|
43 |
-
if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS filters?','wordpress-https'); ?>') ) {
|
44 |
-
e.preventDefault();
|
45 |
-
return false;
|
46 |
-
}
|
47 |
-
});
|
48 |
-
});
|
49 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/admin.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#adminmenu .menu-top.toplevel_page_wordpress-https .wp-menu-image img {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
|
5 |
+
#adminmenu .menu-top.toplevel_page_wordpress-https div.wp-menu-image:before {
|
6 |
+
content: "\f160";
|
7 |
+
}
|
8 |
+
#side-sortables #wordpress-https .inside {
|
9 |
+
padding: 0;
|
10 |
+
margin: 0;
|
11 |
+
}
|
{admin/css → css}/network.css
RENAMED
File without changes
|
{admin/css → css}/settings.css
RENAMED
@@ -11,10 +11,18 @@
|
|
11 |
margin: 0;
|
12 |
}
|
13 |
|
14 |
-
#wphttps-main #icon-options-https {
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
-
|
18 |
#wphttps-main .meta-box-sortables {
|
19 |
margin: 0 8px;
|
20 |
}
|
@@ -59,9 +67,6 @@
|
|
59 |
margin: 5px auto 13px auto;
|
60 |
}
|
61 |
|
62 |
-
#wphttps-main input[type="text"] {
|
63 |
-
margin: -5px 0 0 0;
|
64 |
-
}
|
65 |
#wphttps-main input[type="checkbox"] {
|
66 |
margin: 7px 0 0 0;
|
67 |
vertical-align: bottom;
|
@@ -87,19 +92,25 @@
|
|
87 |
margin: 5px 5px 0 0;
|
88 |
float: left;
|
89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
#wphttps-main #settings-reset,
|
|
|
91 |
#wphttps-main #network-settings-reset,
|
92 |
-
#wphttps-main #filters-reset,
|
93 |
-
#wphttps-main #
|
94 |
float: left;
|
95 |
margin-right: 10px;
|
96 |
}
|
97 |
-
#wphttps-main #ssl_port_label {
|
98 |
-
display: inline-block;
|
99 |
-
padding-top: 10px;
|
100 |
-
}
|
101 |
#wphttps-main #ssl_host {
|
102 |
-
width:
|
|
|
103 |
}
|
104 |
#wphttps-main #exclusive_https_row label {
|
105 |
padding-top: 5px;
|
@@ -135,58 +146,67 @@
|
|
135 |
#wphttps-main #ssl_proxy_row p.description {
|
136 |
width: 65%;
|
137 |
}
|
138 |
-
#wphttps-main #
|
139 |
-
|
|
|
140 |
}
|
141 |
-
#wphttps-main #
|
142 |
-
|
|
|
|
|
143 |
}
|
144 |
-
#wphttps-main #
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
|
|
148 |
}
|
149 |
-
#wphttps-main #
|
150 |
-
|
|
|
|
|
151 |
}
|
152 |
-
#wphttps-main #
|
153 |
-
#wphttps-main #domain_mapping .https_domain .label {
|
154 |
display: block;
|
155 |
float: left;
|
156 |
text-align: right;
|
157 |
padding-right: 2%;
|
158 |
-
}
|
159 |
-
#wphttps-main #domain_mapping input {
|
160 |
-
width: 96%;
|
161 |
-
padding-left: 2%;
|
162 |
-
padding-right: 2%;
|
163 |
}
|
164 |
-
#wphttps-main #
|
|
|
|
|
|
|
|
|
|
|
165 |
display: block;
|
166 |
height: 16px;
|
167 |
width: 16px;
|
168 |
overflow: hidden;
|
169 |
text-indent: -1000em;
|
170 |
float: left;
|
171 |
-
background: url(
|
172 |
}
|
173 |
-
#wphttps-main #
|
|
|
174 |
display: block;
|
175 |
height: 16px;
|
176 |
width: 16px;
|
177 |
overflow: hidden;
|
178 |
text-indent: -1000em;
|
179 |
float: left;
|
180 |
-
background: url(
|
181 |
}
|
182 |
-
#wphttps-main #
|
183 |
display: block;
|
184 |
height: 16px;
|
185 |
width: 16px;
|
|
|
186 |
overflow: hidden;
|
187 |
text-indent: -1000em;
|
188 |
-
background: url(
|
189 |
margin: 0 auto;
|
|
|
190 |
}
|
191 |
|
192 |
#wphttps-main #regex-help {
|
11 |
margin: 0;
|
12 |
}
|
13 |
|
14 |
+
#wphttps-main #icon-options-https.icon32 {
|
15 |
+
display: block;
|
16 |
+
float: left;
|
17 |
+
height: 32px;
|
18 |
+
width: 32px;
|
19 |
+
margin-left: 5px;
|
20 |
+
background: url(../img/admin-icon32.png) no-repeat 100% 100%;
|
21 |
+
}
|
22 |
+
.wrap [class$=icon32]+h2 {
|
23 |
+
line-height: 1em;
|
24 |
+
padding: 5px 0 0 40px;
|
25 |
}
|
|
|
26 |
#wphttps-main .meta-box-sortables {
|
27 |
margin: 0 8px;
|
28 |
}
|
67 |
margin: 5px auto 13px auto;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
70 |
#wphttps-main input[type="checkbox"] {
|
71 |
margin: 7px 0 0 0;
|
72 |
vertical-align: bottom;
|
92 |
margin: 5px 5px 0 0;
|
93 |
float: left;
|
94 |
}
|
95 |
+
#wphttps-main .form-table td fieldset label {
|
96 |
+
width: 100%;
|
97 |
+
}
|
98 |
+
|
99 |
+
#wphttps-main .url_filters h4 {
|
100 |
+
margin: 0;
|
101 |
+
}
|
102 |
+
|
103 |
#wphttps-main #settings-reset,
|
104 |
+
#wphttps-main #settings-cache-reset,
|
105 |
#wphttps-main #network-settings-reset,
|
106 |
+
#wphttps-main #url-filters-reset,
|
107 |
+
#wphttps-main #url-mapping-reset {
|
108 |
float: left;
|
109 |
margin-right: 10px;
|
110 |
}
|
|
|
|
|
|
|
|
|
111 |
#wphttps-main #ssl_host {
|
112 |
+
width: 80%;
|
113 |
+
margin-top: 3px;
|
114 |
}
|
115 |
#wphttps-main #exclusive_https_row label {
|
116 |
padding-top: 5px;
|
146 |
#wphttps-main #ssl_proxy_row p.description {
|
147 |
width: 65%;
|
148 |
}
|
149 |
+
#wphttps-main #url_mapping td,
|
150 |
+
#wphttps-main .url_filters td {
|
151 |
+
padding: 0 3px;
|
152 |
}
|
153 |
+
#wphttps-main #url_mapping td.sep {
|
154 |
+
line-height: 26px;
|
155 |
+
width: 1%;
|
156 |
+
text-align: center;
|
157 |
}
|
158 |
+
#wphttps-main #url_mapping td.scheme {
|
159 |
+
width: 1%;
|
160 |
+
text-align: right;
|
161 |
+
}
|
162 |
+
#wphttps-main #url_mapping td.scheme select {
|
163 |
+
width: 60px;
|
164 |
}
|
165 |
+
#wphttps-main #url_mapping td.controls,
|
166 |
+
#wphttps-main .url_filters td.controls {
|
167 |
+
padding: 4px 0px;
|
168 |
+
width: 6%;
|
169 |
}
|
170 |
+
#wphttps-main #url_mapping .host .label {
|
|
|
171 |
display: block;
|
172 |
float: left;
|
173 |
text-align: right;
|
174 |
padding-right: 2%;
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
+
#wphttps-main #url_mapping input,
|
177 |
+
#wphttps-main .url_filters input {
|
178 |
+
width: 100%;
|
179 |
+
}
|
180 |
+
#wphttps-main #url_mapping .add,
|
181 |
+
#wphttps-main .url_filters .add {
|
182 |
display: block;
|
183 |
height: 16px;
|
184 |
width: 16px;
|
185 |
overflow: hidden;
|
186 |
text-indent: -1000em;
|
187 |
float: left;
|
188 |
+
background: url(../img/add.png) no-repeat 50% 50%;
|
189 |
}
|
190 |
+
#wphttps-main #url_mapping .remove,
|
191 |
+
#wphttps-main .url_filters .remove {
|
192 |
display: block;
|
193 |
height: 16px;
|
194 |
width: 16px;
|
195 |
overflow: hidden;
|
196 |
text-indent: -1000em;
|
197 |
float: left;
|
198 |
+
background: url(../img/delete.png) no-repeat 50% 50%;
|
199 |
}
|
200 |
+
#wphttps-main #url_mapping .url-sep .label {
|
201 |
display: block;
|
202 |
height: 16px;
|
203 |
width: 16px;
|
204 |
+
line-height: 16px;
|
205 |
overflow: hidden;
|
206 |
text-indent: -1000em;
|
207 |
+
background: url(../img/arrow_right.png) no-repeat 50% 50%;
|
208 |
margin: 0 auto;
|
209 |
+
padding: 5px 10px;
|
210 |
}
|
211 |
|
212 |
#wphttps-main #regex-help {
|
{admin/css/images → img}/add.png
RENAMED
File without changes
|
{admin/css/images → img}/admin-icon.png
RENAMED
File without changes
|
{admin/css/images → img}/admin-icon32.png
RENAMED
File without changes
|
{admin/css/images → img}/arrow_left.png
RENAMED
File without changes
|
{admin/css/images → img}/arrow_right.png
RENAMED
File without changes
|
{admin/css/images → img}/delete.png
RENAMED
File without changes
|
{admin/css/images → img}/lock-icon.png
RENAMED
File without changes
|
lang/wordpress-https-de_DE.mo
ADDED
Binary file
|
lang/wordpress-https-de_DE.po
ADDED
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: 2013-09-10 22:59:42+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 |
+
#: view/metabox/settings.php:35
|
14 |
+
msgid "Always use HTTPS while in the admin panel. This setting is identical to %s."
|
15 |
+
msgstr "HTTPS immer nutzen für den Admin-Bereich. Diese Einstellung ist identisch mit %s."
|
16 |
+
|
17 |
+
#: view/metabox/settings.php:47
|
18 |
+
msgid "Any page that is not secured via %s or URL Filters will be redirected to HTTP."
|
19 |
+
msgstr "Jede Seite, die nicht per %s oder URL-Filter gesichert sind werden auf HTTP umgeleitet."
|
20 |
+
|
21 |
+
#: view/metabox/settings.php:47
|
22 |
+
msgid "Force SSL"
|
23 |
+
msgstr "Force SSL"
|
24 |
+
|
25 |
+
#: view/metabox/settings.php:110
|
26 |
+
msgid "Purge Cache"
|
27 |
+
msgstr "Cache leeren"
|
28 |
+
|
29 |
+
#: lib/WordPressHTTPS/Module/Network.php:57
|
30 |
+
msgid "Network Settings"
|
31 |
+
msgstr "Netwerk-Einstellungen"
|
32 |
+
|
33 |
+
#: lib/WordPressHTTPS/Module/Network.php:66
|
34 |
+
#: lib/WordPressHTTPS/Module/Settings.php:108
|
35 |
+
msgid "Loading..."
|
36 |
+
msgstr "Lade..."
|
37 |
+
|
38 |
+
#: lib/WordPressHTTPS/Module/Settings.php:63
|
39 |
+
msgid "General Settings"
|
40 |
+
msgstr "Allgemeine Einstellungen"
|
41 |
+
|
42 |
+
#: lib/WordPressHTTPS/Module/Settings.php:72
|
43 |
+
msgid "Developer Updates"
|
44 |
+
msgstr "Entwickler-Updates"
|
45 |
+
|
46 |
+
#: lib/WordPressHTTPS/Module/Settings.php:81
|
47 |
+
msgid "Support"
|
48 |
+
msgstr "Support"
|
49 |
+
|
50 |
+
#: lib/WordPressHTTPS/Module/Settings.php:90
|
51 |
+
msgid "Feedback"
|
52 |
+
msgstr "Feedback"
|
53 |
+
|
54 |
+
#: lib/WordPressHTTPS/Module/Settings.php:99
|
55 |
+
msgid "Donate"
|
56 |
+
msgstr "Donate"
|
57 |
+
|
58 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:88
|
59 |
+
msgid "URL Filters"
|
60 |
+
msgstr "URL Filter"
|
61 |
+
|
62 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:94
|
63 |
+
msgid "URL Mapping"
|
64 |
+
msgstr "URL-Mapping"
|
65 |
+
|
66 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
67 |
+
msgid "Add URL Mapping"
|
68 |
+
msgstr "URL-Mapping hinzufügen"
|
69 |
+
|
70 |
+
#: view/metabox/url_mapping.php:142
|
71 |
+
msgid "Are you sure you want to reset all WordPress HTTPS url mappings?"
|
72 |
+
msgstr "Bist du sicher, dass du alle URL-Mappings für WordPress HTTPS zurücksetzen willst?"
|
73 |
+
|
74 |
+
#: lib/WordPressHTTPS/Module/Post.php:42 view/network.php:10
|
75 |
+
#: view/settings.php:10
|
76 |
+
msgid "HTTPS"
|
77 |
+
msgstr "HTTPS"
|
78 |
+
|
79 |
+
#: view/settings.php:26
|
80 |
+
msgid "Expressions"
|
81 |
+
msgstr "Ausdrücke"
|
82 |
+
|
83 |
+
#: view/settings.php:30
|
84 |
+
msgid "A single character: a, b, or c"
|
85 |
+
msgstr "Jedes einzelne Zeichen: a, b, oder c "
|
86 |
+
|
87 |
+
#: view/settings.php:34
|
88 |
+
msgid "Any single character <em>but</em> a, b, or c"
|
89 |
+
msgstr "Jedes einzelne Zeichen <em>außer</em> a, b, oder c"
|
90 |
+
|
91 |
+
#: view/settings.php:38
|
92 |
+
msgid "Any character in the range a-z"
|
93 |
+
msgstr "Jedes Zeichen im Bereich a-z"
|
94 |
+
|
95 |
+
#: view/settings.php:42
|
96 |
+
msgid "Any character in the range a-z or A-Z (any alphabetical character)"
|
97 |
+
msgstr "Jedes Zeichen im Bereich a-z oder A-Z (alle alphabetischen Zeichen)"
|
98 |
+
|
99 |
+
#: view/settings.php:46
|
100 |
+
msgid "Any whitespace character [ \\t\\n\\r\\f\\v]"
|
101 |
+
msgstr "Jedes Leerzeichen [ \\t\\n\\r\\f\\v]"
|
102 |
+
|
103 |
+
#: view/settings.php:50
|
104 |
+
msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]"
|
105 |
+
msgstr "Jedes Nicht-Leerzeichen [^ \\t\\n\\r\\f\\v]"
|
106 |
+
|
107 |
+
#: view/settings.php:54
|
108 |
+
msgid "Any digit [0-9]"
|
109 |
+
msgstr "Jede Ziffer [0-9]"
|
110 |
+
|
111 |
+
#: view/settings.php:58
|
112 |
+
msgid "Any non-digit [^0-9]"
|
113 |
+
msgstr "Jede Nicht-Ziffer [^0-9]"
|
114 |
+
|
115 |
+
#: view/settings.php:62
|
116 |
+
msgid "Any word character [a-zA-Z0-9_]"
|
117 |
+
msgstr "Jedes Wort-Zeichen [a-zA-Z0-9_]"
|
118 |
+
|
119 |
+
#: view/settings.php:66
|
120 |
+
msgid "Any non-word character [^a-zA-Z0-9_]"
|
121 |
+
msgstr "Jedes Nicht-Wort-Zeichen [^a-zA-Z0-9_]"
|
122 |
+
|
123 |
+
#: view/settings.php:70
|
124 |
+
msgid "A word boundary between \\w and \\W"
|
125 |
+
msgstr "Eine Wortgrenze zwischen \\w und \\W"
|
126 |
+
|
127 |
+
#: view/settings.php:74
|
128 |
+
msgid "A position that is not a word boundary"
|
129 |
+
msgstr "Eine Position, die keine Wortgrenze ist"
|
130 |
+
|
131 |
+
#: view/settings.php:78
|
132 |
+
msgid "Alternation: matches either the subexpression to the left or to the right"
|
133 |
+
msgstr "Wechsel: Entspricht entweder des Unter-Ausdrucks zur Linken oder zur Rechten"
|
134 |
+
|
135 |
+
#: view/settings.php:82
|
136 |
+
msgid "Grouping: group all together for repetition operators"
|
137 |
+
msgstr "Bündelung: Gruppiere alle für Wiederholungsoperatoren"
|
138 |
+
|
139 |
+
#: view/settings.php:86
|
140 |
+
msgid "Beginning of the string"
|
141 |
+
msgstr "Anfang des Strings"
|
142 |
+
|
143 |
+
#: view/settings.php:90
|
144 |
+
msgid "End of the string"
|
145 |
+
msgstr "Ende des Strings"
|
146 |
+
|
147 |
+
#: view/settings.php:93
|
148 |
+
msgid "Repetition Operators"
|
149 |
+
msgstr "Wiederholungs Operatoren"
|
150 |
+
|
151 |
+
#: view/settings.php:97
|
152 |
+
msgid "Match the previous item at least <em>n</em> times but no more than <em>m</em> times"
|
153 |
+
msgstr "Entspricht einer Häufigkeit von mindestens <em>n</em> aber nicht mehr als <em>m</em>"
|
154 |
+
|
155 |
+
#: view/settings.php:101
|
156 |
+
msgid "Match the previous item <em>n</em> or more times"
|
157 |
+
msgstr "Entspricht einer Häufigkeit von <em>n</em> oder mehr"
|
158 |
+
|
159 |
+
#: view/settings.php:105
|
160 |
+
msgid "Match exactly <em>n</em> occurrences of the previous item"
|
161 |
+
msgstr "Entspricht einer Häufigkeit von genau <em>n</em> des vorherigen Elements"
|
162 |
+
|
163 |
+
#: view/settings.php:109
|
164 |
+
msgid "Match 0 or 1 occurrences of the previous item {0,1}"
|
165 |
+
msgstr "Entspricht einer Häufigkeit von 0 oder 1 des vorherigen Elements {0,1} "
|
166 |
+
|
167 |
+
#: view/settings.php:113
|
168 |
+
msgid "Match 1 or more occurrences of the previous item {1,}"
|
169 |
+
msgstr "Entspricht einer Häufigkeit von 1 oder mehr des vorherigen Elements {1,}"
|
170 |
+
|
171 |
+
#: view/settings.php:117
|
172 |
+
msgid "Match 0 or more occurrences of the previous item {0,}"
|
173 |
+
msgstr "Entspricht einer Häufigkeit von 0 oder mehr des vorherigen Elements {0,} "
|
174 |
+
|
175 |
+
#: lib/WordPressHTTPS/Module/Network.php:121
|
176 |
+
msgid "Network settings saved."
|
177 |
+
msgstr "Netzwerk-Einstellungen gespeichert."
|
178 |
+
|
179 |
+
#: lib/WordPressHTTPS/Module/Settings.php:199
|
180 |
+
msgid "Cache reset."
|
181 |
+
msgstr "Cache geleert."
|
182 |
+
|
183 |
+
#: lib/WordPressHTTPS/Module/Settings.php:222
|
184 |
+
msgid "Settings reset."
|
185 |
+
msgstr "Einstellungen zurücksetzen."
|
186 |
+
|
187 |
+
#: lib/WordPressHTTPS/Module/Settings.php:245
|
188 |
+
msgid "Settings saved."
|
189 |
+
msgstr "Einstellungen gespeichert."
|
190 |
+
|
191 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:108
|
192 |
+
msgid "URL Filters reset."
|
193 |
+
msgstr "URL Filters zurücksetzen."
|
194 |
+
|
195 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:129
|
196 |
+
msgid "URL Filters saved."
|
197 |
+
msgstr "URL Filters gespeichert."
|
198 |
+
|
199 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:114
|
200 |
+
msgid "URL Mapping reset."
|
201 |
+
msgstr "URL-Mapping zurückgesetzt."
|
202 |
+
|
203 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:134
|
204 |
+
msgid "URL Mapping saved."
|
205 |
+
msgstr "URL-Mapping gespeichert."
|
206 |
+
|
207 |
+
#: view/metabox/network.php:11
|
208 |
+
msgid "Blog"
|
209 |
+
msgstr "Seite"
|
210 |
+
|
211 |
+
#: view/metabox/network.php:12 view/metabox/settings.php:19
|
212 |
+
msgid "SSL Host"
|
213 |
+
msgstr "SSL Host"
|
214 |
+
|
215 |
+
#: view/metabox/network.php:13
|
216 |
+
msgid "Force SSL Admin"
|
217 |
+
msgstr "Force SSL Admin"
|
218 |
+
|
219 |
+
#: view/metabox/network.php:14 view/metabox/settings.php:41
|
220 |
+
msgid "Force SSL Exclusively"
|
221 |
+
msgstr "Force SSL Exklusiv"
|
222 |
+
|
223 |
+
#: view/metabox/network.php:15 view/metabox/settings.php:53
|
224 |
+
msgid "Remove Unsecure Elements"
|
225 |
+
msgstr "Unsichere Elemente entfernen"
|
226 |
+
|
227 |
+
#: view/metabox/network.php:16 view/metabox/settings.php:65
|
228 |
+
msgid "Debug Mode"
|
229 |
+
msgstr "Debug Mode"
|
230 |
+
|
231 |
+
#: view/metabox/network.php:17 view/metabox/settings.php:77
|
232 |
+
msgid "Proxy"
|
233 |
+
msgstr "Proxy"
|
234 |
+
|
235 |
+
#: view/metabox/network.php:18 view/metabox/settings.php:90
|
236 |
+
msgid "Admin Menu Location"
|
237 |
+
msgstr "Position des Admin-Menüs"
|
238 |
+
|
239 |
+
#: view/metabox/network.php:40 view/metabox/network.php:72
|
240 |
+
#: view/metabox/settings.php:82
|
241 |
+
msgid "Auto"
|
242 |
+
msgstr "Auto"
|
243 |
+
|
244 |
+
#: view/metabox/network.php:46 view/metabox/network.php:78
|
245 |
+
#: view/metabox/settings.php:94
|
246 |
+
msgid "Sidebar"
|
247 |
+
msgstr "Seitenleiste"
|
248 |
+
|
249 |
+
#: view/metabox/network.php:47 view/metabox/network.php:79
|
250 |
+
#: view/metabox/settings.php:97
|
251 |
+
msgid "Settings"
|
252 |
+
msgstr "Einstellungen"
|
253 |
+
|
254 |
+
#: view/metabox/network.php:89 view/metabox/settings.php:111
|
255 |
+
#: view/metabox/url_filters.php:67 view/metabox/url_mapping.php:132
|
256 |
+
msgid "Waiting..."
|
257 |
+
msgstr "Warte..."
|
258 |
+
|
259 |
+
#: view/metabox/post.php:26
|
260 |
+
msgid "This post's parent page '%s' has 'Secure child posts' enabled."
|
261 |
+
msgstr "Die Eltern-Seite '%s' dieses Beitrags hat 'Sichere Unter-Artikel' aktiviert."
|
262 |
+
|
263 |
+
#: view/metabox/post.php:26
|
264 |
+
msgid "Secure post"
|
265 |
+
msgstr "Sicherer Artikel"
|
266 |
+
|
267 |
+
#: view/metabox/post.php:29
|
268 |
+
msgid "Secure child posts"
|
269 |
+
msgstr "Sichere Unter-Artikel"
|
270 |
+
|
271 |
+
#: view/metabox/settings.php:29
|
272 |
+
msgid "Force SSL Administration"
|
273 |
+
msgstr "Force SSL Administration"
|
274 |
+
|
275 |
+
#: view/metabox/settings.php:59
|
276 |
+
msgid "Remove elements inaccessible over HTTPS. May break other plugins' functionality."
|
277 |
+
msgstr "Entferne alle Elemente unerreichbar über HTTPS. Könnte Funktionen anderer Plugins beeinträchtigen."
|
278 |
+
|
279 |
+
#: view/metabox/settings.php:71
|
280 |
+
msgid "Outputs debug information to the browser's console."
|
281 |
+
msgstr "Gibt Debug-Informationen in der Konsole des Browsers aus."
|
282 |
+
|
283 |
+
#: view/metabox/settings.php:85
|
284 |
+
msgid "If you think you may behind a proxy, set to Auto. Otherwise, leave the setting on No."
|
285 |
+
msgstr "Wenn Sie denken, dass Sie sich hinter einem Proxy befinden, wählen Sie Auto. Ansonsten lassen Sie es auf Nein."
|
286 |
+
|
287 |
+
#: view/metabox/settings.php:129
|
288 |
+
msgid "Are you sure you want to set your SSL Host to '%s'? An incorrect value here may render your admin dashboard unusable until you reset the plugin's settings following the directions in the FAQ."
|
289 |
+
msgstr "Sind Sie sicher, dass Sie den SSL-Host auf '%s' setzen wollen? Ein fehlerhafter Wert an dieser Stelle blockiert möglicherweise den Zugriff auf den Admin-Bereich bis die Einstellungen des Plugins zurückgesetzt wurden. Siehe FAQ."
|
290 |
+
|
291 |
+
#: view/metabox/settings.php:141
|
292 |
+
msgid "Are you sure you want to reset all WordPress HTTPS settings?"
|
293 |
+
msgstr "Sind Sie sicher, dass Sie alle WordPress HTTPS Einstellungen zurücksetzen wollen?"
|
294 |
+
|
295 |
+
#: view/metabox/url_filters.php:8
|
296 |
+
msgid "URL Filters allow you to specify what content should always be secure or unsecure using simple string comparisons or %sregular expressions%s."
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: view/metabox/url_filters.php:8 view/metabox/url_mapping.php:12
|
300 |
+
msgid "Regular Expressions Help"
|
301 |
+
msgstr "Hilfe zu Regulären Ausdrücken"
|
302 |
+
|
303 |
+
#: view/metabox/url_filters.php:12
|
304 |
+
msgid "Secure Filters"
|
305 |
+
msgstr "Sicherheits-Filter"
|
306 |
+
|
307 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
308 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
309 |
+
msgid "Remove URL Filter"
|
310 |
+
msgstr "URL Filter entfernen"
|
311 |
+
|
312 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
313 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
314 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
315 |
+
msgid "Remove"
|
316 |
+
msgstr "Entfernen"
|
317 |
+
|
318 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
319 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
320 |
+
msgid "Add URL Filter"
|
321 |
+
msgstr "URL Filter hinzufügen"
|
322 |
+
|
323 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
324 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
325 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
326 |
+
msgid "Add"
|
327 |
+
msgstr "Hinzufügen"
|
328 |
+
|
329 |
+
#: view/metabox/url_filters.php:39
|
330 |
+
msgid "Unsecure Filters"
|
331 |
+
msgstr "Unsichere Filter"
|
332 |
+
|
333 |
+
#: view/metabox/url_filters.php:90
|
334 |
+
msgid "Are you sure you want to reset all WordPress HTTPS URL Filters?"
|
335 |
+
msgstr "Sind Sie sicher, dass Sie alle WordPress HTTPS URL-Filter zurücksetzen wollen?"
|
336 |
+
|
337 |
+
#: view/metabox/url_mapping.php:12
|
338 |
+
msgid "URL Mapping allows you to map urls that host their HTTPS content on a different url. You may use %s regular expressions %s for the URL on the left side of the mapping."
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: view/metabox/url_mapping.php:28
|
342 |
+
msgid "You can modify this mapping by changing your Home URL."
|
343 |
+
msgstr "Sie können dieses Mapping ändern, indem Sie ihre Home URL ändern."
|
344 |
+
|
345 |
+
#: view/metabox/url_mapping.php:42
|
346 |
+
msgid "You can modify this mapping by changing your SSL Host in the settings above."
|
347 |
+
msgstr "Sie können dieses Mapping ändern, indem Sie den SSL-Host in den Einstellungen oben ändern."
|
348 |
+
|
349 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
350 |
+
msgid "Remove URL Mapping"
|
351 |
+
msgstr "URL-Mapping entfernen"
|
lang/wordpress-https-fr_FR.mo
ADDED
Binary file
|
lang/wordpress-https-fr_FR.po
ADDED
@@ -0,0 +1,445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress HTTPS\n"
|
4 |
+
"POT-Creation-Date: 2013-09-03 20:27-0600\n"
|
5 |
+
"PO-Revision-Date: 2014-02-02 15:31+0100\n"
|
6 |
+
"Last-Translator: AntoineVe <antoine@van-elstraete.net>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.6.3\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
+
"Language: fr_FR\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
|
18 |
+
#: lib/WordPressHTTPS/Module/Network.php:57
|
19 |
+
msgid "Network Settings"
|
20 |
+
msgstr "Paramètres réseaux"
|
21 |
+
|
22 |
+
#: lib/WordPressHTTPS/Module/Network.php:66
|
23 |
+
#: lib/WordPressHTTPS/Module/Settings.php:108
|
24 |
+
msgid "Loading..."
|
25 |
+
msgstr "Chargement..."
|
26 |
+
|
27 |
+
#: lib/WordPressHTTPS/Module/Network.php:83
|
28 |
+
#: lib/WordPressHTTPS/Module/Settings.php:125
|
29 |
+
msgid "You do not have sufficient permissions to access this page."
|
30 |
+
msgstr "Vous n'avez pas la permission d'accéder à cette page"
|
31 |
+
|
32 |
+
#: lib/WordPressHTTPS/Module/Network.php:121
|
33 |
+
msgid "Network settings saved."
|
34 |
+
msgstr "Paramètres réseaux enregistrés"
|
35 |
+
|
36 |
+
#: lib/WordPressHTTPS/Module/Post.php:42 view/network.php:10
|
37 |
+
#: view/settings.php:10
|
38 |
+
msgid "HTTPS"
|
39 |
+
msgstr "HTTPS"
|
40 |
+
|
41 |
+
#: lib/WordPressHTTPS/Module/Settings.php:63
|
42 |
+
msgid "General Settings"
|
43 |
+
msgstr "Paramètres généraux"
|
44 |
+
|
45 |
+
#: lib/WordPressHTTPS/Module/Settings.php:72
|
46 |
+
msgid "Developer Updates"
|
47 |
+
msgstr "Nouveautés des développeurs"
|
48 |
+
|
49 |
+
#: lib/WordPressHTTPS/Module/Settings.php:81
|
50 |
+
msgid "Support"
|
51 |
+
msgstr "Support"
|
52 |
+
|
53 |
+
#: lib/WordPressHTTPS/Module/Settings.php:90
|
54 |
+
msgid "Feedback"
|
55 |
+
msgstr "Retours d'utilisation"
|
56 |
+
|
57 |
+
#: lib/WordPressHTTPS/Module/Settings.php:99
|
58 |
+
msgid "Donate"
|
59 |
+
msgstr "Faire un don"
|
60 |
+
|
61 |
+
#: lib/WordPressHTTPS/Module/Settings.php:199
|
62 |
+
msgid "Cache reset."
|
63 |
+
msgstr "Réinitialiser le cache"
|
64 |
+
|
65 |
+
#: lib/WordPressHTTPS/Module/Settings.php:222
|
66 |
+
msgid "Settings reset."
|
67 |
+
msgstr "Réinitialiser la configuration"
|
68 |
+
|
69 |
+
#: lib/WordPressHTTPS/Module/Settings.php:245
|
70 |
+
msgid "Settings saved."
|
71 |
+
msgstr "Paramêtres enregistrés"
|
72 |
+
|
73 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:86
|
74 |
+
msgid "URL Filters"
|
75 |
+
msgstr "Filtres des URL"
|
76 |
+
|
77 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:106
|
78 |
+
msgid "URL Filters reset."
|
79 |
+
msgstr "Réinitialiser les filtres des URL"
|
80 |
+
|
81 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:127
|
82 |
+
msgid "URL Filters saved."
|
83 |
+
msgstr "Filtres des URL enregistrés"
|
84 |
+
|
85 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:92
|
86 |
+
msgid "URL Mapping"
|
87 |
+
msgstr "Redirection d'adresses"
|
88 |
+
|
89 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:112
|
90 |
+
msgid "URL Mapping reset."
|
91 |
+
msgstr "Réinitialiser la redirection d'adresses"
|
92 |
+
|
93 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:132
|
94 |
+
msgid "URL Mapping saved."
|
95 |
+
msgstr "Redirection d'adresses enregistrée"
|
96 |
+
|
97 |
+
#: view/settings.php:26
|
98 |
+
msgid "Expressions"
|
99 |
+
msgstr "Expressions"
|
100 |
+
|
101 |
+
#: view/settings.php:30
|
102 |
+
msgid "A single character: a, b, or c"
|
103 |
+
msgstr "Un simple caractère : a, b ou c"
|
104 |
+
|
105 |
+
#: view/settings.php:34
|
106 |
+
msgid "Any single character <em>but</em> a, b, or c"
|
107 |
+
msgstr "N'importe quel caractère <em>sauf</em> a, b, ou c"
|
108 |
+
|
109 |
+
#: view/settings.php:38
|
110 |
+
msgid "Any character in the range a-z"
|
111 |
+
msgstr "N'importe quel caractère du groupe [a-z]"
|
112 |
+
|
113 |
+
#: view/settings.php:42
|
114 |
+
msgid "Any character in the range a-z or A-Z (any alphabetical character)"
|
115 |
+
msgstr ""
|
116 |
+
"N'importe quel caractère des groupes [a-z] ou [A-Z] (n'importe quel "
|
117 |
+
"caractère alphabétique)"
|
118 |
+
|
119 |
+
#: view/settings.php:46
|
120 |
+
msgid "Any whitespace character [ \\t\\n\\r\\f\\v]"
|
121 |
+
msgstr "N'importe quel caractère d'espace [ \\t\\n\\r\\f\\v]"
|
122 |
+
|
123 |
+
#: view/settings.php:50
|
124 |
+
msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]"
|
125 |
+
msgstr "N'importe quel caractère non-espace [^ \\t\\n\\r\\f\\v]"
|
126 |
+
|
127 |
+
#: view/settings.php:54
|
128 |
+
msgid "Any digit [0-9]"
|
129 |
+
msgstr "N'importe quel chiffre [0-9]"
|
130 |
+
|
131 |
+
#: view/settings.php:58
|
132 |
+
msgid "Any non-digit [^0-9]"
|
133 |
+
msgstr "Qui n'est pas un chiffre [^0-9]"
|
134 |
+
|
135 |
+
#: view/settings.php:62
|
136 |
+
#, fuzzy
|
137 |
+
msgid "Any word character [a-zA-Z0-9_]"
|
138 |
+
msgstr "N'importe quel caractère de mot [a-zA-Z0-9_]"
|
139 |
+
|
140 |
+
#: view/settings.php:66
|
141 |
+
#, fuzzy
|
142 |
+
msgid "Any non-word character [^a-zA-Z0-9_]"
|
143 |
+
msgstr ""
|
144 |
+
"N'importe quelle caractère qui n'appartient pas à un mot [^a-zA-Z0-9_]"
|
145 |
+
|
146 |
+
#: view/settings.php:70
|
147 |
+
#, fuzzy
|
148 |
+
msgid "A word boundary between \\w and \\W"
|
149 |
+
msgstr "Une fin de mot entre \\w et \\W"
|
150 |
+
|
151 |
+
#: view/settings.php:74
|
152 |
+
msgid "A position that is not a word boundary"
|
153 |
+
msgstr "Une position qui n'est pas une fin de mot."
|
154 |
+
|
155 |
+
#: view/settings.php:78
|
156 |
+
msgid ""
|
157 |
+
"Alternation: matches either the subexpression to the left or to the right"
|
158 |
+
msgstr ""
|
159 |
+
"Alternante : qui correspond à une sous-expression vers la gauche ou vers la "
|
160 |
+
"droite"
|
161 |
+
|
162 |
+
#: view/settings.php:82
|
163 |
+
#, fuzzy
|
164 |
+
msgid "Grouping: group all together for repetition operators"
|
165 |
+
msgstr "Groupante : qui groupe ensemble les opérations répétitives"
|
166 |
+
|
167 |
+
#: view/settings.php:86
|
168 |
+
msgid "Beginning of the string"
|
169 |
+
msgstr "Début de la chaîne"
|
170 |
+
|
171 |
+
#: view/settings.php:90
|
172 |
+
msgid "End of the string"
|
173 |
+
msgstr "Fin de la chaîne"
|
174 |
+
|
175 |
+
#: view/settings.php:93
|
176 |
+
msgid "Repetition Operators"
|
177 |
+
msgstr "Répétitions   Opérateurs"
|
178 |
+
|
179 |
+
#: view/settings.php:97
|
180 |
+
msgid ""
|
181 |
+
"Match the previous item at least <em>n</em> times but no more than <em>m</"
|
182 |
+
"em> times"
|
183 |
+
msgstr ""
|
184 |
+
"Correpond au précédent élément au moins <em>n</em> fois mais pas plus de "
|
185 |
+
"<em>m</em> fois."
|
186 |
+
|
187 |
+
#: view/settings.php:101
|
188 |
+
msgid "Match the previous item <em>n</em> or more times"
|
189 |
+
msgstr "Correspond à l'élément précédent <em>n</em> fois ou plus."
|
190 |
+
|
191 |
+
#: view/settings.php:105
|
192 |
+
msgid "Match exactly <em>n</em> occurrences of the previous item"
|
193 |
+
msgstr "Correspon exactement <em>n</em> fois à l'élément précédent."
|
194 |
+
|
195 |
+
#: view/settings.php:109
|
196 |
+
msgid "Match 0 or 1 occurrences of the previous item {0,1}"
|
197 |
+
msgstr "Correspond 0 ou 1 fois à l'élément précédent {0,1}"
|
198 |
+
|
199 |
+
#: view/settings.php:113
|
200 |
+
msgid "Match 1 or more occurrences of the previous item {1,}"
|
201 |
+
msgstr "Correspond une fois ou plus à l'élément précédent {1,}"
|
202 |
+
|
203 |
+
#: view/settings.php:117
|
204 |
+
#, fuzzy
|
205 |
+
msgid "Match 0 or more occurrences of the previous item {0,}"
|
206 |
+
msgstr "Correpond à aucune ou plusieurs occurences de l'élément précédent {0,}"
|
207 |
+
|
208 |
+
#: view/metabox/network.php:11
|
209 |
+
msgid "Blog"
|
210 |
+
msgstr "Blog"
|
211 |
+
|
212 |
+
#: view/metabox/network.php:12 view/metabox/settings.php:19
|
213 |
+
msgid "SSL Host"
|
214 |
+
msgstr "Hôte SSL"
|
215 |
+
|
216 |
+
#: view/metabox/network.php:13
|
217 |
+
msgid "Force SSL Admin"
|
218 |
+
msgstr "Forcer la page d'administration en SSL"
|
219 |
+
|
220 |
+
#: view/metabox/network.php:14 view/metabox/settings.php:41
|
221 |
+
msgid "Force SSL Exclusively"
|
222 |
+
msgstr "Forcer l'utilisation de SSL uniquement"
|
223 |
+
|
224 |
+
#: view/metabox/network.php:15 view/metabox/settings.php:53
|
225 |
+
msgid "Remove Unsecure Elements"
|
226 |
+
msgstr "Supprimer les éléments non sécurisés"
|
227 |
+
|
228 |
+
#: view/metabox/network.php:16 view/metabox/settings.php:65
|
229 |
+
msgid "Debug Mode"
|
230 |
+
msgstr "Mode débogage"
|
231 |
+
|
232 |
+
#: view/metabox/network.php:17 view/metabox/settings.php:77
|
233 |
+
msgid "Proxy"
|
234 |
+
msgstr "Proxy"
|
235 |
+
|
236 |
+
#: view/metabox/network.php:18 view/metabox/settings.php:90
|
237 |
+
msgid "Admin Menu Location"
|
238 |
+
msgstr "Localisation du menu vers l'admistration"
|
239 |
+
|
240 |
+
#: view/metabox/network.php:39 view/metabox/network.php:71
|
241 |
+
#: view/metabox/settings.php:81
|
242 |
+
msgid "No"
|
243 |
+
msgstr "Non"
|
244 |
+
|
245 |
+
#: view/metabox/network.php:40 view/metabox/network.php:72
|
246 |
+
#: view/metabox/settings.php:82
|
247 |
+
msgid "Auto"
|
248 |
+
msgstr "Automatique"
|
249 |
+
|
250 |
+
#: view/metabox/network.php:41 view/metabox/network.php:73
|
251 |
+
#: view/metabox/settings.php:83
|
252 |
+
msgid "Yes"
|
253 |
+
msgstr "Oui"
|
254 |
+
|
255 |
+
#: view/metabox/network.php:46 view/metabox/network.php:78
|
256 |
+
#: view/metabox/settings.php:94
|
257 |
+
msgid "Sidebar"
|
258 |
+
msgstr "Panneau latéral"
|
259 |
+
|
260 |
+
#: view/metabox/network.php:47 view/metabox/network.php:79
|
261 |
+
#: view/metabox/settings.php:97
|
262 |
+
msgid "Settings"
|
263 |
+
msgstr "Paramètres"
|
264 |
+
|
265 |
+
#: view/metabox/network.php:88 view/metabox/settings.php:108
|
266 |
+
#: view/metabox/url_filters.php:65 view/metabox/url_mapping.php:130
|
267 |
+
msgid "Save Changes"
|
268 |
+
msgstr "Enregistrer les modifications"
|
269 |
+
|
270 |
+
#: view/metabox/network.php:89 view/metabox/settings.php:111
|
271 |
+
#: view/metabox/url_filters.php:67 view/metabox/url_mapping.php:132
|
272 |
+
msgid "Waiting..."
|
273 |
+
msgstr "En attente..."
|
274 |
+
|
275 |
+
#: view/metabox/post.php:26
|
276 |
+
#, php-format
|
277 |
+
msgid "This post's parent page '%s' has 'Secure child posts' enabled."
|
278 |
+
msgstr ""
|
279 |
+
"La page parente de cet article ('%s') a l'option \"Sécuriser les articles "
|
280 |
+
"enfants\" activée. "
|
281 |
+
|
282 |
+
#: view/metabox/post.php:26
|
283 |
+
msgid "Secure post"
|
284 |
+
msgstr "Sécuriser l'article"
|
285 |
+
|
286 |
+
#: view/metabox/post.php:29
|
287 |
+
msgid "Secure child posts"
|
288 |
+
msgstr "Sécriser les articles enfants"
|
289 |
+
|
290 |
+
#: view/metabox/settings.php:29
|
291 |
+
msgid "Force SSL Administration"
|
292 |
+
msgstr "Forcer l'administration en SSL"
|
293 |
+
|
294 |
+
#: view/metabox/settings.php:35
|
295 |
+
#, php-format
|
296 |
+
msgid ""
|
297 |
+
"Always use HTTPS while in the admin panel. This setting is identical to "
|
298 |
+
"%sFORCE_SSL_ADMIN%s."
|
299 |
+
msgstr ""
|
300 |
+
"Toujours utiliser HTTPS pour accèder au panneau d'administration. Ce "
|
301 |
+
"paramètre revient au même que %sFORCE_SSL_ADMIN%s."
|
302 |
+
|
303 |
+
#: view/metabox/settings.php:47
|
304 |
+
#, php-format
|
305 |
+
msgid ""
|
306 |
+
"Any page that is not secured via %sForce SSL%s or URL Filters will be "
|
307 |
+
"redirected to HTTP."
|
308 |
+
msgstr ""
|
309 |
+
"Toutes pages qui n'est pas sécurisée avec %sForcer SSL%s ou un filtre d'URL "
|
310 |
+
"sera redirigée vers HTTP."
|
311 |
+
|
312 |
+
#: view/metabox/settings.php:59
|
313 |
+
msgid ""
|
314 |
+
"Remove elements inaccessible over HTTPS. May break other plugins' "
|
315 |
+
"functionality."
|
316 |
+
msgstr ""
|
317 |
+
"Supprimer les éléments qui non pas accessible via HTTPS. Cela peut casser "
|
318 |
+
"certaines fonctionnalités d'autres plugins."
|
319 |
+
|
320 |
+
#: view/metabox/settings.php:71
|
321 |
+
msgid "Outputs debug information to the browser's console."
|
322 |
+
msgstr "Sortie des informations de débogage vers la console du navigateur."
|
323 |
+
|
324 |
+
#: view/metabox/settings.php:85
|
325 |
+
msgid ""
|
326 |
+
"If you think you may behind a proxy, set to Auto. Otherwise, leave the "
|
327 |
+
"setting on No."
|
328 |
+
msgstr ""
|
329 |
+
"Si vous pensez être derrière un proxy, passer à Auto. Sinon, laissez le "
|
330 |
+
"paramètre sur Non."
|
331 |
+
|
332 |
+
#: view/metabox/settings.php:109 view/metabox/url_filters.php:66
|
333 |
+
#: view/metabox/url_mapping.php:131
|
334 |
+
msgid "Reset"
|
335 |
+
msgstr "Réinitialiser"
|
336 |
+
|
337 |
+
#: view/metabox/settings.php:110
|
338 |
+
msgid "Cache Reset"
|
339 |
+
msgstr "Réinitialiser le cache"
|
340 |
+
|
341 |
+
#: view/metabox/settings.php:129
|
342 |
+
#, php-format
|
343 |
+
msgid ""
|
344 |
+
"Are you sure you want to set your SSL Host to '%s'? An incorrect value here "
|
345 |
+
"may render your admin dashboard unusable until you reset the plugin's "
|
346 |
+
"settings following the directions in the FAQ."
|
347 |
+
msgstr ""
|
348 |
+
"Etes-vous sûr de vouloir paramétrer le nom d'hôte SSL à '%s' ? Un mauvais "
|
349 |
+
"paramètre ici rendrait l'accès à l'administration du site impossible à moins "
|
350 |
+
"que vous ne réinitialisiez le plugin tel que décrit dans la FAQ."
|
351 |
+
|
352 |
+
#: view/metabox/settings.php:141
|
353 |
+
msgid "Are you sure you want to reset all WordPress HTTPS settings?"
|
354 |
+
msgstr ""
|
355 |
+
"Etes-vous certains de vouloir réinitialiser tous les paramètres de Wordpress "
|
356 |
+
"HTTPS ?"
|
357 |
+
|
358 |
+
#: view/metabox/url_filters.php:8
|
359 |
+
#, php-format
|
360 |
+
msgid ""
|
361 |
+
"URL Filters allow you to specify what content should always be secure or "
|
362 |
+
"unsecure using simple string comparisons or %sregular expressions%s."
|
363 |
+
msgstr ""
|
364 |
+
"Filtres d'URL vous permettant de spécifier quel contenu devra toujours être "
|
365 |
+
"sécurisé ou non, utilisant des chaînes de comparaisons simples ou des "
|
366 |
+
"%sexpressions régulières%s."
|
367 |
+
|
368 |
+
#: view/metabox/url_filters.php:8 view/metabox/url_mapping.php:12
|
369 |
+
msgid "Regular Expressions Help"
|
370 |
+
msgstr "Aide sur les expressions régulières"
|
371 |
+
|
372 |
+
#: view/metabox/url_filters.php:12
|
373 |
+
#, fuzzy
|
374 |
+
msgid "Secure Filters"
|
375 |
+
msgstr "Filtres de sécurité"
|
376 |
+
|
377 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
378 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
379 |
+
msgid "Remove URL Filter"
|
380 |
+
msgstr "Supprimer une filtre d'URL"
|
381 |
+
|
382 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
383 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
384 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
385 |
+
msgid "Remove"
|
386 |
+
msgstr "Supprimer"
|
387 |
+
|
388 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
389 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
390 |
+
msgid "Add URL Filter"
|
391 |
+
msgstr "Ajouter un filtre d'URL"
|
392 |
+
|
393 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
394 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
395 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
396 |
+
msgid "Add"
|
397 |
+
msgstr "Ajouter"
|
398 |
+
|
399 |
+
#: view/metabox/url_filters.php:39
|
400 |
+
msgid "Unsecure Filters"
|
401 |
+
msgstr "Filtres non sécurisé"
|
402 |
+
|
403 |
+
#: view/metabox/url_filters.php:90
|
404 |
+
msgid "Are you sure you want to reset all WordPress HTTPS URL Filters?"
|
405 |
+
msgstr ""
|
406 |
+
"Etes-vous certains de vouloir réinitialiser tous les filtres de Wordpress "
|
407 |
+
"HTTPS ?"
|
408 |
+
|
409 |
+
#: view/metabox/url_mapping.php:12
|
410 |
+
#, fuzzy, php-format
|
411 |
+
msgid ""
|
412 |
+
"URL Mapping allows you to map urls that host their HTTPS content on a "
|
413 |
+
"different url. You may use %s regular expressions %s for the URL on the left "
|
414 |
+
"side of the mapping."
|
415 |
+
msgstr ""
|
416 |
+
"Réécriture d'URL vous permettant de renvoyer les URL qui ont leur contenu "
|
417 |
+
"sécurisé sur différentes adresses. Vous pouvez utiliser des %sexpressions "
|
418 |
+
"régulières%s pour la partie de gauche de l'URL."
|
419 |
+
|
420 |
+
#: view/metabox/url_mapping.php:28
|
421 |
+
msgid "You can modify this mapping by changing your Home URL."
|
422 |
+
msgstr ""
|
423 |
+
"Vous pouvez modifier cette réécriture en changeant l'URL de votre page "
|
424 |
+
"d'acceuil"
|
425 |
+
|
426 |
+
#: view/metabox/url_mapping.php:42
|
427 |
+
msgid ""
|
428 |
+
"You can modify this mapping by changing your SSL Host in the settings above."
|
429 |
+
msgstr ""
|
430 |
+
"Vous pouvez modifier cette réécriture en changeant le nom d'hôte SSL dans "
|
431 |
+
"les paramètres ci-dessous."
|
432 |
+
|
433 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
434 |
+
msgid "Remove URL Mapping"
|
435 |
+
msgstr "Supprimer une réécriture d'URL"
|
436 |
+
|
437 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
438 |
+
msgid "Add URL Mapping"
|
439 |
+
msgstr "Ajouter une réécriture d'URL"
|
440 |
+
|
441 |
+
#: view/metabox/url_mapping.php:142
|
442 |
+
msgid "Are you sure you want to reset all WordPress HTTPS url mappings?"
|
443 |
+
msgstr ""
|
444 |
+
"Etes-vous certains de vouloir réinitialiser les paramètres de réécriture "
|
445 |
+
"d'URL de Wordpress HTTPS ?"
|
lang/wordpress-https-pt_BR.mo
ADDED
Binary file
|
lang/wordpress-https-pt_BR.po
ADDED
@@ -0,0 +1,519 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress HTTPS v3.3.6\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-09-03 20:27-0600\n"
|
6 |
+
"PO-Revision-Date: 2013-09-03 20:31-0600\n"
|
7 |
+
"Last-Translator: Mike Ems <mike@mvied.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: pt_BR\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
14 |
+
"X-Generator: Poedit 1.5.7\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
17 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
18 |
+
"X-Poedit-Basepath: \n"
|
19 |
+
"X-Textdomain-Support: yes\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
# @ wordpress-https
|
23 |
+
#: lib/WordPressHTTPS/Module/Network.php:57
|
24 |
+
msgid "Network Settings"
|
25 |
+
msgstr "Configurações de Rede"
|
26 |
+
|
27 |
+
# @ wordpress-https
|
28 |
+
#: lib/WordPressHTTPS/Module/Network.php:66
|
29 |
+
#: lib/WordPressHTTPS/Module/Settings.php:108
|
30 |
+
msgid "Loading..."
|
31 |
+
msgstr "Carregando..."
|
32 |
+
|
33 |
+
# @ default
|
34 |
+
#: lib/WordPressHTTPS/Module/Network.php:83
|
35 |
+
#: lib/WordPressHTTPS/Module/Settings.php:125
|
36 |
+
msgid "You do not have sufficient permissions to access this page."
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
# @ wordpress-https
|
40 |
+
#: lib/WordPressHTTPS/Module/Network.php:121
|
41 |
+
#, fuzzy
|
42 |
+
msgid "Network settings saved."
|
43 |
+
msgstr "Configurações de Rede"
|
44 |
+
|
45 |
+
# @ wordpress-https
|
46 |
+
#: lib/WordPressHTTPS/Module/Post.php:42 view/network.php:10
|
47 |
+
#: view/settings.php:10
|
48 |
+
msgid "HTTPS"
|
49 |
+
msgstr "HTTPS"
|
50 |
+
|
51 |
+
# @ wordpress-https
|
52 |
+
#: lib/WordPressHTTPS/Module/Settings.php:63
|
53 |
+
msgid "General Settings"
|
54 |
+
msgstr "Configurações Gerais"
|
55 |
+
|
56 |
+
# @ wordpress-https
|
57 |
+
#: lib/WordPressHTTPS/Module/Settings.php:72
|
58 |
+
msgid "Developer Updates"
|
59 |
+
msgstr "Atualizações para Desenvolvedor"
|
60 |
+
|
61 |
+
# @ wordpress-https
|
62 |
+
#: lib/WordPressHTTPS/Module/Settings.php:81
|
63 |
+
msgid "Support"
|
64 |
+
msgstr "Suporte"
|
65 |
+
|
66 |
+
# @ wordpress-https
|
67 |
+
#: lib/WordPressHTTPS/Module/Settings.php:90
|
68 |
+
msgid "Feedback"
|
69 |
+
msgstr "Feedback"
|
70 |
+
|
71 |
+
# @ wordpress-https
|
72 |
+
#: lib/WordPressHTTPS/Module/Settings.php:99
|
73 |
+
msgid "Donate"
|
74 |
+
msgstr "Doar"
|
75 |
+
|
76 |
+
#: lib/WordPressHTTPS/Module/Settings.php:199
|
77 |
+
msgid "Cache reset."
|
78 |
+
msgstr "Resetar"
|
79 |
+
|
80 |
+
# @ wordpress-https
|
81 |
+
#: lib/WordPressHTTPS/Module/Settings.php:222
|
82 |
+
#, fuzzy
|
83 |
+
msgid "Settings reset."
|
84 |
+
msgstr "Configurações"
|
85 |
+
|
86 |
+
# @ wordpress-https
|
87 |
+
#: lib/WordPressHTTPS/Module/Settings.php:245
|
88 |
+
#, fuzzy
|
89 |
+
msgid "Settings saved."
|
90 |
+
msgstr "Configurações"
|
91 |
+
|
92 |
+
# @ wordpress-https
|
93 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:86
|
94 |
+
msgid "URL Filters"
|
95 |
+
msgstr "Filtro URL"
|
96 |
+
|
97 |
+
# @ wordpress-https
|
98 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:106
|
99 |
+
#, fuzzy
|
100 |
+
msgid "URL Filters reset."
|
101 |
+
msgstr "Filtro URL"
|
102 |
+
|
103 |
+
# @ wordpress-https
|
104 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:127
|
105 |
+
#, fuzzy
|
106 |
+
msgid "URL Filters saved."
|
107 |
+
msgstr "Filtro URL"
|
108 |
+
|
109 |
+
# @ wordpress-https
|
110 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:92
|
111 |
+
#, fuzzy
|
112 |
+
msgid "URL Mapping"
|
113 |
+
msgstr "Mapeamento de Domínio"
|
114 |
+
|
115 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:112
|
116 |
+
msgid "URL Mapping reset."
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:132
|
120 |
+
msgid "URL Mapping saved."
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
# @ wordpress-https
|
124 |
+
#: view/settings.php:26
|
125 |
+
msgid "Expressions"
|
126 |
+
msgstr "Expressões"
|
127 |
+
|
128 |
+
# @ wordpress-https
|
129 |
+
#: view/settings.php:30
|
130 |
+
msgid "A single character: a, b, or c"
|
131 |
+
msgstr "Um único caracter: a,b, ou c"
|
132 |
+
|
133 |
+
# @ wordpress-https
|
134 |
+
#: view/settings.php:34
|
135 |
+
msgid "Any single character <em>but</em> a, b, or c"
|
136 |
+
msgstr "Qualquer caracter único <em>mais</em> a, b, ou c"
|
137 |
+
|
138 |
+
# @ wordpress-https
|
139 |
+
#: view/settings.php:38
|
140 |
+
msgid "Any character in the range a-z"
|
141 |
+
msgstr "Qualquer caracter entre a-z"
|
142 |
+
|
143 |
+
# @ wordpress-https
|
144 |
+
#: view/settings.php:42
|
145 |
+
msgid "Any character in the range a-z or A-Z (any alphabetical character)"
|
146 |
+
msgstr "Qualquer caracter entre a-z ou A-Z (Em qualquer order alfabética)"
|
147 |
+
|
148 |
+
# @ wordpress-https
|
149 |
+
#: view/settings.php:46
|
150 |
+
#, fuzzy
|
151 |
+
msgid "Any whitespace character [ \\t\\n\\r\\f\\v]"
|
152 |
+
msgstr ""
|
153 |
+
"Qualquer caracter em branco [ \\t\n"
|
154 |
+
"\\r\\f\\v]"
|
155 |
+
|
156 |
+
# @ wordpress-https
|
157 |
+
#: view/settings.php:50
|
158 |
+
#, fuzzy
|
159 |
+
msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]"
|
160 |
+
msgstr ""
|
161 |
+
"Qualquer espaço em branco [^ \\t\n"
|
162 |
+
"\\r\\f\\v]"
|
163 |
+
|
164 |
+
# @ wordpress-https
|
165 |
+
#: view/settings.php:54
|
166 |
+
msgid "Any digit [0-9]"
|
167 |
+
msgstr "Qualquer digito [0-9]"
|
168 |
+
|
169 |
+
# @ wordpress-https
|
170 |
+
#: view/settings.php:58
|
171 |
+
msgid "Any non-digit [^0-9]"
|
172 |
+
msgstr "Qualquer sem digito [0-9]"
|
173 |
+
|
174 |
+
# @ wordpress-https
|
175 |
+
#: view/settings.php:62
|
176 |
+
msgid "Any word character [a-zA-Z0-9_]"
|
177 |
+
msgstr "Qualquer caracter de palavra [a-zA-Z0-9_]"
|
178 |
+
|
179 |
+
# @ wordpress-https
|
180 |
+
#: view/settings.php:66
|
181 |
+
msgid "Any non-word character [^a-zA-Z0-9_]"
|
182 |
+
msgstr "Qualquer caracter sem palavra [^a-zA-Z0-9_]"
|
183 |
+
|
184 |
+
# @ wordpress-https
|
185 |
+
#: view/settings.php:70
|
186 |
+
msgid "A word boundary between \\w and \\W"
|
187 |
+
msgstr "Uma fronteira entre \\w and \\W"
|
188 |
+
|
189 |
+
# @ wordpress-https
|
190 |
+
#: view/settings.php:74
|
191 |
+
msgid "A position that is not a word boundary"
|
192 |
+
msgstr "Uma poisição que não seja uma fronteira na palavra"
|
193 |
+
|
194 |
+
# @ wordpress-https
|
195 |
+
#: view/settings.php:78
|
196 |
+
msgid ""
|
197 |
+
"Alternation: matches either the subexpression to the left or to the right"
|
198 |
+
msgstr "Alternativas: busca pode ser da esquerda ou direita"
|
199 |
+
|
200 |
+
# @ wordpress-https
|
201 |
+
#: view/settings.php:82
|
202 |
+
msgid "Grouping: group all together for repetition operators"
|
203 |
+
msgstr "Agrupamento: Agrupe todos juntos para operações repitidas"
|
204 |
+
|
205 |
+
# @ wordpress-https
|
206 |
+
#: view/settings.php:86
|
207 |
+
msgid "Beginning of the string"
|
208 |
+
msgstr "Começo da linha"
|
209 |
+
|
210 |
+
# @ wordpress-https
|
211 |
+
#: view/settings.php:90
|
212 |
+
msgid "End of the string"
|
213 |
+
msgstr "Final da linha"
|
214 |
+
|
215 |
+
# @ wordpress-https
|
216 |
+
#: view/settings.php:93
|
217 |
+
msgid "Repetition Operators"
|
218 |
+
msgstr "Repetição Operações"
|
219 |
+
|
220 |
+
# @ wordpress-https
|
221 |
+
#: view/settings.php:97
|
222 |
+
msgid ""
|
223 |
+
"Match the previous item at least <em>n</em> times but no more than <em>m</"
|
224 |
+
"em> times"
|
225 |
+
msgstr ""
|
226 |
+
"Igual ao item anterior pelo menos <em>n</em> vezes, porém não mais que "
|
227 |
+
"<em>m</em> vezes"
|
228 |
+
|
229 |
+
# @ wordpress-https
|
230 |
+
#: view/settings.php:101
|
231 |
+
msgid "Match the previous item <em>n</em> or more times"
|
232 |
+
msgstr "Igual ao item a quantidade <em>n</em> anterior ou mais vezes"
|
233 |
+
|
234 |
+
# @ wordpress-https
|
235 |
+
#: view/settings.php:105
|
236 |
+
msgid "Match exactly <em>n</em> occurrences of the previous item"
|
237 |
+
msgstr "Exatamente igual <em>n</em> ocorrencias do item anterior"
|
238 |
+
|
239 |
+
# @ wordpress-https
|
240 |
+
#: view/settings.php:109
|
241 |
+
msgid "Match 0 or 1 occurrences of the previous item {0,1}"
|
242 |
+
msgstr "Encontre 0 ou 1 ocorrencias do item anterior {0,1}"
|
243 |
+
|
244 |
+
# @ wordpress-https
|
245 |
+
#: view/settings.php:113
|
246 |
+
msgid "Match 1 or more occurrences of the previous item {1,}"
|
247 |
+
msgstr "Encontrar 1 ou mais ocorrencias do item anterior {1,}"
|
248 |
+
|
249 |
+
# @ wordpress-https
|
250 |
+
#: view/settings.php:117
|
251 |
+
msgid "Match 0 or more occurrences of the previous item {0,}"
|
252 |
+
msgstr "Encontrar 0 ou mais ocorrencias do item anterior {0,}"
|
253 |
+
|
254 |
+
# @ wordpress-https
|
255 |
+
#: view/metabox/network.php:11
|
256 |
+
msgid "Blog"
|
257 |
+
msgstr "Blog"
|
258 |
+
|
259 |
+
# @ wordpress-https
|
260 |
+
#: view/metabox/network.php:12 view/metabox/settings.php:19
|
261 |
+
msgid "SSL Host"
|
262 |
+
msgstr "Hospeadgem do SSL"
|
263 |
+
|
264 |
+
# @ wordpress-https
|
265 |
+
#: view/metabox/network.php:13
|
266 |
+
msgid "Force SSL Admin"
|
267 |
+
msgstr "Forçar SSL Admin"
|
268 |
+
|
269 |
+
# @ wordpress-https
|
270 |
+
#: view/metabox/network.php:14 view/metabox/settings.php:41
|
271 |
+
msgid "Force SSL Exclusively"
|
272 |
+
msgstr "Forçar SSL Exclusivamente"
|
273 |
+
|
274 |
+
# @ wordpress-https
|
275 |
+
#: view/metabox/network.php:15 view/metabox/settings.php:53
|
276 |
+
msgid "Remove Unsecure Elements"
|
277 |
+
msgstr "Remover Elementos Inseguro"
|
278 |
+
|
279 |
+
# @ wordpress-https
|
280 |
+
#: view/metabox/network.php:16 view/metabox/settings.php:65
|
281 |
+
msgid "Debug Mode"
|
282 |
+
msgstr "Modo Depuração"
|
283 |
+
|
284 |
+
# @ wordpress-https
|
285 |
+
#: view/metabox/network.php:17 view/metabox/settings.php:77
|
286 |
+
msgid "Proxy"
|
287 |
+
msgstr "Proxy"
|
288 |
+
|
289 |
+
# @ wordpress-https
|
290 |
+
#: view/metabox/network.php:18 view/metabox/settings.php:90
|
291 |
+
msgid "Admin Menu Location"
|
292 |
+
msgstr "Localidade no Menu"
|
293 |
+
|
294 |
+
# @ wordpress-https
|
295 |
+
#: view/metabox/network.php:39 view/metabox/network.php:71
|
296 |
+
#: view/metabox/settings.php:81
|
297 |
+
msgid "No"
|
298 |
+
msgstr "Não"
|
299 |
+
|
300 |
+
# @ wordpress-https
|
301 |
+
#: view/metabox/network.php:40 view/metabox/network.php:72
|
302 |
+
#: view/metabox/settings.php:82
|
303 |
+
msgid "Auto"
|
304 |
+
msgstr "Auto"
|
305 |
+
|
306 |
+
# @ wordpress-https
|
307 |
+
#: view/metabox/network.php:41 view/metabox/network.php:73
|
308 |
+
#: view/metabox/settings.php:83
|
309 |
+
msgid "Yes"
|
310 |
+
msgstr "Sim"
|
311 |
+
|
312 |
+
# @ wordpress-https
|
313 |
+
#: view/metabox/network.php:46 view/metabox/network.php:78
|
314 |
+
#: view/metabox/settings.php:94
|
315 |
+
msgid "Sidebar"
|
316 |
+
msgstr "Barra Lateral"
|
317 |
+
|
318 |
+
# @ wordpress-https
|
319 |
+
#: view/metabox/network.php:47 view/metabox/network.php:79
|
320 |
+
#: view/metabox/settings.php:97
|
321 |
+
msgid "Settings"
|
322 |
+
msgstr "Configurações"
|
323 |
+
|
324 |
+
# @ wordpress-https
|
325 |
+
#: view/metabox/network.php:88 view/metabox/settings.php:108
|
326 |
+
#: view/metabox/url_filters.php:65 view/metabox/url_mapping.php:130
|
327 |
+
msgid "Save Changes"
|
328 |
+
msgstr "Salvar Alterações"
|
329 |
+
|
330 |
+
# @ wordpress-https
|
331 |
+
#: view/metabox/network.php:89 view/metabox/settings.php:111
|
332 |
+
#: view/metabox/url_filters.php:67 view/metabox/url_mapping.php:132
|
333 |
+
msgid "Waiting..."
|
334 |
+
msgstr "Aguardando..."
|
335 |
+
|
336 |
+
# @ wordpress-https
|
337 |
+
#: view/metabox/post.php:26
|
338 |
+
#, php-format
|
339 |
+
msgid "This post's parent page '%s' has 'Secure child posts' enabled."
|
340 |
+
msgstr "A página pai do post %s estão com a sub-página habilitadas."
|
341 |
+
|
342 |
+
# @ wordpress-https
|
343 |
+
#: view/metabox/post.php:26
|
344 |
+
msgid "Secure post"
|
345 |
+
msgstr "Post Seguro"
|
346 |
+
|
347 |
+
# @ wordpress-https
|
348 |
+
#: view/metabox/post.php:29
|
349 |
+
msgid "Secure child posts"
|
350 |
+
msgstr "Segurar sub-posts"
|
351 |
+
|
352 |
+
# @ wordpress-https
|
353 |
+
#: view/metabox/settings.php:29
|
354 |
+
msgid "Force SSL Administration"
|
355 |
+
msgstr "Forçar SSL na Administração"
|
356 |
+
|
357 |
+
# @ wordpress-https
|
358 |
+
#: view/metabox/settings.php:35
|
359 |
+
#, fuzzy, php-format
|
360 |
+
msgid ""
|
361 |
+
"Always use HTTPS while in the admin panel. This setting is identical to "
|
362 |
+
"%sFORCE_SSL_ADMIN%s."
|
363 |
+
msgstr ""
|
364 |
+
"Sempre usar HTTPS enquanto estiver no painel admin. Está opção é identica a "
|
365 |
+
"%s FORCE_SSL_ADMIN"
|
366 |
+
|
367 |
+
# @ wordpress-https
|
368 |
+
#: view/metabox/settings.php:47
|
369 |
+
#, fuzzy, php-format
|
370 |
+
msgid ""
|
371 |
+
"Any page that is not secured via %sForce SSL%s or URL Filters will be "
|
372 |
+
"redirected to HTTP."
|
373 |
+
msgstr ""
|
374 |
+
"Qualquer página que não estiver segura via %s Forçar SSL %s ou URL será "
|
375 |
+
"redirecionada para HTTP."
|
376 |
+
|
377 |
+
# @ wordpress-https
|
378 |
+
#: view/metabox/settings.php:59
|
379 |
+
msgid ""
|
380 |
+
"Remove elements inaccessible over HTTPS. May break other plugins' "
|
381 |
+
"functionality."
|
382 |
+
msgstr ""
|
383 |
+
"Remover elementos inacessíveis via HTTPS. Está opção pode quebrar "
|
384 |
+
"funcionabilidade de outros plugins."
|
385 |
+
|
386 |
+
# @ wordpress-https
|
387 |
+
#: view/metabox/settings.php:71
|
388 |
+
msgid "Outputs debug information to the browser's console."
|
389 |
+
msgstr "Mostrar os dados de depuração no console do navegador."
|
390 |
+
|
391 |
+
# @ wordpress-https
|
392 |
+
#: view/metabox/settings.php:85
|
393 |
+
msgid ""
|
394 |
+
"If you think you may behind a proxy, set to Auto. Otherwise, leave the "
|
395 |
+
"setting on No."
|
396 |
+
msgstr ""
|
397 |
+
"Se você achar que está usando proxy, marque a opção Auto. Ou, deixe em Não."
|
398 |
+
|
399 |
+
# @ wordpress-https
|
400 |
+
#: view/metabox/settings.php:109 view/metabox/url_filters.php:66
|
401 |
+
#: view/metabox/url_mapping.php:131
|
402 |
+
msgid "Reset"
|
403 |
+
msgstr "Resetar"
|
404 |
+
|
405 |
+
# @ wordpress-https
|
406 |
+
#: view/metabox/settings.php:110
|
407 |
+
#, fuzzy
|
408 |
+
msgid "Cache Reset"
|
409 |
+
msgstr "Resetar"
|
410 |
+
|
411 |
+
#: view/metabox/settings.php:129
|
412 |
+
#, php-format
|
413 |
+
msgid ""
|
414 |
+
"Are you sure you want to set your SSL Host to '%s'? An incorrect value here "
|
415 |
+
"may render your admin dashboard unusable until you reset the plugin's "
|
416 |
+
"settings following the directions in the FAQ."
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
# @ wordpress-https
|
420 |
+
#: view/metabox/settings.php:141
|
421 |
+
msgid "Are you sure you want to reset all WordPress HTTPS settings?"
|
422 |
+
msgstr ""
|
423 |
+
"Tem certeza que deseja resetar todas as configurações do WordPress HTTPS?"
|
424 |
+
|
425 |
+
#: view/metabox/url_filters.php:8
|
426 |
+
#, php-format
|
427 |
+
msgid ""
|
428 |
+
"URL Filters allow you to specify what content should always be secure or "
|
429 |
+
"unsecure using simple string comparisons or %sregular expressions%s."
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
+
# @ wordpress-https
|
433 |
+
#: view/metabox/url_filters.php:8 view/metabox/url_mapping.php:12
|
434 |
+
msgid "Regular Expressions Help"
|
435 |
+
msgstr "Ajuda com Expressões Regulares"
|
436 |
+
|
437 |
+
# @ wordpress-https
|
438 |
+
#: view/metabox/url_filters.php:12
|
439 |
+
msgid "Secure Filters"
|
440 |
+
msgstr "Filtros Seguro"
|
441 |
+
|
442 |
+
# @ wordpress-https
|
443 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
444 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
445 |
+
msgid "Remove URL Filter"
|
446 |
+
msgstr "Remover filtro de URL"
|
447 |
+
|
448 |
+
# @ wordpress-https
|
449 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
450 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
451 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
452 |
+
msgid "Remove"
|
453 |
+
msgstr "Remover"
|
454 |
+
|
455 |
+
# @ wordpress-https
|
456 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
457 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
458 |
+
msgid "Add URL Filter"
|
459 |
+
msgstr "Adicionar filtro de URL"
|
460 |
+
|
461 |
+
# @ wordpress-https
|
462 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
463 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
464 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
465 |
+
msgid "Add"
|
466 |
+
msgstr "Adicionar"
|
467 |
+
|
468 |
+
# @ wordpress-https
|
469 |
+
#: view/metabox/url_filters.php:39
|
470 |
+
#, fuzzy
|
471 |
+
msgid "Unsecure Filters"
|
472 |
+
msgstr "Filtros Seguro"
|
473 |
+
|
474 |
+
# @ wordpress-https
|
475 |
+
#: view/metabox/url_filters.php:90
|
476 |
+
#, fuzzy
|
477 |
+
msgid "Are you sure you want to reset all WordPress HTTPS URL Filters?"
|
478 |
+
msgstr "Tem certeza que deseja resetar todos os filtros do WordPress HTTPS?"
|
479 |
+
|
480 |
+
# @ wordpress-https
|
481 |
+
#: view/metabox/url_mapping.php:12
|
482 |
+
#, fuzzy, php-format
|
483 |
+
msgid ""
|
484 |
+
"URL Mapping allows you to map urls that host their HTTPS content on a "
|
485 |
+
"different url. You may use %s regular expressions %s for the URL on the left "
|
486 |
+
"side of the mapping."
|
487 |
+
msgstr ""
|
488 |
+
"Mapeamento de domínios permite que você mapeie um domínio externo que "
|
489 |
+
"hospede seu próprio conteúdo em HTTPS em um domínio diferente. Pode-se usar "
|
490 |
+
"expressões regulares"
|
491 |
+
|
492 |
+
#: view/metabox/url_mapping.php:28
|
493 |
+
msgid "You can modify this mapping by changing your Home URL."
|
494 |
+
msgstr ""
|
495 |
+
|
496 |
+
#: view/metabox/url_mapping.php:42
|
497 |
+
msgid ""
|
498 |
+
"You can modify this mapping by changing your SSL Host in the settings above."
|
499 |
+
msgstr ""
|
500 |
+
|
501 |
+
# @ wordpress-https
|
502 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
503 |
+
#, fuzzy
|
504 |
+
msgid "Remove URL Mapping"
|
505 |
+
msgstr "Remover filtro de URL"
|
506 |
+
|
507 |
+
# @ wordpress-https
|
508 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
509 |
+
#, fuzzy
|
510 |
+
msgid "Add URL Mapping"
|
511 |
+
msgstr "Adicionar filtro de URL"
|
512 |
+
|
513 |
+
# @ wordpress-https
|
514 |
+
#: view/metabox/url_mapping.php:142
|
515 |
+
#, fuzzy
|
516 |
+
msgid "Are you sure you want to reset all WordPress HTTPS url mappings?"
|
517 |
+
msgstr ""
|
518 |
+
"Tem certeza que deseja resetar todas os mapeamentos de domínio do WordPress "
|
519 |
+
"HTTPS?"
|
lang/wordpress-https.pot
ADDED
@@ -0,0 +1,401 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress HTTPS\n"
|
4 |
+
"POT-Creation-Date: 2013-09-03 20:27-0600\n"
|
5 |
+
"PO-Revision-Date: 2013-09-03 20:28-0600\n"
|
6 |
+
"Last-Translator: Mike Ems <mike@mvied.com>\n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.7\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SearchPath-0: ..\n"
|
15 |
+
|
16 |
+
#: lib/WordPressHTTPS/Module/Network.php:57
|
17 |
+
msgid "Network Settings"
|
18 |
+
msgstr ""
|
19 |
+
|
20 |
+
#: lib/WordPressHTTPS/Module/Network.php:66
|
21 |
+
#: lib/WordPressHTTPS/Module/Settings.php:108
|
22 |
+
msgid "Loading..."
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: lib/WordPressHTTPS/Module/Network.php:83
|
26 |
+
#: lib/WordPressHTTPS/Module/Settings.php:125
|
27 |
+
msgid "You do not have sufficient permissions to access this page."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: lib/WordPressHTTPS/Module/Network.php:121
|
31 |
+
msgid "Network settings saved."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: lib/WordPressHTTPS/Module/Post.php:42 view/network.php:10
|
35 |
+
#: view/settings.php:10
|
36 |
+
msgid "HTTPS"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: lib/WordPressHTTPS/Module/Settings.php:63
|
40 |
+
msgid "General Settings"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: lib/WordPressHTTPS/Module/Settings.php:72
|
44 |
+
msgid "Developer Updates"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: lib/WordPressHTTPS/Module/Settings.php:81
|
48 |
+
msgid "Support"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: lib/WordPressHTTPS/Module/Settings.php:90
|
52 |
+
msgid "Feedback"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: lib/WordPressHTTPS/Module/Settings.php:99
|
56 |
+
msgid "Donate"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: lib/WordPressHTTPS/Module/Settings.php:199
|
60 |
+
msgid "Cache reset."
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: lib/WordPressHTTPS/Module/Settings.php:222
|
64 |
+
msgid "Settings reset."
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: lib/WordPressHTTPS/Module/Settings.php:245
|
68 |
+
msgid "Settings saved."
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:86
|
72 |
+
msgid "URL Filters"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:106
|
76 |
+
msgid "URL Filters reset."
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: lib/WordPressHTTPS/Module/UrlFilters.php:127
|
80 |
+
msgid "URL Filters saved."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:92
|
84 |
+
msgid "URL Mapping"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:112
|
88 |
+
msgid "URL Mapping reset."
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: lib/WordPressHTTPS/Module/UrlMapping.php:132
|
92 |
+
msgid "URL Mapping saved."
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: view/settings.php:26
|
96 |
+
msgid "Expressions"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: view/settings.php:30
|
100 |
+
msgid "A single character: a, b, or c"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: view/settings.php:34
|
104 |
+
msgid "Any single character <em>but</em> a, b, or c"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: view/settings.php:38
|
108 |
+
msgid "Any character in the range a-z"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: view/settings.php:42
|
112 |
+
msgid "Any character in the range a-z or A-Z (any alphabetical character)"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: view/settings.php:46
|
116 |
+
msgid "Any whitespace character [ \\t\\n\\r\\f\\v]"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: view/settings.php:50
|
120 |
+
msgid "Any non-whitespace character [^ \\t\\n\\r\\f\\v]"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: view/settings.php:54
|
124 |
+
msgid "Any digit [0-9]"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: view/settings.php:58
|
128 |
+
msgid "Any non-digit [^0-9]"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: view/settings.php:62
|
132 |
+
msgid "Any word character [a-zA-Z0-9_]"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: view/settings.php:66
|
136 |
+
msgid "Any non-word character [^a-zA-Z0-9_]"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: view/settings.php:70
|
140 |
+
msgid "A word boundary between \\w and \\W"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: view/settings.php:74
|
144 |
+
msgid "A position that is not a word boundary"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: view/settings.php:78
|
148 |
+
msgid ""
|
149 |
+
"Alternation: matches either the subexpression to the left or to the right"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: view/settings.php:82
|
153 |
+
msgid "Grouping: group all together for repetition operators"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: view/settings.php:86
|
157 |
+
msgid "Beginning of the string"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: view/settings.php:90
|
161 |
+
msgid "End of the string"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: view/settings.php:93
|
165 |
+
msgid "Repetition Operators"
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: view/settings.php:97
|
169 |
+
msgid ""
|
170 |
+
"Match the previous item at least <em>n</em> times but no more than <em>m</"
|
171 |
+
"em> times"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: view/settings.php:101
|
175 |
+
msgid "Match the previous item <em>n</em> or more times"
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
#: view/settings.php:105
|
179 |
+
msgid "Match exactly <em>n</em> occurrences of the previous item"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: view/settings.php:109
|
183 |
+
msgid "Match 0 or 1 occurrences of the previous item {0,1}"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: view/settings.php:113
|
187 |
+
msgid "Match 1 or more occurrences of the previous item {1,}"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: view/settings.php:117
|
191 |
+
msgid "Match 0 or more occurrences of the previous item {0,}"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: view/metabox/network.php:11
|
195 |
+
msgid "Blog"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: view/metabox/network.php:12 view/metabox/settings.php:19
|
199 |
+
msgid "SSL Host"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: view/metabox/network.php:13
|
203 |
+
msgid "Force SSL Admin"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: view/metabox/network.php:14 view/metabox/settings.php:41
|
207 |
+
msgid "Force SSL Exclusively"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: view/metabox/network.php:15 view/metabox/settings.php:53
|
211 |
+
msgid "Remove Unsecure Elements"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: view/metabox/network.php:16 view/metabox/settings.php:65
|
215 |
+
msgid "Debug Mode"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: view/metabox/network.php:17 view/metabox/settings.php:77
|
219 |
+
msgid "Proxy"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: view/metabox/network.php:18 view/metabox/settings.php:90
|
223 |
+
msgid "Admin Menu Location"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: view/metabox/network.php:39 view/metabox/network.php:71
|
227 |
+
#: view/metabox/settings.php:81
|
228 |
+
msgid "No"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: view/metabox/network.php:40 view/metabox/network.php:72
|
232 |
+
#: view/metabox/settings.php:82
|
233 |
+
msgid "Auto"
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: view/metabox/network.php:41 view/metabox/network.php:73
|
237 |
+
#: view/metabox/settings.php:83
|
238 |
+
msgid "Yes"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: view/metabox/network.php:46 view/metabox/network.php:78
|
242 |
+
#: view/metabox/settings.php:94
|
243 |
+
msgid "Sidebar"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: view/metabox/network.php:47 view/metabox/network.php:79
|
247 |
+
#: view/metabox/settings.php:97
|
248 |
+
msgid "Settings"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: view/metabox/network.php:88 view/metabox/settings.php:108
|
252 |
+
#: view/metabox/url_filters.php:65 view/metabox/url_mapping.php:130
|
253 |
+
msgid "Save Changes"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: view/metabox/network.php:89 view/metabox/settings.php:111
|
257 |
+
#: view/metabox/url_filters.php:67 view/metabox/url_mapping.php:132
|
258 |
+
msgid "Waiting..."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: view/metabox/post.php:26
|
262 |
+
#, php-format
|
263 |
+
msgid "This post's parent page '%s' has 'Secure child posts' enabled."
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: view/metabox/post.php:26
|
267 |
+
msgid "Secure post"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: view/metabox/post.php:29
|
271 |
+
msgid "Secure child posts"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: view/metabox/settings.php:29
|
275 |
+
msgid "Force SSL Administration"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: view/metabox/settings.php:35
|
279 |
+
#, php-format
|
280 |
+
msgid ""
|
281 |
+
"Always use HTTPS while in the admin panel. This setting is identical to "
|
282 |
+
"%sFORCE_SSL_ADMIN%s."
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: view/metabox/settings.php:47
|
286 |
+
#, php-format
|
287 |
+
msgid ""
|
288 |
+
"Any page that is not secured via %sForce SSL%s or URL Filters will be "
|
289 |
+
"redirected to HTTP."
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: view/metabox/settings.php:59
|
293 |
+
msgid ""
|
294 |
+
"Remove elements inaccessible over HTTPS. May break other plugins' "
|
295 |
+
"functionality."
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: view/metabox/settings.php:71
|
299 |
+
msgid "Outputs debug information to the browser's console."
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: view/metabox/settings.php:85
|
303 |
+
msgid ""
|
304 |
+
"If you think you may behind a proxy, set to Auto. Otherwise, leave the "
|
305 |
+
"setting on No."
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: view/metabox/settings.php:109 view/metabox/url_filters.php:66
|
309 |
+
#: view/metabox/url_mapping.php:131
|
310 |
+
msgid "Reset"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: view/metabox/settings.php:110
|
314 |
+
msgid "Cache Reset"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: view/metabox/settings.php:129
|
318 |
+
#, php-format
|
319 |
+
msgid ""
|
320 |
+
"Are you sure you want to set your SSL Host to '%s'? An incorrect value here "
|
321 |
+
"may render your admin dashboard unusable until you reset the plugin's "
|
322 |
+
"settings following the directions in the FAQ."
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: view/metabox/settings.php:141
|
326 |
+
msgid "Are you sure you want to reset all WordPress HTTPS settings?"
|
327 |
+
msgstr ""
|
328 |
+
|
329 |
+
#: view/metabox/url_filters.php:8
|
330 |
+
#, php-format
|
331 |
+
msgid ""
|
332 |
+
"URL Filters allow you to specify what content should always be secure or "
|
333 |
+
"unsecure using simple string comparisons or %sregular expressions%s."
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: view/metabox/url_filters.php:8 view/metabox/url_mapping.php:12
|
337 |
+
msgid "Regular Expressions Help"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: view/metabox/url_filters.php:12
|
341 |
+
msgid "Secure Filters"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
345 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
346 |
+
msgid "Remove URL Filter"
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: view/metabox/url_filters.php:20 view/metabox/url_filters.php:30
|
350 |
+
#: view/metabox/url_filters.php:47 view/metabox/url_filters.php:57
|
351 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
352 |
+
msgid "Remove"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
356 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
357 |
+
msgid "Add URL Filter"
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: view/metabox/url_filters.php:21 view/metabox/url_filters.php:31
|
361 |
+
#: view/metabox/url_filters.php:48 view/metabox/url_filters.php:58
|
362 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
363 |
+
msgid "Add"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: view/metabox/url_filters.php:39
|
367 |
+
msgid "Unsecure Filters"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: view/metabox/url_filters.php:90
|
371 |
+
msgid "Are you sure you want to reset all WordPress HTTPS URL Filters?"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: view/metabox/url_mapping.php:12
|
375 |
+
#, php-format
|
376 |
+
msgid ""
|
377 |
+
"URL Mapping allows you to map urls that host their HTTPS content on a "
|
378 |
+
"different url. You may use %s regular expressions %s for the URL on the left "
|
379 |
+
"side of the mapping."
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: view/metabox/url_mapping.php:28
|
383 |
+
msgid "You can modify this mapping by changing your Home URL."
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: view/metabox/url_mapping.php:42
|
387 |
+
msgid ""
|
388 |
+
"You can modify this mapping by changing your SSL Host in the settings above."
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: view/metabox/url_mapping.php:84 view/metabox/url_mapping.php:122
|
392 |
+
msgid "Remove URL Mapping"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: view/metabox/url_mapping.php:85 view/metabox/url_mapping.php:123
|
396 |
+
msgid "Add URL Mapping"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: view/metabox/url_mapping.php:142
|
400 |
+
msgid "Are you sure you want to reset all WordPress HTTPS url mappings?"
|
401 |
+
msgstr ""
|
languages/wordpress-https-de_DE.mo
DELETED
Binary file
|
languages/wordpress-https-de_DE.po
DELETED
@@ -1,334 +0,0 @@
|
|
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 Operators"
|
170 |
-
msgstr "Wiederholungs 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
DELETED
@@ -1,352 +0,0 @@
|
|
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 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/Base.php
ADDED
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Base class for a WordPress plugin or theme
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Base {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Base directory
|
12 |
+
*
|
13 |
+
* @var string
|
14 |
+
*/
|
15 |
+
protected $_directory;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Logger
|
19 |
+
*
|
20 |
+
* @var Mvied_Logger_Interface
|
21 |
+
*/
|
22 |
+
protected $_logger;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Settings
|
26 |
+
*
|
27 |
+
* @var array
|
28 |
+
*/
|
29 |
+
protected $_settings = array();
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Slug
|
33 |
+
*
|
34 |
+
* Used as a unqiue identifier for the plugin.
|
35 |
+
*
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
protected $_slug;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Version
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
protected $_version;
|
46 |
+
|
47 |
+
/**
|
48 |
+
* View Directory
|
49 |
+
*
|
50 |
+
* @var string
|
51 |
+
*/
|
52 |
+
protected $_view_directory;
|
53 |
+
|
54 |
+
protected $_option_cache = array();
|
55 |
+
protected $_blog_option_cache = array();
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Set Directory
|
59 |
+
*
|
60 |
+
* @param string $directory
|
61 |
+
* @return object $this
|
62 |
+
*/
|
63 |
+
public function setDirectory( $directory ) {
|
64 |
+
$this->_directory = $directory;
|
65 |
+
return $this;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Get Directory
|
70 |
+
*
|
71 |
+
* @param none
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public function getDirectory() {
|
75 |
+
return $this->_directory;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Set Logger
|
80 |
+
*
|
81 |
+
* @param object $logger
|
82 |
+
* @return object $this
|
83 |
+
*/
|
84 |
+
public function setLogger( Mvied_Logger_Interface $logger ) {
|
85 |
+
$this->_logger = $logger;
|
86 |
+
return $this;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get Logger
|
91 |
+
*
|
92 |
+
* @param none
|
93 |
+
* @return object
|
94 |
+
*/
|
95 |
+
public function getLogger() {
|
96 |
+
if ( ! isset($this->_logger) ) {
|
97 |
+
die(__CLASS__ . ' missing Logger dependency.');
|
98 |
+
}
|
99 |
+
|
100 |
+
return $this->_logger->getInstance();
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get Setting
|
105 |
+
*
|
106 |
+
* @param string $setting
|
107 |
+
* @param int $setting_blog_id
|
108 |
+
* @return mixed
|
109 |
+
*/
|
110 |
+
public function getSetting( $setting, $blog_id = 0 ) {
|
111 |
+
$setting_full = $this->getSlug() . '_' . $setting;
|
112 |
+
if ( $blog_id > 0 ) {
|
113 |
+
if (!isset($this->_blog_option_cache[$blog_id]))
|
114 |
+
$this->_blog_option_cache[$blog_id] = array();
|
115 |
+
if (isset($this->_blog_option_cache[$blog_id][$setting_full]))
|
116 |
+
$value = $this->_blog_option_cache[$blog_id][$setting_full];
|
117 |
+
else {
|
118 |
+
$value = get_blog_option($blog_id, $setting_full);
|
119 |
+
$this->_blog_option_cache[$blog_id][$setting_full] = $value;
|
120 |
+
}
|
121 |
+
} else {
|
122 |
+
if (isset($this->_option_cache[$setting_full]))
|
123 |
+
$value = $this->_option_cache[$setting_full];
|
124 |
+
else {
|
125 |
+
$value = get_option($setting_full);
|
126 |
+
$this->_option_cache[$setting_full] = $value;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
// Load default option
|
131 |
+
if ( $value === false && array_key_exists($setting, $this->_settings) ) {
|
132 |
+
$value = $this->_settings[$setting];
|
133 |
+
}
|
134 |
+
// Convert 1's and 0's to boolean
|
135 |
+
switch( $value ) {
|
136 |
+
case "1":
|
137 |
+
$value = true;
|
138 |
+
break;
|
139 |
+
case "0":
|
140 |
+
$value = false;
|
141 |
+
break;
|
142 |
+
}
|
143 |
+
return $value;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Get Settings
|
148 |
+
*
|
149 |
+
* @param none
|
150 |
+
* @return array
|
151 |
+
*/
|
152 |
+
public function getSettings() {
|
153 |
+
return $this->_settings;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Set Setting
|
158 |
+
*
|
159 |
+
* @param string $setting
|
160 |
+
* @param mixed $value
|
161 |
+
* @param int $blog_id
|
162 |
+
* @return $this
|
163 |
+
*/
|
164 |
+
public function setSetting( $setting, $value, $blog_id = 0 ) {
|
165 |
+
$setting_full = $this->getSlug() . '_' . $setting;
|
166 |
+
if ( $blog_id > 0 ) {
|
167 |
+
update_blog_option($blog_id, $setting_full, $value);
|
168 |
+
} else {
|
169 |
+
update_option($setting_full, $value);
|
170 |
+
}
|
171 |
+
return $this;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Set Slug
|
176 |
+
*
|
177 |
+
* @param string $slug
|
178 |
+
* @return object $this
|
179 |
+
*/
|
180 |
+
public function setSlug( $slug ) {
|
181 |
+
$this->_slug = $slug;
|
182 |
+
return $this;
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Get Slug
|
187 |
+
*
|
188 |
+
* @param none
|
189 |
+
* @return string
|
190 |
+
*/
|
191 |
+
public function getSlug() {
|
192 |
+
return $this->_slug;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Set Version
|
197 |
+
*
|
198 |
+
* @param string $version
|
199 |
+
* @return object $this
|
200 |
+
*/
|
201 |
+
public function setVersion( $version ) {
|
202 |
+
$this->_version = $version;
|
203 |
+
return $this;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Get Version
|
208 |
+
*
|
209 |
+
* @param none
|
210 |
+
* @return string
|
211 |
+
*/
|
212 |
+
public function getVersion() {
|
213 |
+
return $this->_version;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Set View Directory
|
218 |
+
*
|
219 |
+
* @param string $view_directory
|
220 |
+
* @return object $this
|
221 |
+
*/
|
222 |
+
public function setViewDirectory( $view_directory ) {
|
223 |
+
$this->_view_directory = $view_directory;
|
224 |
+
return $this;
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Get View Directory
|
229 |
+
*
|
230 |
+
* @param none
|
231 |
+
* @return string
|
232 |
+
*/
|
233 |
+
public function getViewDirectory() {
|
234 |
+
return $this->_view_directory;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Render View
|
239 |
+
*
|
240 |
+
* @param none
|
241 |
+
* @return string
|
242 |
+
*/
|
243 |
+
public function renderView( $view = '', $args = array() ) {
|
244 |
+
extract($args);
|
245 |
+
include($this->getViewDirectory() . DIRECTORY_SEPARATOR . $view . '.php');
|
246 |
+
}
|
247 |
+
|
248 |
+
}
|
lib/{WordPressHTTPS → Mvied}/Logger.php
RENAMED
@@ -1,18 +1,18 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Logger
|
4 |
*
|
5 |
* @author Mike Ems
|
6 |
-
* @package
|
7 |
*
|
8 |
*/
|
9 |
|
10 |
-
class
|
11 |
|
12 |
/**
|
13 |
* Instance
|
14 |
*
|
15 |
-
* @var
|
16 |
*/
|
17 |
private static $_instance;
|
18 |
|
@@ -22,12 +22,12 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
|
|
22 |
* @var array
|
23 |
*/
|
24 |
protected $_log = array();
|
25 |
-
|
26 |
/**
|
27 |
* Get singleton instance
|
28 |
*
|
29 |
* @param none
|
30 |
-
* @return
|
31 |
*/
|
32 |
public static function getInstance() {
|
33 |
if ( ! isset(self::$_instance) ) {
|
@@ -45,7 +45,18 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
|
|
45 |
public function getLog() {
|
46 |
return $this->_log;
|
47 |
}
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* Adds a string to an array of log entries
|
51 |
*
|
@@ -56,7 +67,7 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
|
|
56 |
$this->_log[] = $string;
|
57 |
return $this;
|
58 |
}
|
59 |
-
|
60 |
/**
|
61 |
* Console Log
|
62 |
*
|
@@ -68,8 +79,6 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
|
|
68 |
public function consoleLog() {
|
69 |
$code = "<script type=\"text/javascript\">\n\tif ( typeof console === 'object' ) {\n";
|
70 |
$log = $this->getLog();
|
71 |
-
array_unshift($log, '[BEGIN WordPress HTTPS Debug Log]');
|
72 |
-
array_push($log, '[END WordPress HTTPS Debug Log]');
|
73 |
foreach( $log as $log_entry ) {
|
74 |
if ( is_array($log_entry) ) {
|
75 |
$log_entry = json_encode($log_entry);
|
@@ -81,7 +90,7 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
|
|
81 |
$code .= "\t}\n</script>\n";
|
82 |
return $code;
|
83 |
}
|
84 |
-
|
85 |
/**
|
86 |
* File Log
|
87 |
*
|
@@ -96,5 +105,5 @@ class WordPressHTTPS_Logger implements Mvied_Logger_Interface {
|
|
96 |
}
|
97 |
return file_put_contents($filename, implode("\r\n", $this->getLog()), FILE_APPEND);
|
98 |
}
|
99 |
-
|
100 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Logger
|
4 |
*
|
5 |
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
*
|
8 |
*/
|
9 |
|
10 |
+
class Mvied_Logger implements Mvied_Logger_Interface {
|
11 |
|
12 |
/**
|
13 |
* Instance
|
14 |
*
|
15 |
+
* @var Mvied_Logger
|
16 |
*/
|
17 |
private static $_instance;
|
18 |
|
22 |
* @var array
|
23 |
*/
|
24 |
protected $_log = array();
|
25 |
+
|
26 |
/**
|
27 |
* Get singleton instance
|
28 |
*
|
29 |
* @param none
|
30 |
+
* @return Mvied_Logger
|
31 |
*/
|
32 |
public static function getInstance() {
|
33 |
if ( ! isset(self::$_instance) ) {
|
45 |
public function getLog() {
|
46 |
return $this->_log;
|
47 |
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Sets log array
|
51 |
+
*
|
52 |
+
* @param array $log
|
53 |
+
* @return $this
|
54 |
+
*/
|
55 |
+
public function setLog( array $log = array() ) {
|
56 |
+
$this->_log = $log;
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
|
60 |
/**
|
61 |
* Adds a string to an array of log entries
|
62 |
*
|
67 |
$this->_log[] = $string;
|
68 |
return $this;
|
69 |
}
|
70 |
+
|
71 |
/**
|
72 |
* Console Log
|
73 |
*
|
79 |
public function consoleLog() {
|
80 |
$code = "<script type=\"text/javascript\">\n\tif ( typeof console === 'object' ) {\n";
|
81 |
$log = $this->getLog();
|
|
|
|
|
82 |
foreach( $log as $log_entry ) {
|
83 |
if ( is_array($log_entry) ) {
|
84 |
$log_entry = json_encode($log_entry);
|
90 |
$code .= "\t}\n</script>\n";
|
91 |
return $code;
|
92 |
}
|
93 |
+
|
94 |
/**
|
95 |
* File Log
|
96 |
*
|
105 |
}
|
106 |
return file_put_contents($filename, implode("\r\n", $this->getLog()), FILE_APPEND);
|
107 |
}
|
108 |
+
|
109 |
}
|
lib/Mvied/Model.php
CHANGED
@@ -7,54 +7,124 @@
|
|
7 |
*/
|
8 |
class Mvied_Model {
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
protected $_post;
|
11 |
|
|
|
|
|
|
|
|
|
|
|
12 |
public $ID;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
public $name;
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
}
|
|
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$reflect = new ReflectionClass($this);
|
26 |
$properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
|
27 |
foreach($properties as $property) {
|
28 |
-
$property
|
29 |
-
|
30 |
-
$this->$property = get_post_meta($this->ID, $property, true);
|
31 |
}
|
32 |
}
|
|
|
33 |
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
39 |
public function getPost() {
|
|
|
|
|
|
|
|
|
|
|
40 |
return $this->_post;
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
public function load( $array = array() ) {
|
44 |
foreach($array as $key => $value) {
|
45 |
-
if
|
|
|
46 |
$this->$key = $value;
|
47 |
}
|
48 |
}
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
public function save() {
|
52 |
-
$
|
53 |
-
$
|
54 |
-
|
55 |
-
|
56 |
-
if ( strpos($property, '_') !== 0 ) {
|
57 |
-
update_post_meta($this->_post->ID, $property, $this->$property);
|
58 |
}
|
59 |
}
|
60 |
}
|
7 |
*/
|
8 |
class Mvied_Model {
|
9 |
|
10 |
+
/**
|
11 |
+
* Post
|
12 |
+
*
|
13 |
+
* @var Mvied_Post
|
14 |
+
*/
|
15 |
protected $_post;
|
16 |
|
17 |
+
/**
|
18 |
+
* Post ID
|
19 |
+
*
|
20 |
+
* @var int
|
21 |
+
*/
|
22 |
public $ID;
|
23 |
|
24 |
+
/**
|
25 |
+
* Name
|
26 |
+
*
|
27 |
+
* @var string
|
28 |
+
*/
|
29 |
public $name;
|
30 |
|
31 |
+
/**
|
32 |
+
* Instantiate Model from ID
|
33 |
+
*
|
34 |
+
* @param int $id
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function __construct( $id = null ) {
|
38 |
+
if ($id > 0) {
|
39 |
+
$this->setPost(new Mvied_Post($id));
|
40 |
}
|
41 |
+
}
|
42 |
|
43 |
+
/**
|
44 |
+
* Getter
|
45 |
+
*
|
46 |
+
* @param string $property
|
47 |
+
* @return mixed
|
48 |
+
*/
|
49 |
+
public function __get( $property ) {
|
50 |
+
return $this->getPost()->getPostMeta($property);
|
51 |
+
}
|
52 |
|
53 |
+
/**
|
54 |
+
* Get Columns (Meta Data)
|
55 |
+
* @return array $columns
|
56 |
+
*/
|
57 |
+
public function getColumns() {
|
58 |
+
$columns = array();
|
59 |
$reflect = new ReflectionClass($this);
|
60 |
$properties = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
|
61 |
foreach($properties as $property) {
|
62 |
+
if (strpos($property, '_') !== 0) {
|
63 |
+
$columns[] = $property->getName();
|
|
|
64 |
}
|
65 |
}
|
66 |
+
return $columns;
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Get Post
|
71 |
+
*
|
72 |
+
* @param none
|
73 |
+
* @return Mvied_Post
|
74 |
+
*/
|
75 |
public function getPost() {
|
76 |
+
if (!$this->_post && !$this->ID) {
|
77 |
+
$this->setPost(new Mvied_Post);
|
78 |
+
} else if ($this->ID) {
|
79 |
+
$this->setPost(new Mvied_Post($this->ID));
|
80 |
+
}
|
81 |
return $this->_post;
|
82 |
}
|
83 |
|
84 |
+
/**
|
85 |
+
* Set Post
|
86 |
+
*
|
87 |
+
* @param Mvied_Post $post
|
88 |
+
* @return Mvied_Model
|
89 |
+
*/
|
90 |
+
public function setPost( Mvied_Post $post ) {
|
91 |
+
$this->_post = $post;
|
92 |
+
$this->ID = $post->ID;
|
93 |
+
$this->name = $post->post_title;
|
94 |
+
foreach($this->getColumns() as $column) {
|
95 |
+
if ($this->$column == null) {
|
96 |
+
$this->$column = $post->getPostMeta($column);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Load from Array
|
104 |
+
*
|
105 |
+
* @param array $array
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
public function load( $array = array() ) {
|
109 |
foreach($array as $key => $value) {
|
110 |
+
//if model has this column
|
111 |
+
if ( in_array($key, $this->getColumns()) ) {
|
112 |
$this->$key = $value;
|
113 |
}
|
114 |
}
|
115 |
}
|
116 |
|
117 |
+
/**
|
118 |
+
* Save
|
119 |
+
*
|
120 |
+
* @param none
|
121 |
+
* @return void
|
122 |
+
*/
|
123 |
public function save() {
|
124 |
+
$this->_post->save();
|
125 |
+
foreach($this->getColumns() as $column) {
|
126 |
+
if ( !in_array($column, array('ID','name')) ) {
|
127 |
+
$this->_post->updatePostMeta($column, $this->$column);
|
|
|
|
|
128 |
}
|
129 |
}
|
130 |
}
|
lib/Mvied/Modular.php
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Modular base class for a WordPress plugin or theme
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Modular extends Mvied_Base {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Module directory
|
12 |
+
*
|
13 |
+
* @var string
|
14 |
+
*/
|
15 |
+
protected $_module_directory;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Loaded Modules
|
19 |
+
*
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
+
protected $_modules = array();
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Set Module Directory
|
26 |
+
*
|
27 |
+
* @param string $module_directory
|
28 |
+
* @return object $this
|
29 |
+
*/
|
30 |
+
public function setModuleDirectory( $module_directory ) {
|
31 |
+
$this->_module_directory = $module_directory;
|
32 |
+
return $this;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get Module Directory
|
37 |
+
*
|
38 |
+
* @param none
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function getModuleDirectory() {
|
42 |
+
return $this->_module_directory;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get Available Modules
|
47 |
+
*
|
48 |
+
* @param none
|
49 |
+
* @return array $modules
|
50 |
+
*/
|
51 |
+
public function getAvailableModules() {
|
52 |
+
$modules = array();
|
53 |
+
if ( is_dir($this->getModuleDirectory()) && $module_directory = opendir($this->getModuleDirectory()) ) {
|
54 |
+
while ( false !== ($entry = readdir($module_directory)) ) {
|
55 |
+
if ( strpos($entry, '.') !== 0 && strpos($entry, '.php') !== false ) {
|
56 |
+
$module = str_replace('.php', '', $entry);
|
57 |
+
if ( $module != 'Interface' ) {
|
58 |
+
$modules[] = $module;
|
59 |
+
if ( is_dir($this->getModuleDirectory() . $module) && $sub_module_directory = opendir($this->getModuleDirectory() . $module) ) {
|
60 |
+
while ( false !== ($entry = readdir($sub_module_directory)) ) {
|
61 |
+
if ( $entry != '.' && $entry != '..' ) {
|
62 |
+
$sub_module = str_replace('.php', '', $entry);
|
63 |
+
$modules[] = $module . '\\' . $sub_module;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
return $modules;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get Module
|
76 |
+
*
|
77 |
+
* @param string $module
|
78 |
+
* @return object
|
79 |
+
*/
|
80 |
+
public function getModule( $module ) {
|
81 |
+
$module = 'Module\\' . $module;
|
82 |
+
if ( isset($module) ) {
|
83 |
+
if ( isset($this->_modules[$module]) ) {
|
84 |
+
return $this->_modules[$module];
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
die('Module not found: \'' . $module . '\'.');
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get Modules
|
93 |
+
*
|
94 |
+
* Returns an array of all loaded modules
|
95 |
+
*
|
96 |
+
* @param none
|
97 |
+
* @return array $modules
|
98 |
+
*/
|
99 |
+
public function getModules() {
|
100 |
+
$modules = array();
|
101 |
+
if ( isset($this->_modules) ) {
|
102 |
+
$modules = $this->_modules;
|
103 |
+
}
|
104 |
+
return $modules;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Set Module
|
109 |
+
*
|
110 |
+
* @param string $module
|
111 |
+
* @param object $object
|
112 |
+
* @return $this
|
113 |
+
*/
|
114 |
+
public function setModule( $module, $object ) {
|
115 |
+
$this->_modules[$module] = $object;
|
116 |
+
return $this;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Init
|
121 |
+
*
|
122 |
+
* Initializes all of the modules.
|
123 |
+
*
|
124 |
+
* @param none
|
125 |
+
* @return $this
|
126 |
+
*/
|
127 |
+
public function init() {
|
128 |
+
$modules = $this->getModules();
|
129 |
+
foreach( $modules as $module ) {
|
130 |
+
$module->init();
|
131 |
+
}
|
132 |
+
if ( isset($this->_slug) ) {
|
133 |
+
do_action($this->_slug . '_init');
|
134 |
+
}
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Is Module Loaded?
|
140 |
+
*
|
141 |
+
* @param string $module
|
142 |
+
* @return boolean
|
143 |
+
*/
|
144 |
+
public function isModuleLoaded( $module ) {
|
145 |
+
if ( is_object($this->getModule($module)) ) {
|
146 |
+
return true;
|
147 |
+
} else {
|
148 |
+
return false;
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Load Modules
|
154 |
+
*
|
155 |
+
* Load specified modules. If no modules are specified, all modules are loaded.
|
156 |
+
*
|
157 |
+
* @param array $modules
|
158 |
+
* @return $this
|
159 |
+
*/
|
160 |
+
public function loadModules( $modules = array() ) {
|
161 |
+
if ( sizeof($modules) == 0 ) {
|
162 |
+
$modules = $this->getAvailableModules();
|
163 |
+
}
|
164 |
+
|
165 |
+
foreach( $modules as $module ) {
|
166 |
+
$this->loadModule( $module );
|
167 |
+
}
|
168 |
+
return $this;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Unload Module
|
173 |
+
*
|
174 |
+
* @param string $module
|
175 |
+
* @return $this
|
176 |
+
*/
|
177 |
+
public function unloadModule( $module ) {
|
178 |
+
$base_class = get_class($this);
|
179 |
+
$module = 'Module\\' . $module;
|
180 |
+
|
181 |
+
$modules = $this->getModules();
|
182 |
+
|
183 |
+
unset($modules[$module]);
|
184 |
+
|
185 |
+
$this->_modules = $modules;
|
186 |
+
|
187 |
+
return $this;
|
188 |
+
}
|
189 |
+
|
190 |
+
}
|
lib/Mvied/Plugin.php
DELETED
@@ -1,438 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Base class for a WordPress plugin.
|
4 |
-
*
|
5 |
-
* @author Mike Ems
|
6 |
-
* @package Mvied
|
7 |
-
*/
|
8 |
-
class Mvied_Plugin {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Base directory
|
12 |
-
*
|
13 |
-
* @var string
|
14 |
-
*/
|
15 |
-
protected $_directory;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Module directory
|
19 |
-
*
|
20 |
-
* @var string
|
21 |
-
*/
|
22 |
-
protected $_module_directory;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Loaded Modules
|
26 |
-
*
|
27 |
-
* @var array
|
28 |
-
*/
|
29 |
-
protected $_modules = array();
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Logger
|
33 |
-
*
|
34 |
-
* @var Mvied_Logger_Interface
|
35 |
-
*/
|
36 |
-
protected $_logger;
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Plugin URL
|
40 |
-
*
|
41 |
-
* @var string
|
42 |
-
*/
|
43 |
-
protected $_plugin_url;
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Plugin Settings
|
47 |
-
*
|
48 |
-
* @var array
|
49 |
-
*/
|
50 |
-
protected $_settings = array();
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Plugin Slug
|
54 |
-
*
|
55 |
-
* Used as a unqiue identifier for the plugin.
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
protected $_slug;
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Plugin Version
|
63 |
-
*
|
64 |
-
* @var string
|
65 |
-
*/
|
66 |
-
protected $_version;
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Set Directory
|
70 |
-
*
|
71 |
-
* @param string $directory
|
72 |
-
* @return object $this
|
73 |
-
*/
|
74 |
-
public function setDirectory( $directory ) {
|
75 |
-
$this->_directory = $directory;
|
76 |
-
return $this;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Get Directory
|
81 |
-
*
|
82 |
-
* @param none
|
83 |
-
* @return string
|
84 |
-
*/
|
85 |
-
public function getDirectory() {
|
86 |
-
return $this->_directory;
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Set Module Directory
|
91 |
-
*
|
92 |
-
* @param string $module_directory
|
93 |
-
* @return object $this
|
94 |
-
*/
|
95 |
-
public function setModuleDirectory( $module_directory ) {
|
96 |
-
$this->_module_directory = $module_directory;
|
97 |
-
return $this;
|
98 |
-
}
|
99 |
-
|
100 |
-
/**
|
101 |
-
* Get Module Directory
|
102 |
-
*
|
103 |
-
* @param none
|
104 |
-
* @return string
|
105 |
-
*/
|
106 |
-
public function getModuleDirectory() {
|
107 |
-
return $this->_module_directory;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Get Available Modules
|
112 |
-
*
|
113 |
-
* @param none
|
114 |
-
* @return array $modules
|
115 |
-
*/
|
116 |
-
public function getAvailableModules() {
|
117 |
-
$modules = array();
|
118 |
-
if ( is_dir($this->getModuleDirectory()) && $module_directory = opendir($this->getModuleDirectory()) ) {
|
119 |
-
while ( false !== ($entry = readdir($module_directory)) ) {
|
120 |
-
if ( strpos($entry, '.') !== 0 && strpos($entry, '.php') !== false ) {
|
121 |
-
$module = str_replace('.php', '', $entry);
|
122 |
-
if ( $module != 'Interface' ) {
|
123 |
-
$modules[] = $module;
|
124 |
-
if ( is_dir($this->getModuleDirectory() . $module) && $sub_module_directory = opendir($this->getModuleDirectory() . $module) ) {
|
125 |
-
while ( false !== ($entry = readdir($sub_module_directory)) ) {
|
126 |
-
if ( $entry != '.' && $entry != '..' ) {
|
127 |
-
$sub_module = str_replace('.php', '', $entry);
|
128 |
-
$modules[] = $module . '\\' . $sub_module;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
}
|
134 |
-
}
|
135 |
-
}
|
136 |
-
return $modules;
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Get Module
|
141 |
-
*
|
142 |
-
* @param string $module
|
143 |
-
* @return object
|
144 |
-
*/
|
145 |
-
public function getModule( $module ) {
|
146 |
-
$module = 'Module\\' . $module;
|
147 |
-
if ( isset($module) ) {
|
148 |
-
if ( isset($this->_modules[$module]) ) {
|
149 |
-
return $this->_modules[$module];
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
die('Module not found: \'' . $module . '\'.');
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Get Modules
|
158 |
-
*
|
159 |
-
* Returns an array of all loaded modules
|
160 |
-
*
|
161 |
-
* @param none
|
162 |
-
* @return array $modules
|
163 |
-
*/
|
164 |
-
public function getModules() {
|
165 |
-
$modules = array();
|
166 |
-
if ( isset($this->_modules) ) {
|
167 |
-
$modules = $this->_modules;
|
168 |
-
}
|
169 |
-
return $modules;
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Set Module
|
174 |
-
*
|
175 |
-
* @param string $module
|
176 |
-
* @param object $object
|
177 |
-
* @return $this
|
178 |
-
*/
|
179 |
-
public function setModule( $module, $object ) {
|
180 |
-
$this->_modules[$module] = $object;
|
181 |
-
return $this;
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Set Logger
|
186 |
-
*
|
187 |
-
* @param object $logger
|
188 |
-
* @return object $this
|
189 |
-
*/
|
190 |
-
public function setLogger( Mvied_Logger_Interface $logger ) {
|
191 |
-
$this->_logger = $logger;
|
192 |
-
return $this;
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* Get Logger
|
197 |
-
*
|
198 |
-
* @param none
|
199 |
-
* @return object
|
200 |
-
*/
|
201 |
-
public function getLogger() {
|
202 |
-
if ( ! isset($this->_logger) ) {
|
203 |
-
die(__CLASS__ . ' missing Logger dependency.');
|
204 |
-
}
|
205 |
-
|
206 |
-
return $this->_logger->getInstance();
|
207 |
-
}
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Set Plugin Url
|
211 |
-
*
|
212 |
-
* @param string $plugin_url
|
213 |
-
* @return object $this
|
214 |
-
*/
|
215 |
-
public function setPluginUrl( $plugin_url ) {
|
216 |
-
$this->_plugin_url = $plugin_url;
|
217 |
-
return $this;
|
218 |
-
}
|
219 |
-
|
220 |
-
/**
|
221 |
-
* Get Plugin Url
|
222 |
-
*
|
223 |
-
* @param none
|
224 |
-
* @return string
|
225 |
-
*/
|
226 |
-
public function getPluginUrl() {
|
227 |
-
return $this->_plugin_url;
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* Get Plugin Setting
|
232 |
-
*
|
233 |
-
* @param string $setting
|
234 |
-
* @param int $setting_blog_id
|
235 |
-
* @return mixed
|
236 |
-
*/
|
237 |
-
public function getSetting( $setting, $blog_id = 0 ) {
|
238 |
-
$setting_full = $this->getSlug() . '_' . $setting;
|
239 |
-
if ( $blog_id > 0 ) {
|
240 |
-
$value = get_blog_option($blog_id, $setting_full);
|
241 |
-
} else {
|
242 |
-
$value = get_option($setting_full);
|
243 |
-
}
|
244 |
-
|
245 |
-
// Load default option
|
246 |
-
if ( $value === false && array_key_exists($setting, $this->_settings) ) {
|
247 |
-
$value = $this->_settings[$setting];
|
248 |
-
}
|
249 |
-
// Convert 1's and 0's to boolean
|
250 |
-
switch( $value ) {
|
251 |
-
case "1":
|
252 |
-
$value = true;
|
253 |
-
break;
|
254 |
-
case "0":
|
255 |
-
$value = false;
|
256 |
-
break;
|
257 |
-
}
|
258 |
-
return $value;
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Get Plugin Settings
|
263 |
-
*
|
264 |
-
* @param none
|
265 |
-
* @return array
|
266 |
-
*/
|
267 |
-
public function getSettings() {
|
268 |
-
return $this->_settings;
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Set Plugin Setting
|
273 |
-
*
|
274 |
-
* @param string $setting
|
275 |
-
* @param mixed $value
|
276 |
-
* @param int $blog_id
|
277 |
-
* @return $this
|
278 |
-
*/
|
279 |
-
public function setSetting( $setting, $value, $blog_id = 0 ) {
|
280 |
-
$setting_full = $this->getSlug() . '_' . $setting;
|
281 |
-
if ( $blog_id > 0 ) {
|
282 |
-
update_blog_option($blog_id, $setting_full, $value);
|
283 |
-
} else {
|
284 |
-
update_option($setting_full, $value);
|
285 |
-
}
|
286 |
-
return $this;
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Set Slug
|
291 |
-
*
|
292 |
-
* @param string $slug
|
293 |
-
* @return object $this
|
294 |
-
*/
|
295 |
-
public function setSlug( $slug ) {
|
296 |
-
$this->_slug = $slug;
|
297 |
-
return $this;
|
298 |
-
}
|
299 |
-
|
300 |
-
/**
|
301 |
-
* Get Slug
|
302 |
-
*
|
303 |
-
* @param none
|
304 |
-
* @return string
|
305 |
-
*/
|
306 |
-
public function getSlug() {
|
307 |
-
return $this->_slug;
|
308 |
-
}
|
309 |
-
|
310 |
-
/**
|
311 |
-
* Set Version
|
312 |
-
*
|
313 |
-
* @param string $version
|
314 |
-
* @return object $this
|
315 |
-
*/
|
316 |
-
public function setVersion( $version ) {
|
317 |
-
$this->_version = $version;
|
318 |
-
return $this;
|
319 |
-
}
|
320 |
-
|
321 |
-
/**
|
322 |
-
* Get Version
|
323 |
-
*
|
324 |
-
* @param none
|
325 |
-
* @return string
|
326 |
-
*/
|
327 |
-
public function getVersion() {
|
328 |
-
return $this->_version;
|
329 |
-
}
|
330 |
-
|
331 |
-
/**
|
332 |
-
* Init
|
333 |
-
*
|
334 |
-
* Initializes all of the modules.
|
335 |
-
*
|
336 |
-
* @param none
|
337 |
-
* @return $this
|
338 |
-
*/
|
339 |
-
public function init() {
|
340 |
-
$modules = $this->getModules();
|
341 |
-
foreach( $modules as $module ) {
|
342 |
-
$module->init();
|
343 |
-
}
|
344 |
-
if ( isset($this->_slug) ) {
|
345 |
-
do_action($this->_slug . '_init');
|
346 |
-
}
|
347 |
-
return $this;
|
348 |
-
}
|
349 |
-
|
350 |
-
/**
|
351 |
-
* Is Module Loaded?
|
352 |
-
*
|
353 |
-
* @param string $module
|
354 |
-
* @return boolean
|
355 |
-
*/
|
356 |
-
public function isModuleLoaded( $module ) {
|
357 |
-
if ( is_object($this->getModule($module)) ) {
|
358 |
-
return true;
|
359 |
-
} else {
|
360 |
-
return false;
|
361 |
-
}
|
362 |
-
}
|
363 |
-
|
364 |
-
/**
|
365 |
-
* Load Module
|
366 |
-
*
|
367 |
-
* @param string $module
|
368 |
-
* @return $this
|
369 |
-
*/
|
370 |
-
public function loadModule( $module ) {
|
371 |
-
if ( strpos(get_class($this), '_') !== false ) {
|
372 |
-
$base_class = substr(get_class($this), 0, strpos(get_class($this), '_'));
|
373 |
-
} else {
|
374 |
-
$base_class = get_class($this);
|
375 |
-
}
|
376 |
-
$module_full = 'Module\\' . $module;
|
377 |
-
$filename = str_replace('\\', '/', $module);
|
378 |
-
$filename = $filename . '.php';
|
379 |
-
|
380 |
-
require_once($this->getModuleDirectory() . $filename);
|
381 |
-
|
382 |
-
$class = $base_class . '_' . str_replace('\\', '_', $module_full);
|
383 |
-
if ( ! isset($this->_modules[$class]) || ! is_object($this->_modules[$class]) || get_class($this->_modules[$class]) != $class ) {
|
384 |
-
try {
|
385 |
-
$object = new $class;
|
386 |
-
$this->setModule($module_full, $object);
|
387 |
-
$this->getModule($module)->setPlugin($this);
|
388 |
-
} catch ( Exception $e ) {
|
389 |
-
die('Unable to load module: \'' . $module . '\'. ' . $e->getMessage());
|
390 |
-
}
|
391 |
-
}
|
392 |
-
|
393 |
-
return $this;
|
394 |
-
}
|
395 |
-
|
396 |
-
/**
|
397 |
-
* Load Modules
|
398 |
-
*
|
399 |
-
* Load specified modules. If no modules are specified, all modules are loaded.
|
400 |
-
*
|
401 |
-
* @param array $modules
|
402 |
-
* @return $this
|
403 |
-
*/
|
404 |
-
public function loadModules( $modules = array() ) {
|
405 |
-
if ( sizeof($modules) == 0 ) {
|
406 |
-
$modules = $this->getAvailableModules();
|
407 |
-
}
|
408 |
-
|
409 |
-
foreach( $modules as $module ) {
|
410 |
-
$this->loadModule( $module );
|
411 |
-
}
|
412 |
-
return $this;
|
413 |
-
}
|
414 |
-
|
415 |
-
/**
|
416 |
-
* Unload Module
|
417 |
-
*
|
418 |
-
* @param string $module
|
419 |
-
* @return $this
|
420 |
-
*/
|
421 |
-
public function unloadModule( $module ) {
|
422 |
-
if ( strpos(get_class($this), '_') !== false ) {
|
423 |
-
$base_class = substr(get_class($this), 0, strpos(get_class($this), '_'));
|
424 |
-
} else {
|
425 |
-
$base_class = get_class($this);
|
426 |
-
}
|
427 |
-
$module = 'Module\\' . $module;
|
428 |
-
|
429 |
-
$modules = $this->getModules();
|
430 |
-
|
431 |
-
unset($modules[$module]);
|
432 |
-
|
433 |
-
$this->_modules = $modules;
|
434 |
-
|
435 |
-
return $this;
|
436 |
-
}
|
437 |
-
|
438 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/Mvied/Plugin/Base.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Base Plugin
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Plugin_Base extends Mvied_Base {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Plugin URL
|
12 |
+
*
|
13 |
+
* @var string
|
14 |
+
*/
|
15 |
+
protected $_plugin_url;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Set Plugin Url
|
19 |
+
*
|
20 |
+
* @param string $plugin_url
|
21 |
+
* @return object $this
|
22 |
+
*/
|
23 |
+
public function setPluginUrl( $plugin_url ) {
|
24 |
+
$this->_plugin_url = $plugin_url;
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get Plugin Url
|
30 |
+
*
|
31 |
+
* @param none
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function getPluginUrl() {
|
35 |
+
return $this->_plugin_url;
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
lib/Mvied/Plugin/Modular.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Modular Plugin
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Plugin_Modular extends Mvied_Modular {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Plugin URL
|
12 |
+
*
|
13 |
+
* @var string
|
14 |
+
*/
|
15 |
+
protected $_plugin_url;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Set Plugin Url
|
19 |
+
*
|
20 |
+
* @param string $plugin_url
|
21 |
+
* @return object $this
|
22 |
+
*/
|
23 |
+
public function setPluginUrl( $plugin_url ) {
|
24 |
+
$this->_plugin_url = $plugin_url;
|
25 |
+
return $this;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get Plugin Url
|
30 |
+
*
|
31 |
+
* @param none
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function getPluginUrl() {
|
35 |
+
return $this->_plugin_url;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Load Module
|
40 |
+
*
|
41 |
+
* @param string $module
|
42 |
+
* @return $this
|
43 |
+
*/
|
44 |
+
public function loadModule( $module ) {
|
45 |
+
$base_class = get_class($this);
|
46 |
+
$module_full = 'Module\\' . $module;
|
47 |
+
$filename = str_replace('\\', '/', $module);
|
48 |
+
$filename = $filename . '.php';
|
49 |
+
|
50 |
+
require_once($this->getModuleDirectory() . $filename);
|
51 |
+
|
52 |
+
$class = $base_class . '_' . str_replace('\\', '_', $module_full);
|
53 |
+
if ( ! isset($this->_modules[$class]) || ! is_object($this->_modules[$class]) || get_class($this->_modules[$class]) != $class ) {
|
54 |
+
try {
|
55 |
+
$object = new $class;
|
56 |
+
$this->setModule($module_full, $object);
|
57 |
+
$this->getModule($module)->setPlugin($this);
|
58 |
+
} catch ( Exception $e ) {
|
59 |
+
die('Unable to load module: \'' . $module . '\'. ' . $e->getMessage());
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
return $this;
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
lib/Mvied/Plugin/Module.php
CHANGED
@@ -13,7 +13,7 @@ class Mvied_Plugin_Module implements Mvied_Plugin_Module_Interface {
|
|
13 |
/**
|
14 |
* Plugin object that this module extends
|
15 |
*
|
16 |
-
* @var
|
17 |
*/
|
18 |
protected $_plugin;
|
19 |
|
@@ -30,11 +30,10 @@ class Mvied_Plugin_Module implements Mvied_Plugin_Module_Interface {
|
|
30 |
/**
|
31 |
* Set Plugin
|
32 |
*
|
33 |
-
* @param
|
34 |
* @return object $this
|
35 |
-
* @uses Mvied_Plugin
|
36 |
*/
|
37 |
-
public function setPlugin(
|
38 |
$this->_plugin = $plugin;
|
39 |
return $this;
|
40 |
}
|
@@ -43,7 +42,7 @@ class Mvied_Plugin_Module implements Mvied_Plugin_Module_Interface {
|
|
43 |
* Get Plugin
|
44 |
*
|
45 |
* @param none
|
46 |
-
* @return
|
47 |
*/
|
48 |
public function getPlugin() {
|
49 |
if ( ! isset($this->_plugin) ) {
|
13 |
/**
|
14 |
* Plugin object that this module extends
|
15 |
*
|
16 |
+
* @var Mvied_Plugin_Modular
|
17 |
*/
|
18 |
protected $_plugin;
|
19 |
|
30 |
/**
|
31 |
* Set Plugin
|
32 |
*
|
33 |
+
* @param Mvied_Plugin_Modular $plugin
|
34 |
* @return object $this
|
|
|
35 |
*/
|
36 |
+
public function setPlugin( Mvied_Plugin_Modular $plugin ) {
|
37 |
$this->_plugin = $plugin;
|
38 |
return $this;
|
39 |
}
|
42 |
* Get Plugin
|
43 |
*
|
44 |
* @param none
|
45 |
+
* @return Mvied_Plugin_Modular
|
46 |
*/
|
47 |
public function getPlugin() {
|
48 |
if ( ! isset($this->_plugin) ) {
|
lib/Mvied/Plugin/Module/Interface.php
CHANGED
@@ -20,17 +20,16 @@ interface Mvied_Plugin_Module_Interface {
|
|
20 |
/**
|
21 |
* Set Plugin
|
22 |
*
|
23 |
-
* @param
|
24 |
* @return Mvied_Plugin_Module
|
25 |
-
* @uses Mvied_Plugin
|
26 |
*/
|
27 |
-
public function setPlugin(
|
28 |
|
29 |
/**
|
30 |
* Get Plugin
|
31 |
*
|
32 |
* @param none
|
33 |
-
* @return
|
34 |
*/
|
35 |
public function getPlugin();
|
36 |
}
|
20 |
/**
|
21 |
* Set Plugin
|
22 |
*
|
23 |
+
* @param Mvied_Plugin_Modular $plugin
|
24 |
* @return Mvied_Plugin_Module
|
|
|
25 |
*/
|
26 |
+
public function setPlugin( Mvied_Plugin_Modular $plugin );
|
27 |
|
28 |
/**
|
29 |
* Get Plugin
|
30 |
*
|
31 |
* @param none
|
32 |
+
* @return Mvied_Plugin_Modular
|
33 |
*/
|
34 |
public function getPlugin();
|
35 |
}
|
lib/Mvied/Post.php
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Post Object
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Post {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* @var int $ID Are you updating an existing post?
|
12 |
+
*/
|
13 |
+
public $ID;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @var string $post_title The title of your post.
|
17 |
+
*/
|
18 |
+
public $post_title;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* @var string $post_content The full text of the post.
|
22 |
+
*/
|
23 |
+
public $post_content;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @var string $post_name The name (slug) for your post
|
27 |
+
*/
|
28 |
+
public $post_name;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var string $post_status [ 'draft' | 'publish' | 'pending'| 'future' | 'private' | custom registered status ] Default 'draft'.
|
32 |
+
*/
|
33 |
+
public $post_status;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var string $post_type [ 'post' | 'page' | 'link' | 'nav_menu_item' | custom post type ] Default 'post'
|
37 |
+
*/
|
38 |
+
public $post_type;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var int $post_author The user ID number of the author. Default is the current user ID.
|
42 |
+
*/
|
43 |
+
public $post_author;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* @var string $ping_status [ 'closed' | 'open' ] Pingbacks or trackbacks allowed. Default is the option 'default_ping_status'.
|
47 |
+
*/
|
48 |
+
public $ping_status;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @var int $post_parent Sets the parent of the new post, if any. Default 0.
|
52 |
+
*/
|
53 |
+
public $post_parent;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @var int $menu_order If new post is a page, sets the order in which it should appear in supported menus. Default 0.
|
57 |
+
*/
|
58 |
+
public $menu_order;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @var string $to_ping Space or carriage return-separated list of URLs to ping. Default empty string.
|
62 |
+
*/
|
63 |
+
public $to_ping;
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @var string $pinged Space or carriage return-separated list of URLs that have been pinged. Default empty string.
|
67 |
+
*/
|
68 |
+
public $pinged;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* @var string $post_password Password for post, if any. Default empty string.
|
72 |
+
*/
|
73 |
+
public $post_password;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* @var string $post_excerpt For all your post excerpt needs.
|
77 |
+
*/
|
78 |
+
public $post_excerpt;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @var string $post_date [ Y-m-d H:i:s ] The time post was made.
|
82 |
+
*/
|
83 |
+
public $post_date;
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @var string $post_date_gmt [ Y-m-d H:i:s ] The time post was made, in GMT.
|
87 |
+
*/
|
88 |
+
public $post_date_gmt;
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @var string $comment_status [ 'closed' | 'open' ] Default is the option 'default_comment_status', or 'closed'.
|
92 |
+
*/
|
93 |
+
public $comment_status;
|
94 |
+
|
95 |
+
/**
|
96 |
+
* @var array $post_category [ array(<category id>, ...) ] Default empty.
|
97 |
+
*/
|
98 |
+
public $post_category;
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @var string|array $tags_input [ '<tag>, <tag>, ...' | array ] Default empty.
|
102 |
+
*/
|
103 |
+
public $tags_input;
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @var string|array $tax_input [ array( <taxonomy> => <array | string> ) ] For custom taxonomies. Default empty.
|
107 |
+
*/
|
108 |
+
public $tax_input;
|
109 |
+
|
110 |
+
/**
|
111 |
+
* @var string $page_template Default empty.
|
112 |
+
*/
|
113 |
+
public $page_template;
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Instantiate Post from ID
|
117 |
+
*
|
118 |
+
* @param int $id
|
119 |
+
* @throws Exception
|
120 |
+
* @return void
|
121 |
+
*/
|
122 |
+
public function __construct( $id = null) {
|
123 |
+
if ( $id ) {
|
124 |
+
$this->load( get_post($id, ARRAY_A) );
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Get Post Meta
|
130 |
+
*
|
131 |
+
* @param string $meta_key
|
132 |
+
* @param bool $single Return single value or array, default true
|
133 |
+
* @return mixed
|
134 |
+
*/
|
135 |
+
public function getPostMeta( $meta_key, $single = true ) {
|
136 |
+
if ($this->ID) {
|
137 |
+
return get_post_meta($this->ID, $meta_key, $single);
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Update Post Meta
|
143 |
+
*
|
144 |
+
* @param string $meta_key
|
145 |
+
* @param mixed $meta_value
|
146 |
+
* @return mixed
|
147 |
+
*/
|
148 |
+
public function updatePostMeta($meta_key, $meta_value) {
|
149 |
+
if ($this->ID) {
|
150 |
+
return update_post_meta($this->ID, $meta_key, $meta_value);
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Format objec to array
|
156 |
+
*
|
157 |
+
* @param none
|
158 |
+
* @return array
|
159 |
+
*/
|
160 |
+
public function toArray() {
|
161 |
+
return (array) $this;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Load from Array
|
166 |
+
*
|
167 |
+
* @param array $array
|
168 |
+
* @return mixed
|
169 |
+
*/
|
170 |
+
public function load( $array = array() ) {
|
171 |
+
foreach($array as $key => $value) {
|
172 |
+
$this->$key = $value;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Save
|
178 |
+
*
|
179 |
+
* @param none
|
180 |
+
* @return void
|
181 |
+
*/
|
182 |
+
public function save() {
|
183 |
+
if ($this->ID) {
|
184 |
+
return wp_update_post( $this->toArray() );
|
185 |
+
} else {
|
186 |
+
return $this->ID = wp_insert_post( $this->toArray() );
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
}
|
lib/Mvied/README.md
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Mvied
|
2 |
+
|
3 |
+
### About
|
4 |
+
This library was created by Mvied for quickly creating Plugins and Themes with WordPress.
|
5 |
+
|
6 |
+
### Tutorial
|
7 |
+
You can find an example plugin using this library at https://github.com/Mvied/example-plugin
|
lib/Mvied/Theme.php
DELETED
@@ -1,389 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Base class for a WordPress theme.
|
4 |
-
*
|
5 |
-
* @author Mike Ems
|
6 |
-
* @package Mvied
|
7 |
-
*/
|
8 |
-
class Mvied_Theme {
|
9 |
-
/**
|
10 |
-
* Base directory
|
11 |
-
*
|
12 |
-
* @var string
|
13 |
-
*/
|
14 |
-
protected $_directory;
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Module directory
|
18 |
-
*
|
19 |
-
* @var string
|
20 |
-
*/
|
21 |
-
protected $_module_directory;
|
22 |
-
/**
|
23 |
-
* Loaded Modules
|
24 |
-
*
|
25 |
-
* @var array
|
26 |
-
*/
|
27 |
-
protected $_modules = array();
|
28 |
-
/**
|
29 |
-
* Logger
|
30 |
-
*
|
31 |
-
* @var Mvied_Logger_Interface
|
32 |
-
*/
|
33 |
-
protected $_logger;
|
34 |
-
/**
|
35 |
-
* Theme Settings
|
36 |
-
*
|
37 |
-
* @var array
|
38 |
-
*/
|
39 |
-
protected $_settings = array();
|
40 |
-
/**
|
41 |
-
* Theme Slug
|
42 |
-
*
|
43 |
-
* Used as a unqiue identifier for the theme.
|
44 |
-
*
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
protected $_slug;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Theme Version
|
51 |
-
*
|
52 |
-
* @var string
|
53 |
-
*/
|
54 |
-
protected $_version;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Set Directory
|
58 |
-
*
|
59 |
-
* @param string $directory
|
60 |
-
* @return object $this
|
61 |
-
*/
|
62 |
-
public function setDirectory( $directory ) {
|
63 |
-
$this->_directory = $directory;
|
64 |
-
return $this;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get Directory
|
69 |
-
*
|
70 |
-
* @param none
|
71 |
-
* @return string
|
72 |
-
*/
|
73 |
-
public function getDirectory() {
|
74 |
-
return $this->_directory;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Set Module Directory
|
79 |
-
*
|
80 |
-
* @param string $module_directory
|
81 |
-
* @return object $this
|
82 |
-
*/
|
83 |
-
public function setModuleDirectory( $module_directory ) {
|
84 |
-
$this->_module_directory = $module_directory;
|
85 |
-
return $this;
|
86 |
-
}
|
87 |
-
|
88 |
-
/**
|
89 |
-
* Get Module Directory
|
90 |
-
*
|
91 |
-
* @param none
|
92 |
-
* @return string
|
93 |
-
*/
|
94 |
-
public function getModuleDirectory() {
|
95 |
-
return $this->_module_directory;
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Get Available Modules
|
100 |
-
*
|
101 |
-
* @param none
|
102 |
-
* @return array $modules
|
103 |
-
*/
|
104 |
-
public function getAvailableModules() {
|
105 |
-
$modules = array();
|
106 |
-
if ( is_dir($this->getModuleDirectory()) && $module_directory = opendir($this->getModuleDirectory()) ) {
|
107 |
-
while ( false !== ($entry = readdir($module_directory)) ) {
|
108 |
-
if ( $entry != '.' && $entry != '..' ) {
|
109 |
-
$module = str_replace('.php', '', $entry);
|
110 |
-
if ( $module != 'Interface' ) {
|
111 |
-
$modules[] = $module;
|
112 |
-
if ( is_dir($this->getModuleDirectory() . $module) && $sub_module_directory = opendir($this->getModuleDirectory() . $module) ) {
|
113 |
-
while ( false !== ($entry = readdir($sub_module_directory)) ) {
|
114 |
-
if ( $entry != '.' && $entry != '..' ) {
|
115 |
-
$sub_module = str_replace('.php', '', $entry);
|
116 |
-
$modules[] = $module . '\\' . $sub_module;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
-
}
|
121 |
-
}
|
122 |
-
}
|
123 |
-
}
|
124 |
-
return $modules;
|
125 |
-
}
|
126 |
-
/**
|
127 |
-
* Get Module
|
128 |
-
*
|
129 |
-
* @param string $module
|
130 |
-
* @return object
|
131 |
-
*/
|
132 |
-
public function getModule( $module ) {
|
133 |
-
$module = 'Module\\' . $module;
|
134 |
-
if ( isset($module) ) {
|
135 |
-
if ( isset($this->_modules[$module]) ) {
|
136 |
-
return $this->_modules[$module];
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
die('Module not found: \'' . $module . '\'.');
|
141 |
-
}
|
142 |
-
/**
|
143 |
-
* Get Modules
|
144 |
-
*
|
145 |
-
* Returns an array of all loaded modules
|
146 |
-
*
|
147 |
-
* @param none
|
148 |
-
* @return array $modules
|
149 |
-
*/
|
150 |
-
public function getModules() {
|
151 |
-
$modules = array();
|
152 |
-
if ( isset($this->_modules) ) {
|
153 |
-
$modules = $this->_modules;
|
154 |
-
}
|
155 |
-
return $modules;
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Set Module
|
160 |
-
*
|
161 |
-
* @param string $module
|
162 |
-
* @param object $object
|
163 |
-
* @return $this
|
164 |
-
*/
|
165 |
-
public function setModule( $module, $object ) {
|
166 |
-
$this->_modules[$module] = $object;
|
167 |
-
return $this;
|
168 |
-
}
|
169 |
-
/**
|
170 |
-
* Set Logger
|
171 |
-
*
|
172 |
-
* @param object $logger
|
173 |
-
* @return object $this
|
174 |
-
*/
|
175 |
-
public function setLogger( Mvied_Logger_Interface $logger ) {
|
176 |
-
$this->_logger = $logger;
|
177 |
-
return $this;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Get Logger
|
182 |
-
*
|
183 |
-
* @param none
|
184 |
-
* @return object
|
185 |
-
*/
|
186 |
-
public function getLogger() {
|
187 |
-
if ( ! isset($this->_logger) ) {
|
188 |
-
die(__CLASS__ . ' missing Logger dependency.');
|
189 |
-
}
|
190 |
-
|
191 |
-
return $this->_logger->getInstance();
|
192 |
-
}
|
193 |
-
/**
|
194 |
-
* Get Theme Setting
|
195 |
-
*
|
196 |
-
* @param string $setting
|
197 |
-
* @param int $setting_blog_id
|
198 |
-
* @return mixed
|
199 |
-
*/
|
200 |
-
public function getSetting( $setting, $blog_id = 0 ) {
|
201 |
-
$setting_full = $this->getSlug() . '_' . $setting;
|
202 |
-
if ( $blog_id > 0 ) {
|
203 |
-
$value = get_blog_option($blog_id, $setting_full);
|
204 |
-
} else {
|
205 |
-
$value = get_option($setting_full);
|
206 |
-
}
|
207 |
-
// Load default option
|
208 |
-
if ( $value === false ) {
|
209 |
-
$value = $this->_settings[$setting];
|
210 |
-
}
|
211 |
-
// Convert 1's and 0's to boolean
|
212 |
-
switch( $value ) {
|
213 |
-
case "1":
|
214 |
-
$value = true;
|
215 |
-
break;
|
216 |
-
case "0":
|
217 |
-
$value = false;
|
218 |
-
break;
|
219 |
-
}
|
220 |
-
return $value;
|
221 |
-
}
|
222 |
-
/**
|
223 |
-
* Get Theme Settings
|
224 |
-
*
|
225 |
-
* @param none
|
226 |
-
* @return array
|
227 |
-
*/
|
228 |
-
public function getSettings() {
|
229 |
-
return $this->_settings;
|
230 |
-
}
|
231 |
-
|
232 |
-
/**
|
233 |
-
* Set Plugin Setting
|
234 |
-
*
|
235 |
-
* @param string $setting
|
236 |
-
* @param mixed $value
|
237 |
-
* @param int $blog_id
|
238 |
-
* @return $this
|
239 |
-
*/
|
240 |
-
public function setSetting( $setting, $value, $blog_id = 0 ) {
|
241 |
-
$setting_full = $this->getSlug() . '_' . $setting;
|
242 |
-
if ( $blog_id > 0 ) {
|
243 |
-
update_blog_option($blog_id, $setting_full, $value);
|
244 |
-
} else {
|
245 |
-
update_option($setting_full, $value);
|
246 |
-
}
|
247 |
-
return $this;
|
248 |
-
}
|
249 |
-
|
250 |
-
/**
|
251 |
-
* Set Slug
|
252 |
-
*
|
253 |
-
* @param string $slug
|
254 |
-
* @return object $this
|
255 |
-
*/
|
256 |
-
public function setSlug( $slug ) {
|
257 |
-
$this->_slug = $slug;
|
258 |
-
return $this;
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Get Slug
|
263 |
-
*
|
264 |
-
* @param none
|
265 |
-
* @return string
|
266 |
-
*/
|
267 |
-
public function getSlug() {
|
268 |
-
return $this->_slug;
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Set Version
|
273 |
-
*
|
274 |
-
* @param string $version
|
275 |
-
* @return object $this
|
276 |
-
*/
|
277 |
-
public function setVersion( $version ) {
|
278 |
-
$this->_version = $version;
|
279 |
-
return $this;
|
280 |
-
}
|
281 |
-
|
282 |
-
/**
|
283 |
-
* Get Version
|
284 |
-
*
|
285 |
-
* @param none
|
286 |
-
* @return string
|
287 |
-
*/
|
288 |
-
public function getVersion() {
|
289 |
-
return $this->_version;
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Init
|
294 |
-
*
|
295 |
-
* Initializes all of the modules.
|
296 |
-
*
|
297 |
-
* @param none
|
298 |
-
* @return $this
|
299 |
-
*/
|
300 |
-
public function init() {
|
301 |
-
$modules = $this->getModules();
|
302 |
-
foreach( $modules as $module ) {
|
303 |
-
$module->init();
|
304 |
-
}
|
305 |
-
if ( isset($this->_slug) ) {
|
306 |
-
do_action($this->_slug . '_init');
|
307 |
-
}
|
308 |
-
return $this;
|
309 |
-
}
|
310 |
-
/**
|
311 |
-
* Is Module Loaded?
|
312 |
-
*
|
313 |
-
* @param string $module
|
314 |
-
* @return boolean
|
315 |
-
*/
|
316 |
-
public function isModuleLoaded( $module ) {
|
317 |
-
if ( is_object($this->getModule($module)) ) {
|
318 |
-
return true;
|
319 |
-
} else {
|
320 |
-
return false;
|
321 |
-
}
|
322 |
-
}
|
323 |
-
/**
|
324 |
-
* Load Module
|
325 |
-
*
|
326 |
-
* @param string $module
|
327 |
-
* @return $this
|
328 |
-
*/
|
329 |
-
public function loadModule( $module ) {
|
330 |
-
if ( strpos(get_class($this), '_') !== false ) {
|
331 |
-
$base_class = substr(get_class($this), 0, strpos(get_class($this), '_'));
|
332 |
-
} else {
|
333 |
-
$base_class = get_class($this);
|
334 |
-
}
|
335 |
-
$module_full = 'Module\\' . $module;
|
336 |
-
$filename = str_replace('\\', '/', $module);
|
337 |
-
$filename = $filename . '.php';
|
338 |
-
|
339 |
-
require_once($this->getModuleDirectory() . $filename);
|
340 |
-
$class = $base_class . '_' . str_replace('\\', '_', $module_full);
|
341 |
-
if ( ! isset($this->_modules[$class]) || ! is_object($this->_modules[$class]) || get_class($this->_modules[$class]) != $class ) {
|
342 |
-
try {
|
343 |
-
$object = new $class;
|
344 |
-
$this->setModule($module_full, $object);
|
345 |
-
$this->getModule($module)->setTheme($this);
|
346 |
-
} catch ( Exception $e ) {
|
347 |
-
die('Unable to load module: \'' . $module . '\'. ' . $e->getMessage());
|
348 |
-
}
|
349 |
-
}
|
350 |
-
return $this;
|
351 |
-
}
|
352 |
-
/**
|
353 |
-
* Load Modules
|
354 |
-
*
|
355 |
-
* Load specified modules. If no modules are specified, all modules are loaded.
|
356 |
-
*
|
357 |
-
* @param array $modules
|
358 |
-
* @return $this
|
359 |
-
*/
|
360 |
-
public function loadModules( $modules = array() ) {
|
361 |
-
if ( sizeof($modules) == 0 ) {
|
362 |
-
$modules = $this->getAvailableModules();
|
363 |
-
}
|
364 |
-
foreach( $modules as $module ) {
|
365 |
-
$this->loadModule( $module );
|
366 |
-
}
|
367 |
-
return $this;
|
368 |
-
}
|
369 |
-
/**
|
370 |
-
* Unload Module
|
371 |
-
*
|
372 |
-
* @param string $module
|
373 |
-
* @return $this
|
374 |
-
*/
|
375 |
-
public function unloadModule( $module ) {
|
376 |
-
if ( strpos(get_class($this), '_') !== false ) {
|
377 |
-
$base_class = substr(get_class($this), 0, strpos(get_class($this), '_'));
|
378 |
-
} else {
|
379 |
-
$base_class = get_class($this);
|
380 |
-
}
|
381 |
-
$module = 'Module\\' . $module;
|
382 |
-
$modules = $this->getModules();
|
383 |
-
|
384 |
-
unset($modules[$module]);
|
385 |
-
|
386 |
-
$this->_modules = $modules;
|
387 |
-
return $this;
|
388 |
-
}
|
389 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/Mvied/Theme/Base.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Base Theme
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Theme_Base extends Mvied_Base {
|
9 |
+
|
10 |
+
}
|
lib/Mvied/Theme/Modular.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Modular Theme
|
4 |
+
*
|
5 |
+
* @author Mike Ems
|
6 |
+
* @package Mvied
|
7 |
+
*/
|
8 |
+
class Mvied_Theme_Modular extends Mvied_Modular {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Load Module
|
12 |
+
*
|
13 |
+
* @param string $module
|
14 |
+
* @return $this
|
15 |
+
*/
|
16 |
+
public function loadModule( $module ) {
|
17 |
+
$base_class = get_class($this);
|
18 |
+
$module_full = 'Module\\' . $module;
|
19 |
+
$filename = str_replace('\\', '/', $module);
|
20 |
+
$filename = $filename . '.php';
|
21 |
+
|
22 |
+
require_once($this->getModuleDirectory() . $filename);
|
23 |
+
|
24 |
+
$class = $base_class . '_' . str_replace('\\', '_', $module_full);
|
25 |
+
if ( ! isset($this->_modules[$class]) || ! is_object($this->_modules[$class]) || get_class($this->_modules[$class]) != $class ) {
|
26 |
+
try {
|
27 |
+
$object = new $class;
|
28 |
+
$this->setModule($module_full, $object);
|
29 |
+
$this->getModule($module)->setTheme($this);
|
30 |
+
} catch ( Exception $e ) {
|
31 |
+
die('Unable to load module: \'' . $module . '\'. ' . $e->getMessage());
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
return $this;
|
36 |
+
}
|
37 |
+
|
38 |
+
}
|
lib/Mvied/Theme/Module.php
CHANGED
@@ -13,7 +13,7 @@ class Mvied_Theme_Module implements Mvied_Theme_Module_Interface {
|
|
13 |
/**
|
14 |
* Theme object that this module extends
|
15 |
*
|
16 |
-
* @var
|
17 |
*/
|
18 |
protected $_theme;
|
19 |
|
@@ -30,11 +30,10 @@ class Mvied_Theme_Module implements Mvied_Theme_Module_Interface {
|
|
30 |
/**
|
31 |
* Set Theme
|
32 |
*
|
33 |
-
* @param
|
34 |
* @return object $this
|
35 |
-
* @uses Mvied_Theme
|
36 |
*/
|
37 |
-
public function setTheme(
|
38 |
$this->_theme = $theme;
|
39 |
return $this;
|
40 |
}
|
@@ -43,7 +42,7 @@ class Mvied_Theme_Module implements Mvied_Theme_Module_Interface {
|
|
43 |
* Get Theme
|
44 |
*
|
45 |
* @param none
|
46 |
-
* @return
|
47 |
*/
|
48 |
public function getTheme() {
|
49 |
if ( ! isset($this->_theme) ) {
|
@@ -53,4 +52,4 @@ class Mvied_Theme_Module implements Mvied_Theme_Module_Interface {
|
|
53 |
return $this->_theme;
|
54 |
}
|
55 |
|
56 |
-
}
|
13 |
/**
|
14 |
* Theme object that this module extends
|
15 |
*
|
16 |
+
* @var Mvied_Theme_Modular
|
17 |
*/
|
18 |
protected $_theme;
|
19 |
|
30 |
/**
|
31 |
* Set Theme
|
32 |
*
|
33 |
+
* @param Mvied_Theme_Modular $theme
|
34 |
* @return object $this
|
|
|
35 |
*/
|
36 |
+
public function setTheme( Mvied_Theme_Modular $theme ) {
|
37 |
$this->_theme = $theme;
|
38 |
return $this;
|
39 |
}
|
42 |
* Get Theme
|
43 |
*
|
44 |
* @param none
|
45 |
+
* @return Mvied_Theme_Modular
|
46 |
*/
|
47 |
public function getTheme() {
|
48 |
if ( ! isset($this->_theme) ) {
|
52 |
return $this->_theme;
|
53 |
}
|
54 |
|
55 |
+
}
|
lib/Mvied/Theme/Module/Interface.php
CHANGED
@@ -20,17 +20,16 @@ interface Mvied_Theme_Module_Interface {
|
|
20 |
/**
|
21 |
* Set Theme
|
22 |
*
|
23 |
-
* @param
|
24 |
* @return Mvied_Theme_Module
|
25 |
-
* @uses Mvied_Theme
|
26 |
*/
|
27 |
-
public function setTheme(
|
28 |
|
29 |
/**
|
30 |
* Get Theme
|
31 |
*
|
32 |
* @param none
|
33 |
-
* @return
|
34 |
*/
|
35 |
public function getTheme();
|
36 |
}
|
20 |
/**
|
21 |
* Set Theme
|
22 |
*
|
23 |
+
* @param Mvied_Theme_Modular $theme
|
24 |
* @return Mvied_Theme_Module
|
|
|
25 |
*/
|
26 |
+
public function setTheme( Mvied_Theme_Modular $theme );
|
27 |
|
28 |
/**
|
29 |
* Get Theme
|
30 |
*
|
31 |
* @param none
|
32 |
+
* @return Mvied_Theme_Modular
|
33 |
*/
|
34 |
public function getTheme();
|
35 |
}
|
lib/{WordPressHTTPS → Mvied}/Url.php
RENAMED
@@ -1,14 +1,14 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* URL
|
4 |
*
|
5 |
* This class and its properties are heavily based on parse_url()
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
-
* @package
|
9 |
*
|
10 |
*/
|
11 |
-
class
|
12 |
|
13 |
/**
|
14 |
* The scheme of a network host; for example, http or https
|
@@ -158,7 +158,7 @@ class WordPressHTTPS_Url {
|
|
158 |
$test_url = clone $this;
|
159 |
$test_url->setPath('');
|
160 |
$host_parts = explode('.', $test_url->getHost());
|
161 |
-
for ( $i = 0; $i
|
162 |
$test_url->setHost( str_replace($host_parts[$i] . '.', '', $test_url->getHost()) );
|
163 |
if ( $test_url->isValid() ) {
|
164 |
$return_url = clone $test_url;
|
@@ -443,10 +443,10 @@ class WordPressHTTPS_Url {
|
|
443 |
/**
|
444 |
* Compares URL objects to determine if either of them are a subdomain of the other.
|
445 |
*
|
446 |
-
* @param
|
447 |
* @return boolean
|
448 |
*/
|
449 |
-
public function isSubdomain(
|
450 |
$this_host = $this->getBaseHost();
|
451 |
$other_host = $url->getBaseHost();
|
452 |
if ( $this_host == $other_host ) {
|
@@ -459,26 +459,25 @@ class WordPressHTTPS_Url {
|
|
459 |
* Factory object from an array provided by the parse_url function
|
460 |
*
|
461 |
* Example of usage:
|
462 |
-
* $site_url =
|
463 |
*
|
464 |
-
* @param array $
|
465 |
-
* @return $url
|
466 |
*/
|
467 |
-
public static function fromArray( $
|
468 |
-
if ( sizeof($
|
469 |
return false;
|
470 |
}
|
471 |
|
472 |
-
$url = new
|
473 |
-
$url->setScheme(
|
474 |
-
$url->setUser(
|
475 |
-
$url->setPass(
|
476 |
-
$url->setHost(
|
477 |
-
$url->setPort(
|
478 |
-
$url->setPath(
|
479 |
-
$url->setQuery(
|
480 |
-
$url->setFragment(
|
481 |
-
|
482 |
return $url;
|
483 |
}
|
484 |
|
@@ -486,25 +485,25 @@ class WordPressHTTPS_Url {
|
|
486 |
* Factory object from a string that contains a URL
|
487 |
*
|
488 |
* Example of usage:
|
489 |
-
* $site_url =
|
490 |
*
|
491 |
* @param string $string
|
492 |
-
* @return $url
|
493 |
*/
|
494 |
public static function fromString( $string ) {
|
495 |
-
$url = new
|
496 |
|
497 |
@preg_match_all('/((http|https):\/\/[^\'"]+)[\'"\)]?/i', $string, $url_parts);
|
498 |
if ( isset($url_parts[1][0]) ) {
|
499 |
if ( $url_parts = parse_url( $url_parts[1][0] ) ) {
|
500 |
-
$url->setScheme(
|
501 |
-
$url->setUser(
|
502 |
-
$url->setPass(
|
503 |
-
$url->setHost(
|
504 |
-
$url->setPort(
|
505 |
-
$url->setPath(
|
506 |
-
$url->setQuery(
|
507 |
-
$url->setFragment(
|
508 |
return $url;
|
509 |
}
|
510 |
} else {
|
@@ -534,7 +533,7 @@ class WordPressHTTPS_Url {
|
|
534 |
$string = ( $this->getScheme() ? $this->getScheme() . '://' : '' ) .
|
535 |
( $this->getUser() ? $this->getUser() . ( $this->getPass() ? ':' . $this->getPass() : '' ) . '@' : '' ) .
|
536 |
$this->getHost() .
|
537 |
-
( $this->getPort()
|
538 |
$this->getPath() .
|
539 |
( $this->getQuery() ? '?' . $this->getQuery() : '' ) .
|
540 |
( $this->getFragment() ? '#' . $this->getFragment() : '' );
|
1 |
<?php
|
2 |
/**
|
3 |
+
* URL object for easily manipulating URLs.
|
4 |
*
|
5 |
* This class and its properties are heavily based on parse_url()
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
+
* @package Mvied
|
9 |
*
|
10 |
*/
|
11 |
+
class Mvied_Url {
|
12 |
|
13 |
/**
|
14 |
* The scheme of a network host; for example, http or https
|
158 |
$test_url = clone $this;
|
159 |
$test_url->setPath('');
|
160 |
$host_parts = explode('.', $test_url->getHost());
|
161 |
+
for ( $i = 0; $i < sizeof($host_parts); $i++ ) {
|
162 |
$test_url->setHost( str_replace($host_parts[$i] . '.', '', $test_url->getHost()) );
|
163 |
if ( $test_url->isValid() ) {
|
164 |
$return_url = clone $test_url;
|
443 |
/**
|
444 |
* Compares URL objects to determine if either of them are a subdomain of the other.
|
445 |
*
|
446 |
+
* @param Mvied_Url $url
|
447 |
* @return boolean
|
448 |
*/
|
449 |
+
public function isSubdomain( Mvied_Url $url ) {
|
450 |
$this_host = $this->getBaseHost();
|
451 |
$other_host = $url->getBaseHost();
|
452 |
if ( $this_host == $other_host ) {
|
459 |
* Factory object from an array provided by the parse_url function
|
460 |
*
|
461 |
* Example of usage:
|
462 |
+
* $site_url = Mvied_Url::fromArray( parse_url( site_url() ) );
|
463 |
*
|
464 |
+
* @param array $url_parts
|
465 |
+
* @return $url Mvied_Url
|
466 |
*/
|
467 |
+
public static function fromArray( $url_parts = array() ) {
|
468 |
+
if ( sizeof($url_parts) <= 1 ) {
|
469 |
return false;
|
470 |
}
|
471 |
|
472 |
+
$url = new Mvied_Url;
|
473 |
+
$url->setScheme( isset($url_parts['scheme']) ? $url_parts['scheme'] : null );
|
474 |
+
$url->setUser( isset($url_parts['user']) ? $url_parts['user'] : null );
|
475 |
+
$url->setPass( isset($url_parts['pass']) ? $url_parts['pass'] : null );
|
476 |
+
$url->setHost( isset($url_parts['host']) ? $url_parts['host'] : null );
|
477 |
+
$url->setPort( isset($url_parts['port']) ? $url_parts['port'] : null );
|
478 |
+
$url->setPath( isset($url_parts['path']) ? $url_parts['path'] : null );
|
479 |
+
$url->setQuery( isset($url_parts['query']) ? $url_parts['query'] : null );
|
480 |
+
$url->setFragment( isset($url_parts['fragment']) ? $url_parts['fragment'] : null );
|
|
|
481 |
return $url;
|
482 |
}
|
483 |
|
485 |
* Factory object from a string that contains a URL
|
486 |
*
|
487 |
* Example of usage:
|
488 |
+
* $site_url = Mvied_Url::fromString( site_url() );
|
489 |
*
|
490 |
* @param string $string
|
491 |
+
* @return $url Mvied_Url
|
492 |
*/
|
493 |
public static function fromString( $string ) {
|
494 |
+
$url = new Mvied_Url;
|
495 |
|
496 |
@preg_match_all('/((http|https):\/\/[^\'"]+)[\'"\)]?/i', $string, $url_parts);
|
497 |
if ( isset($url_parts[1][0]) ) {
|
498 |
if ( $url_parts = parse_url( $url_parts[1][0] ) ) {
|
499 |
+
$url->setScheme( isset($url_parts['scheme']) ? $url_parts['scheme'] : null );
|
500 |
+
$url->setUser( isset($url_parts['user']) ? $url_parts['user'] : null );
|
501 |
+
$url->setPass( isset($url_parts['pass']) ? $url_parts['pass'] : null );
|
502 |
+
$url->setHost( isset($url_parts['host']) ? $url_parts['host'] : null );
|
503 |
+
$url->setPort( isset($url_parts['port']) ? $url_parts['port'] : null );
|
504 |
+
$url->setPath( isset($url_parts['path']) ? $url_parts['path'] : null );
|
505 |
+
$url->setQuery( isset($url_parts['query']) ? $url_parts['query'] : null );
|
506 |
+
$url->setFragment( isset($url_parts['fragment']) ? $url_parts['fragment'] : null );
|
507 |
return $url;
|
508 |
}
|
509 |
} else {
|
533 |
$string = ( $this->getScheme() ? $this->getScheme() . '://' : '' ) .
|
534 |
( $this->getUser() ? $this->getUser() . ( $this->getPass() ? ':' . $this->getPass() : '' ) . '@' : '' ) .
|
535 |
$this->getHost() .
|
536 |
+
( $this->getPort() ? ':' . $this->getPort() : '' ) .
|
537 |
$this->getPath() .
|
538 |
( $this->getQuery() ? '?' . $this->getQuery() : '' ) .
|
539 |
( $this->getFragment() ? '#' . $this->getFragment() : '' );
|
lib/WordPressHTTPS.php
CHANGED
@@ -1,73 +1,148 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* WordPress HTTPS
|
4 |
*
|
|
|
5 |
* @author Mike Ems
|
6 |
* @package WordPressHTTPS
|
7 |
*
|
8 |
*/
|
9 |
|
10 |
-
class WordPressHTTPS extends
|
11 |
|
12 |
/**
|
13 |
* HTTP URL
|
14 |
*
|
15 |
-
* @var
|
16 |
*/
|
17 |
protected $_http_url;
|
18 |
|
19 |
/**
|
20 |
* HTTPS URL
|
21 |
*
|
22 |
-
* @var
|
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' =>
|
|
|
|
|
|
|
|
|
49 |
);
|
50 |
|
51 |
/**
|
52 |
* File extensions to be loaded securely.
|
53 |
-
*
|
54 |
-
*
|
|
|
55 |
*/
|
56 |
-
protected $_file_extensions = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
/**
|
59 |
* Default External SSL Host Mapping
|
60 |
-
* @var array
|
61 |
*/
|
62 |
public static $ssl_host_mapping = array(
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
);
|
66 |
|
67 |
/**
|
68 |
* Get File Extensions to Secure
|
69 |
-
*
|
70 |
-
* @param none
|
71 |
* @return array
|
72 |
*/
|
73 |
public function getFileExtensions() {
|
@@ -76,22 +151,20 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
76 |
|
77 |
/**
|
78 |
* Get HTTP Url
|
79 |
-
*
|
80 |
-
* @
|
81 |
-
* @return WordPressHTTPS_Url
|
82 |
*/
|
83 |
public function getHttpUrl() {
|
84 |
if ( !isset($this->_http_url) ) {
|
85 |
-
$this->_http_url =
|
86 |
}
|
87 |
return $this->_http_url;
|
88 |
}
|
89 |
|
90 |
/**
|
91 |
* Get HTTPS Url
|
92 |
-
*
|
93 |
-
* @
|
94 |
-
* @return WordPressHTTPS_Url
|
95 |
*/
|
96 |
public function getHttpsUrl() {
|
97 |
if ( !isset($this->_https_url) ) {
|
@@ -107,7 +180,7 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
107 |
if ( strpos($ssl_host, 'http://') === false && strpos($ssl_host, 'https://') === false ) {
|
108 |
$ssl_host = 'https://' . $ssl_host;
|
109 |
}
|
110 |
-
$this->_https_url =
|
111 |
} else {
|
112 |
$this->setSetting('ssl_host_diff', 0);
|
113 |
}
|
@@ -117,9 +190,6 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
117 |
if ( strpos($this->_https_url->getPath(), $this->getHttpUrl()->getPath()) === false ) {
|
118 |
$this->_https_url->setPath( $this->_https_url->getPath() . $this->getHttpUrl()->getPath() );
|
119 |
}
|
120 |
-
|
121 |
-
// Add SSL Port to HTTPS URL
|
122 |
-
$this->_https_url->setPort($this->getSetting('ssl_port'));
|
123 |
}
|
124 |
|
125 |
return $this->_https_url;
|
@@ -127,32 +197,43 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
127 |
|
128 |
/**
|
129 |
* Get domains local to the WordPress installation.
|
130 |
-
*
|
131 |
-
* @param none
|
132 |
* @return array $hosts Array of domains local to the WordPress installation.
|
133 |
*/
|
134 |
public function getLocalDomains() {
|
|
|
|
|
|
|
|
|
|
|
135 |
global $wpdb;
|
136 |
$hosts = array(
|
137 |
$this->getHttpUrl()->getHost(),
|
138 |
-
$this->getHttpsUrl()->getHost()
|
139 |
);
|
140 |
|
141 |
if ( is_multisite() && is_subdomain_install() ) {
|
142 |
-
$multisite_hosts = $wpdb->get_col(
|
143 |
-
$hosts = array_merge($hosts, $multisite_hosts);
|
|
|
|
|
|
|
|
|
|
|
144 |
}
|
|
|
|
|
|
|
145 |
return $hosts;
|
146 |
}
|
147 |
|
148 |
/**
|
149 |
* Initialize
|
150 |
*
|
151 |
-
* @param none
|
152 |
* @return void
|
153 |
*/
|
154 |
public function init() {
|
155 |
-
$this->getLogger()->log('
|
156 |
$this->getLogger()->log('HTTP URL: ' . $this->getHttpUrl()->toString());
|
157 |
$this->getLogger()->log('HTTPS URL: ' . $this->getHttpsUrl()->toString());
|
158 |
$this->getLogger()->log('SSL: ' . ( $this->isSsl() ? 'Yes' : 'No' ));
|
@@ -167,80 +248,130 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
167 |
|
168 |
/**
|
169 |
* Install
|
170 |
-
*
|
171 |
-
* @param none
|
172 |
* @return void
|
173 |
*/
|
174 |
public function install() {
|
175 |
global $wpdb;
|
176 |
|
177 |
if ( is_multisite() && is_network_admin() ) {
|
178 |
-
$blogs = $wpdb->get_col(
|
179 |
} else {
|
180 |
$blogs = array($wpdb->blogid);
|
181 |
}
|
182 |
|
183 |
$defaults = $this->getSetting('network_defaults');
|
184 |
foreach ( $blogs as $blog_id ) {
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
if (
|
190 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
} else {
|
192 |
-
$
|
193 |
}
|
194 |
-
$this->setSetting($option, $value, $blog_id);
|
195 |
}
|
196 |
-
} else {
|
197 |
-
add_option($option, $value);
|
198 |
}
|
199 |
-
}
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
}
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
|
|
|
|
|
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
|
|
|
|
218 |
|
219 |
-
|
220 |
-
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
}
|
|
|
|
|
223 |
}
|
224 |
|
225 |
$is_subdomain = $this->getHttpsUrl()->isSubdomain($this->getHttpUrl());
|
226 |
foreach ( $blogs as $blog_id ) {
|
227 |
$this->setSetting('ssl_host_subdomain', $is_subdomain, $blog_id);
|
228 |
}
|
|
|
|
|
|
|
|
|
|
|
229 |
}
|
230 |
|
231 |
/**
|
232 |
* Is Local URL
|
233 |
-
*
|
234 |
* Determines if URL is local or external
|
235 |
*
|
236 |
* @param string $url
|
237 |
* @return boolean
|
238 |
*/
|
239 |
public function isUrlLocal($url) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
$hosts = $this->getLocalDomains();
|
241 |
if ( ($url_parts = @parse_url($url)) && isset($url_parts['host']) && !in_array($url_parts['host'], $hosts) ) {
|
|
|
242 |
return false;
|
243 |
}
|
|
|
244 |
return true;
|
245 |
}
|
246 |
|
@@ -251,27 +382,32 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
251 |
* @return string $string
|
252 |
*/
|
253 |
public function makeUrlHttps( $string ) {
|
254 |
-
if
|
255 |
-
return
|
|
|
|
|
256 |
}
|
|
|
|
|
|
|
257 |
|
258 |
// If relative, prepend appropriate path
|
259 |
if ( strpos($string, '/') === 0 ) {
|
260 |
if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) === false ) {
|
261 |
if ( $this->getHttpUrl()->getPath() == '/' ) {
|
262 |
-
$string = rtrim($this->getHttpsUrl()->getPath(), '/') . $string;
|
263 |
} else {
|
264 |
-
$string = str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $string);
|
265 |
}
|
266 |
}
|
267 |
-
} else if ( $url =
|
268 |
if ( $this->isUrlLocal($url) ) {
|
269 |
if ( $url->getScheme() == 'http' || ( $url->getScheme() == 'https' && $this->getSetting('ssl_host_diff') ) ) {
|
270 |
$has_host = ( $this->getHttpUrl()->getHost() == $this->getHttpsUrl()->getHost() ) || strpos($url, $this->getHttpsUrl()->getHost()) !== false;
|
271 |
$has_path = ( $this->getHttpUrl()->getPath() == $this->getHttpsUrl()->getPath() ) || strpos($url, $this->getHttpsUrl()->getPath()) !== false;
|
272 |
$has_port = ( (int)$this->getHttpsUrl()->getPort() > 0 ? strpos($url, ':' . $this->getHttpsUrl()->getPort()) !== false : true );
|
273 |
if ( $url->getScheme() == 'http' || !$has_host || !$has_path || !$has_port ) {
|
274 |
-
$updated =
|
275 |
$updated->setScheme('https');
|
276 |
$updated->setHost($this->getHttpsUrl()->getHost());
|
277 |
$updated->setPort($this->getHttpsUrl()->getPort());
|
@@ -284,16 +420,30 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
284 |
$updated->setPath(str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), $this->getHttpsUrl()->getPath(), $updated->getPath()));
|
285 |
}
|
286 |
}
|
|
|
|
|
|
|
|
|
|
|
287 |
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]) ) {
|
288 |
$redirect_url = $redirect[1];
|
289 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
}
|
291 |
-
$string = str_replace($url, $updated, $string);
|
292 |
}
|
293 |
}
|
294 |
} else {
|
295 |
-
$updated =
|
296 |
-
|
|
|
297 |
if ( @in_array($updated->toString(), $this->getSetting('secure_external_urls')) == false && @in_array($updated->toString(), $this->getSetting('unsecure_external_urls')) == false ) {
|
298 |
$test = clone $updated;
|
299 |
$test->setScheme('https');
|
@@ -308,8 +458,10 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
308 |
} else if ( in_array($updated->toString(), $this->getSetting('secure_external_urls')) ) {
|
309 |
$updated->setScheme('https');
|
310 |
}
|
311 |
-
if ( $url->toString()
|
312 |
-
$
|
|
|
|
|
313 |
}
|
314 |
}
|
315 |
unset($test);
|
@@ -326,19 +478,24 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
326 |
* @return string $string
|
327 |
*/
|
328 |
public function makeUrlHttp( $string ) {
|
329 |
-
if
|
330 |
-
return
|
|
|
|
|
331 |
}
|
|
|
|
|
|
|
332 |
|
333 |
// If relative
|
334 |
if ( strpos($string, '/') === 0 ) {
|
335 |
if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) !== false ) {
|
336 |
-
$string = str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $string);
|
337 |
}
|
338 |
-
} else if ( $url =
|
339 |
if ( $this->isUrlLocal($url) ) {
|
340 |
if ( $url->getScheme() == 'https' ) {
|
341 |
-
$updated =
|
342 |
$updated->setScheme('http');
|
343 |
$updated->setHost($this->getHttpUrl()->getHost());
|
344 |
$updated->setPort($this->getHttpUrl()->getPort());
|
@@ -349,11 +506,16 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
349 |
$redirect_url = $redirect[1];
|
350 |
$url = str_replace($redirect_url, urlencode($this->makeUrlHttp(urldecode($redirect_url))), $url);
|
351 |
}
|
352 |
-
$string = str_replace($url, $updated, $string);
|
353 |
}
|
354 |
} else {
|
355 |
-
$updated = apply_filters('http_external_url',
|
356 |
-
$
|
|
|
|
|
|
|
|
|
|
|
357 |
}
|
358 |
}
|
359 |
unset($updated);
|
@@ -400,29 +562,30 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
400 |
/**
|
401 |
* Checks if the current page is SSL
|
402 |
*
|
403 |
-
* @param none
|
404 |
* @return bool
|
405 |
*/
|
406 |
public function isSsl() {
|
|
|
407 |
// Some extra checks for Shared SSL
|
408 |
-
if ( is_ssl
|
409 |
-
|
410 |
} else if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
|
411 |
-
|
|
|
|
|
412 |
} else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
|
413 |
-
|
414 |
-
} else if ( $this->getSetting('ssl_host_diff') &&
|
415 |
-
|
416 |
-
} else if ( $this->getSetting('ssl_host_diff') &&
|
417 |
-
|
418 |
}
|
419 |
-
return is_ssl
|
420 |
}
|
421 |
-
|
422 |
/**
|
423 |
* Maintained for backwards compatibility.
|
424 |
*
|
425 |
-
* @param none
|
426 |
* @return bool
|
427 |
*/
|
428 |
public function is_ssl() {
|
@@ -436,9 +599,13 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
436 |
* @return void
|
437 |
*/
|
438 |
public function redirect( $scheme = 'https' ) {
|
439 |
-
|
440 |
-
|
441 |
-
|
|
|
|
|
|
|
|
|
442 |
}
|
443 |
|
444 |
$current_url = ( $this->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $current_path;
|
@@ -472,10 +639,9 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
472 |
}
|
473 |
|
474 |
/**
|
475 |
-
* Get
|
476 |
*
|
477 |
-
* @
|
478 |
-
* @return void
|
479 |
*/
|
480 |
public function getDirectories() {
|
481 |
$directories = array();
|
@@ -486,7 +652,7 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
486 |
$scannedDirectories[$directory]['name'] = $directory;
|
487 |
if ( is_readable($directory) && ($files = scandir($directory)) ) {
|
488 |
$scannedDirectories[$directory]['files'] = $files;
|
489 |
-
unset($files);
|
490 |
} else {
|
491 |
$scannedDirectories[$directory]['error'] = "Unable to read directory.";
|
492 |
}
|
@@ -494,4 +660,4 @@ class WordPressHTTPS extends Mvied_Plugin {
|
|
494 |
return $scannedDirectories;
|
495 |
}
|
496 |
|
497 |
-
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* WordPress HTTPS
|
4 |
*
|
5 |
+
* @class WordPressHTTPS
|
6 |
* @author Mike Ems
|
7 |
* @package WordPressHTTPS
|
8 |
*
|
9 |
*/
|
10 |
|
11 |
+
class WordPressHTTPS extends Mvied_Plugin_Modular {
|
12 |
|
13 |
/**
|
14 |
* HTTP URL
|
15 |
*
|
16 |
+
* @var Mvied_Url
|
17 |
*/
|
18 |
protected $_http_url;
|
19 |
|
20 |
/**
|
21 |
* HTTPS URL
|
22 |
*
|
23 |
+
* @var Mvied_Url
|
24 |
*/
|
25 |
protected $_https_url;
|
26 |
|
27 |
+
/**
|
28 |
+
* Local URL Cache
|
29 |
+
*
|
30 |
+
* @var array:string
|
31 |
+
*/
|
32 |
+
protected $_local_url_cache = array();
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Local HTTP URL Cache
|
36 |
+
*
|
37 |
+
* @var array:string
|
38 |
+
*/
|
39 |
+
protected $_local_http_url_cache = array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Local HTTPS URL Cache
|
43 |
+
* @var array:string
|
44 |
+
*/
|
45 |
+
protected $_local_https_url_cache = array();
|
46 |
+
|
47 |
/**
|
48 |
* Plugin Settings
|
49 |
+
*
|
50 |
* setting_name => default_value
|
51 |
*
|
52 |
+
* @var array:any
|
53 |
*/
|
54 |
protected $_settings = array(
|
55 |
'ssl_host' => '', // Hostname for SSL Host
|
|
|
56 |
'secure_external_urls' => array(), // Secure external URL's
|
57 |
'unsecure_external_urls' => array(), // Unsecure external URL's
|
58 |
'ssl_host_diff' => 0, // Is SSL Host different than WordPress host
|
59 |
'ssl_host_subdomain' => 0, // Is SSL Host a subdomain of WordPress host
|
60 |
'exclusive_https' => 0, // Redirect pages that are not secured to HTTP
|
61 |
+
'content_fixer' => 1, // Fix unsecure elements in HTML
|
62 |
'remove_unsecure' => 0, // Remove unsecure elements from HTML
|
63 |
'ssl_admin' => 0, // Force SSL Over Administration Panel (The same as FORCE_SSL_ADMIN)
|
64 |
'ssl_proxy' => 0, // Proxy detection
|
65 |
'debug' => 0, // Debug Mode
|
66 |
'admin_menu' => 'side', // HTTPS Admin Menu location
|
67 |
'secure_filter' => array(), // Expressions to secure URL's against
|
68 |
+
'unsecure_filter' => array(), // Expressions to unsecure URL's against
|
69 |
'ssl_host_mapping' => array(), // External SSL Hosts whose HTTPS content is on another domain
|
70 |
+
'network_defaults' => array(), // Default settings for new blogs on a multisite network
|
71 |
+
'path_cache' => array(), // Cache of URL paths to Post IDs
|
72 |
+
'blog_cache' => array(), // Cache of URL paths to Blog IDs
|
73 |
+
'version' => '', // Version of the plugin this blog has installed
|
74 |
+
'hosts' => array(),
|
75 |
);
|
76 |
|
77 |
/**
|
78 |
* File extensions to be loaded securely.
|
79 |
+
* File type => Array of extensions
|
80 |
+
*
|
81 |
+
* @var array:array
|
82 |
*/
|
83 |
+
protected $_file_extensions = array(
|
84 |
+
'script' => array(
|
85 |
+
'js'
|
86 |
+
),
|
87 |
+
'img' => array(
|
88 |
+
'jpg',
|
89 |
+
'jpeg',
|
90 |
+
'png',
|
91 |
+
'gif',
|
92 |
+
'ico'
|
93 |
+
),
|
94 |
+
'style' => array(
|
95 |
+
'css'
|
96 |
+
),
|
97 |
+
'font' => array(
|
98 |
+
'ttf',
|
99 |
+
'otf'
|
100 |
+
)
|
101 |
+
);
|
102 |
|
103 |
/**
|
104 |
* Default External SSL Host Mapping
|
105 |
+
* @var array:array
|
106 |
*/
|
107 |
public static $ssl_host_mapping = array(
|
108 |
+
array(
|
109 |
+
array(
|
110 |
+
'scheme' => 'http',
|
111 |
+
'host' => 'w.sharethis.com'
|
112 |
+
),array(
|
113 |
+
'scheme' => 'https',
|
114 |
+
'host' => 'ws.sharethis.com'
|
115 |
+
)
|
116 |
+
),array(
|
117 |
+
array(
|
118 |
+
'scheme' => 'https',
|
119 |
+
'host' => 'ws.sharethis.com'
|
120 |
+
),array(
|
121 |
+
'scheme' => 'http',
|
122 |
+
'host' => 'w.sharethis.com'
|
123 |
+
)
|
124 |
+
),array(
|
125 |
+
array(
|
126 |
+
'scheme' => 'http',
|
127 |
+
'host' => '\d.gravatar.com'
|
128 |
+
),array(
|
129 |
+
'scheme' => 'https',
|
130 |
+
'host' => 'secure.gravatar.com'
|
131 |
+
)
|
132 |
+
),array(
|
133 |
+
array(
|
134 |
+
'scheme' => 'https',
|
135 |
+
'host' => 'secure.gravatar.com'
|
136 |
+
),array(
|
137 |
+
'scheme' => 'http',
|
138 |
+
'host' => '0.gravatar.com'
|
139 |
+
)
|
140 |
+
)
|
141 |
);
|
142 |
|
143 |
/**
|
144 |
* Get File Extensions to Secure
|
145 |
+
*
|
|
|
146 |
* @return array
|
147 |
*/
|
148 |
public function getFileExtensions() {
|
151 |
|
152 |
/**
|
153 |
* Get HTTP Url
|
154 |
+
*
|
155 |
+
* @return Mvied_Url
|
|
|
156 |
*/
|
157 |
public function getHttpUrl() {
|
158 |
if ( !isset($this->_http_url) ) {
|
159 |
+
$this->_http_url = Mvied_Url::fromString('http://' . parse_url(get_bloginfo('template_url'), PHP_URL_HOST) . parse_url(home_url('/'), PHP_URL_PATH));
|
160 |
}
|
161 |
return $this->_http_url;
|
162 |
}
|
163 |
|
164 |
/**
|
165 |
* Get HTTPS Url
|
166 |
+
*
|
167 |
+
* @return Mvied_Url
|
|
|
168 |
*/
|
169 |
public function getHttpsUrl() {
|
170 |
if ( !isset($this->_https_url) ) {
|
180 |
if ( strpos($ssl_host, 'http://') === false && strpos($ssl_host, 'https://') === false ) {
|
181 |
$ssl_host = 'https://' . $ssl_host;
|
182 |
}
|
183 |
+
$this->_https_url = Mvied_Url::fromString( $ssl_host );
|
184 |
} else {
|
185 |
$this->setSetting('ssl_host_diff', 0);
|
186 |
}
|
190 |
if ( strpos($this->_https_url->getPath(), $this->getHttpUrl()->getPath()) === false ) {
|
191 |
$this->_https_url->setPath( $this->_https_url->getPath() . $this->getHttpUrl()->getPath() );
|
192 |
}
|
|
|
|
|
|
|
193 |
}
|
194 |
|
195 |
return $this->_https_url;
|
197 |
|
198 |
/**
|
199 |
* Get domains local to the WordPress installation.
|
200 |
+
*
|
|
|
201 |
* @return array $hosts Array of domains local to the WordPress installation.
|
202 |
*/
|
203 |
public function getLocalDomains() {
|
204 |
+
$hosts = $this->getSetting( 'hosts' );
|
205 |
+
|
206 |
+
if ( ! empty( $hosts ) )
|
207 |
+
return $hosts;
|
208 |
+
|
209 |
global $wpdb;
|
210 |
$hosts = array(
|
211 |
$this->getHttpUrl()->getHost(),
|
212 |
+
$this->getHttpsUrl()->getHost(),
|
213 |
);
|
214 |
|
215 |
if ( is_multisite() && is_subdomain_install() ) {
|
216 |
+
$multisite_hosts = $wpdb->get_col("SELECT domain FROM {$wpdb->blogs}");
|
217 |
+
$hosts = array_merge( $hosts, $multisite_hosts );
|
218 |
+
}
|
219 |
+
|
220 |
+
if ( function_exists( 'domain_mapping_siteurl' ) ) {
|
221 |
+
if ( $mapped_host = parse_url( domain_mapping_siteurl( false ), PHP_URL_HOST ) )
|
222 |
+
$hosts[] = $mapped_host;
|
223 |
}
|
224 |
+
|
225 |
+
$this->setSetting( 'hosts', $hosts );
|
226 |
+
|
227 |
return $hosts;
|
228 |
}
|
229 |
|
230 |
/**
|
231 |
* Initialize
|
232 |
*
|
|
|
233 |
* @return void
|
234 |
*/
|
235 |
public function init() {
|
236 |
+
$this->getLogger()->log('WordPress HTTPS: ' . $this->getVersion());
|
237 |
$this->getLogger()->log('HTTP URL: ' . $this->getHttpUrl()->toString());
|
238 |
$this->getLogger()->log('HTTPS URL: ' . $this->getHttpsUrl()->toString());
|
239 |
$this->getLogger()->log('SSL: ' . ( $this->isSsl() ? 'Yes' : 'No' ));
|
248 |
|
249 |
/**
|
250 |
* Install
|
251 |
+
*
|
|
|
252 |
* @return void
|
253 |
*/
|
254 |
public function install() {
|
255 |
global $wpdb;
|
256 |
|
257 |
if ( is_multisite() && is_network_admin() ) {
|
258 |
+
$blogs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
|
259 |
} else {
|
260 |
$blogs = array($wpdb->blogid);
|
261 |
}
|
262 |
|
263 |
$defaults = $this->getSetting('network_defaults');
|
264 |
foreach ( $blogs as $blog_id ) {
|
265 |
+
if ( version_compare($this->getSetting('version', $blog_id), $this->getVersion(), '<') ) {
|
266 |
+
if ( $this->getSetting('version', $blog_id) == '' ) {
|
267 |
+
// Add Settings
|
268 |
+
foreach ( $this->getSettings() as $option => $value ) {
|
269 |
+
if ( is_multisite() ) {
|
270 |
+
if ( add_blog_option($blog_id, $option, $value) && isset($defaults[$option]) && $defaults[$option] != '' ) {
|
271 |
+
if ( $option == 'ssl_host' && strpos($value, 'https://') !== 0 ) {
|
272 |
+
$value = 'https://' . rtrim($defaults[$option], '/') . '/';
|
273 |
+
} else {
|
274 |
+
$value = $defaults[$option];
|
275 |
+
}
|
276 |
+
$this->setSetting($option, $value, $blog_id);
|
277 |
+
}
|
278 |
} else {
|
279 |
+
add_option($option, $value);
|
280 |
}
|
|
|
281 |
}
|
|
|
|
|
282 |
}
|
|
|
283 |
|
284 |
+
// Fix a bug that saved the ssl_host as an object
|
285 |
+
if ( ! is_string($this->getSetting('ssl_host', $blog_id)) ) {
|
286 |
+
$this->setSetting('ssl_host', $this->_settings['ssl_host'], $blog_id);
|
287 |
+
$this->setSetting('ssl_host_diff', $this->_settings['ssl_host_diff'], $blog_id);
|
288 |
+
$this->setSetting('ssl_host_subdomain', $this->_settings['ssl_host_subdomain'], $blog_id);
|
289 |
+
}
|
|
|
290 |
|
291 |
+
// Remove old ssl_port setting and append to HTTPS URL
|
292 |
+
if ( (int)$this->getSetting('ssl_port', $blog_id) > 0 ) {
|
293 |
+
if ( $this->getSetting('ssl_port', $blog_id) != 443 ) {
|
294 |
+
$ssl_host = Mvied_Url::fromString( $this->getSetting('ssl_host', $blog_id) );
|
295 |
+
$ssl_host->setPort($this->getSetting('ssl_port', $blog_id));
|
296 |
+
$this->setSetting('ssl_host', $ssl_host->toString(), $blog_id);
|
297 |
+
}
|
298 |
+
$this->setSetting('ssl_port', null, $blog_id);
|
299 |
+
}
|
300 |
|
301 |
+
// If secure front page option exists, create front page filter
|
302 |
+
if ( $this->getSetting('frontpage', $blog_id) ) {
|
303 |
+
$this->setSetting('secure_filter', array_merge($this->getSetting('secure_filter'), array(rtrim(str_replace('http://', '', $this->getHttpUrl()->toString()), '/') . '/$')));
|
304 |
+
$this->setSetting('frontpage', 0, $blog_id);
|
305 |
+
}
|
306 |
|
307 |
+
// Reformat ssl_host_mapping
|
308 |
+
$ssl_host_mapping = $this->getSetting('ssl_host_mapping', $blog_id);
|
309 |
+
if ( $ssl_host_mapping != array() && !is_array($ssl_host_mapping[0]) ) {
|
310 |
+
$mappings = array();
|
311 |
+
foreach( $ssl_host_mapping as $http_host => $https_host ) {
|
312 |
+
$mappings[] = array(
|
313 |
+
array(
|
314 |
+
'scheme' => 'http',
|
315 |
+
'host' => $http_host
|
316 |
+
),
|
317 |
+
array(
|
318 |
+
'scheme' => 'https',
|
319 |
+
'host' => $https_host
|
320 |
+
)
|
321 |
+
);
|
322 |
+
}
|
323 |
+
$this->setSetting('ssl_host_mapping', $mappings, $blog_id);
|
324 |
+
}
|
325 |
+
// Set default URL Mapping
|
326 |
+
if ( $this->getSetting('ssl_host_mapping', $blog_id) == array() ) {
|
327 |
+
$this->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping, $blog_id);
|
328 |
+
}
|
329 |
+
|
330 |
+
// Reset cache
|
331 |
+
$this->setSetting('secure_external_urls', $this->_settings['secure_external_urls'], $blog_id);
|
332 |
+
$this->setSetting('unsecure_external_urls', $this->_settings['unsecure_external_urls'], $blog_id);
|
333 |
+
$this->setSetting('path_cache', $this->_settings['path_cache'], $blog_id);
|
334 |
+
$this->setSetting('blog_cache', $this->_settings['blog_cache'], $blog_id);
|
335 |
+
$this->setSetting('hosts', $this->_settings['hosts'], $blog_id);
|
336 |
}
|
337 |
+
|
338 |
+
$this->setSetting('version', $this->getVersion(), $blog_id);
|
339 |
}
|
340 |
|
341 |
$is_subdomain = $this->getHttpsUrl()->isSubdomain($this->getHttpUrl());
|
342 |
foreach ( $blogs as $blog_id ) {
|
343 |
$this->setSetting('ssl_host_subdomain', $is_subdomain, $blog_id);
|
344 |
}
|
345 |
+
|
346 |
+
// Check for deprecated modules
|
347 |
+
if ( file_exists( $this->getModuleDirectory() . '/DomainMapping.php') ) {
|
348 |
+
@unlink($this->getModuleDirectory() . '/DomainMapping.php');
|
349 |
+
}
|
350 |
}
|
351 |
|
352 |
/**
|
353 |
* Is Local URL
|
354 |
+
*
|
355 |
* Determines if URL is local or external
|
356 |
*
|
357 |
* @param string $url
|
358 |
* @return boolean
|
359 |
*/
|
360 |
public function isUrlLocal($url) {
|
361 |
+
if(is_object($url) && !method_exists($url, "__toString")) {
|
362 |
+
return false;
|
363 |
+
} else if ( (string)$url == '' ) {
|
364 |
+
return false;
|
365 |
+
}
|
366 |
+
$origUrl = (string)$url;
|
367 |
+
if (array_key_exists($origUrl, $this->_local_url_cache))
|
368 |
+
return $this->_local_url_cache[$origUrl];
|
369 |
$hosts = $this->getLocalDomains();
|
370 |
if ( ($url_parts = @parse_url($url)) && isset($url_parts['host']) && !in_array($url_parts['host'], $hosts) ) {
|
371 |
+
$this->_local_url_cache[$origUrl] = false;
|
372 |
return false;
|
373 |
}
|
374 |
+
$this->_local_url_cache[$origUrl] = true;
|
375 |
return true;
|
376 |
}
|
377 |
|
382 |
* @return string $string
|
383 |
*/
|
384 |
public function makeUrlHttps( $string ) {
|
385 |
+
if(is_object($string) && !method_exists($string, "__toString")) {
|
386 |
+
return $string;
|
387 |
+
} else if ( (string)$string == '' ) {
|
388 |
+
return $string;
|
389 |
}
|
390 |
+
$origString = (string)$string;
|
391 |
+
if (array_key_exists($origString, $this->_local_https_url_cache))
|
392 |
+
return $this->_local_https_url_cache[$origString];
|
393 |
|
394 |
// If relative, prepend appropriate path
|
395 |
if ( strpos($string, '/') === 0 ) {
|
396 |
if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) === false ) {
|
397 |
if ( $this->getHttpUrl()->getPath() == '/' ) {
|
398 |
+
$string = $this->_local_https_url_cache[$origString] = rtrim($this->getHttpsUrl()->getPath(), '/') . $string;
|
399 |
} else {
|
400 |
+
$string = $this->_local_https_url_cache[$origString] = str_replace($this->getHttpUrl()->getPath(), $this->getHttpsUrl()->getPath(), $string);
|
401 |
}
|
402 |
}
|
403 |
+
} else if ( $url = Mvied_Url::fromString( $string ) ) {
|
404 |
if ( $this->isUrlLocal($url) ) {
|
405 |
if ( $url->getScheme() == 'http' || ( $url->getScheme() == 'https' && $this->getSetting('ssl_host_diff') ) ) {
|
406 |
$has_host = ( $this->getHttpUrl()->getHost() == $this->getHttpsUrl()->getHost() ) || strpos($url, $this->getHttpsUrl()->getHost()) !== false;
|
407 |
$has_path = ( $this->getHttpUrl()->getPath() == $this->getHttpsUrl()->getPath() ) || strpos($url, $this->getHttpsUrl()->getPath()) !== false;
|
408 |
$has_port = ( (int)$this->getHttpsUrl()->getPort() > 0 ? strpos($url, ':' . $this->getHttpsUrl()->getPort()) !== false : true );
|
409 |
if ( $url->getScheme() == 'http' || !$has_host || !$has_path || !$has_port ) {
|
410 |
+
$updated = Mvied_Url::fromString( apply_filters('https_internal_url', $url->toString()) );
|
411 |
$updated->setScheme('https');
|
412 |
$updated->setHost($this->getHttpsUrl()->getHost());
|
413 |
$updated->setPort($this->getHttpsUrl()->getPort());
|
420 |
$updated->setPath(str_replace(rtrim($this->getHttpUrl()->getPath(), '/'), $this->getHttpsUrl()->getPath(), $updated->getPath()));
|
421 |
}
|
422 |
}
|
423 |
+
foreach( $this->getLocalDomains() as $domain ) {
|
424 |
+
$updated->setHost($domain);
|
425 |
+
$string = str_replace($url, $updated, $string);
|
426 |
+
}
|
427 |
+
// specific case for admin redirect URLs
|
428 |
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]) ) {
|
429 |
$redirect_url = $redirect[1];
|
430 |
+
$string = $this->_local_https_url_cache[$origString] = str_replace($redirect_url, urlencode($this->makeUrlHttps(urldecode($redirect_url))), $updated->toString());
|
431 |
+
} else if ( $url->toString() != $updated->toString() ) {
|
432 |
+
// if old url does not appear in string, this is probably due to trailing slash
|
433 |
+
if ( ! strpos( $url->toString(), $string ) && strpos($url->toString(), rtrim($string, '/')) ) {
|
434 |
+
$string = $this->_local_https_url_cache[$origString] = str_replace( $url->toString(), $updated->toString(), rtrim($string, '/') );
|
435 |
+
} else {
|
436 |
+
$string = $this->_local_https_url_cache[$origString] = str_replace( $url->toString(), $updated->toString(), $string );
|
437 |
+
}
|
438 |
+
} else {
|
439 |
+
$this->_local_https_url_cache[$origString] = $origString;
|
440 |
}
|
|
|
441 |
}
|
442 |
}
|
443 |
} else {
|
444 |
+
$updated = Mvied_Url::fromString( apply_filters('https_external_url', $url->toString()) );
|
445 |
+
if (!$updated || !is_string((string)$updated))
|
446 |
+
return;
|
447 |
if ( @in_array($updated->toString(), $this->getSetting('secure_external_urls')) == false && @in_array($updated->toString(), $this->getSetting('unsecure_external_urls')) == false ) {
|
448 |
$test = clone $updated;
|
449 |
$test->setScheme('https');
|
458 |
} else if ( in_array($updated->toString(), $this->getSetting('secure_external_urls')) ) {
|
459 |
$updated->setScheme('https');
|
460 |
}
|
461 |
+
if ( $url->toString() == $updated->toString() ) {
|
462 |
+
$this->_local_https_url_cache[$origString] = $origString;
|
463 |
+
} else {
|
464 |
+
$string = $this->_local_https_url_cache[$origString] = str_replace($url, $updated, $string);
|
465 |
}
|
466 |
}
|
467 |
unset($test);
|
478 |
* @return string $string
|
479 |
*/
|
480 |
public function makeUrlHttp( $string ) {
|
481 |
+
if(is_object($string) && !method_exists($string, "__toString")) {
|
482 |
+
return $string;
|
483 |
+
} else if ( (string)$string == '' ) {
|
484 |
+
return $string;
|
485 |
}
|
486 |
+
$origString = (string)$string;
|
487 |
+
if (array_key_exists($origString, $this->_local_http_url_cache))
|
488 |
+
return $this->_local_http_url_cache[$origString];
|
489 |
|
490 |
// If relative
|
491 |
if ( strpos($string, '/') === 0 ) {
|
492 |
if ( $this->getSetting('ssl_host_diff') && strpos($string, $this->getHttpsUrl()->getPath()) !== false ) {
|
493 |
+
$string = $this->_local_http_url_cache[$origString] = str_replace($this->getHttpsUrl()->getPath(), $this->getHttpUrl()->getPath(), $string);
|
494 |
}
|
495 |
+
} else if ( $url = Mvied_Url::fromString( $string ) ) {
|
496 |
if ( $this->isUrlLocal($url) ) {
|
497 |
if ( $url->getScheme() == 'https' ) {
|
498 |
+
$updated = Mvied_Url::fromString(apply_filters('http_internal_url', $url->toString()));
|
499 |
$updated->setScheme('http');
|
500 |
$updated->setHost($this->getHttpUrl()->getHost());
|
501 |
$updated->setPort($this->getHttpUrl()->getPort());
|
506 |
$redirect_url = $redirect[1];
|
507 |
$url = str_replace($redirect_url, urlencode($this->makeUrlHttp(urldecode($redirect_url))), $url);
|
508 |
}
|
509 |
+
$string = $this->_local_http_url_cache[$origString] = str_replace($url, $updated, $string);
|
510 |
}
|
511 |
} else {
|
512 |
+
$updated = Mvied_Url::fromString( apply_filters('http_external_url', $url->toString()) );
|
513 |
+
$updated->setScheme('http');
|
514 |
+
if ( $url->toString() == $updated->toString() ) {
|
515 |
+
$this->_local_http_url_cache[$origString] = $origString;
|
516 |
+
} else {
|
517 |
+
$string = $this->_local_http_url_cache[$origString] = str_replace($url, $updated, $string);
|
518 |
+
}
|
519 |
}
|
520 |
}
|
521 |
unset($updated);
|
562 |
/**
|
563 |
* Checks if the current page is SSL
|
564 |
*
|
|
|
565 |
* @return bool
|
566 |
*/
|
567 |
public function isSsl() {
|
568 |
+
$is_ssl = is_ssl();
|
569 |
// Some extra checks for Shared SSL
|
570 |
+
if ( $is_ssl && strpos($_SERVER['HTTP_HOST'], $this->getHttpsUrl()->getHost()) === false && $_SERVER['SERVER_ADDR'] != $_SERVER['HTTP_HOST'] ) {
|
571 |
+
$is_ssl = false;
|
572 |
} else if ( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') ) {
|
573 |
+
$is_ssl = true;
|
574 |
+
} else if ( isset($_SERVER['HTTP_X_FORWARDED_SSL']) && ( strtolower($_SERVER['HTTP_X_FORWARDED_SSL']) == 'on' || $_SERVER['HTTP_X_FORWARDED_SSL'] == 1 ) ) {
|
575 |
+
$is_ssl = true;
|
576 |
} else if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https' ) {
|
577 |
+
$is_ssl = true;
|
578 |
+
} else if ( $this->getSetting('ssl_host_diff') && !$is_ssl && isset($_SERVER['HTTP_X_FORWARDED_SERVER']) && $this->getHttpsUrl()->getHost() == $_SERVER['HTTP_X_FORWARDED_SERVER'] ) {
|
579 |
+
$is_ssl = true;
|
580 |
+
} 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 ) {
|
581 |
+
$is_ssl = true;
|
582 |
}
|
583 |
+
return apply_filters('is_ssl', $is_ssl);
|
584 |
}
|
585 |
+
|
586 |
/**
|
587 |
* Maintained for backwards compatibility.
|
588 |
*
|
|
|
589 |
* @return bool
|
590 |
*/
|
591 |
public function is_ssl() {
|
599 |
* @return void
|
600 |
*/
|
601 |
public function redirect( $scheme = 'https' ) {
|
602 |
+
if ( isset($_SERVER['REDIRECT_URL']) && strpos($_SERVER['REDIRECT_URL'], 'index.php') === false ) {
|
603 |
+
$current_path = $_SERVER['REDIRECT_URL'];
|
604 |
+
if ( strpos($_SERVER['REQUEST_URI'], '?') !== false && strpos($_SERVER['REDIRECT_URL'], '?') === false ) {
|
605 |
+
$current_path .= substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?'));
|
606 |
+
}
|
607 |
+
} else {
|
608 |
+
$current_path = $_SERVER['REQUEST_URI'];
|
609 |
}
|
610 |
|
611 |
$current_url = ( $this->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $current_path;
|
639 |
}
|
640 |
|
641 |
/**
|
642 |
+
* Get relevant files and directories within WordPress
|
643 |
*
|
644 |
+
* @return array $scannedDirectories
|
|
|
645 |
*/
|
646 |
public function getDirectories() {
|
647 |
$directories = array();
|
652 |
$scannedDirectories[$directory]['name'] = $directory;
|
653 |
if ( is_readable($directory) && ($files = scandir($directory)) ) {
|
654 |
$scannedDirectories[$directory]['files'] = $files;
|
655 |
+
unset($files);
|
656 |
} else {
|
657 |
$scannedDirectories[$directory]['error'] = "Unable to read directory.";
|
658 |
}
|
660 |
return $scannedDirectories;
|
661 |
}
|
662 |
|
663 |
+
}
|
lib/WordPressHTTPS/Module/Admin.php
CHANGED
@@ -18,13 +18,14 @@ class WordPressHTTPS_Module_Admin extends Mvied_Plugin_Module {
|
|
18 |
* @return void
|
19 |
*/
|
20 |
public function init() {
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
-
|
26 |
-
// Add global admin scripts
|
27 |
-
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'));
|
28 |
}
|
29 |
|
30 |
/**
|
@@ -35,7 +36,7 @@ class WordPressHTTPS_Module_Admin extends Mvied_Plugin_Module {
|
|
35 |
* @return void
|
36 |
*/
|
37 |
public function admin_enqueue_scripts() {
|
38 |
-
wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-global', $this->getPlugin()->getPluginUrl() . '/
|
39 |
}
|
40 |
|
41 |
/**
|
@@ -47,7 +48,7 @@ class WordPressHTTPS_Module_Admin extends Mvied_Plugin_Module {
|
|
47 |
*/
|
48 |
public function meta_box_render( $module, $metabox = array() ) {
|
49 |
if ( isset($metabox['args']['metabox']) ) {
|
50 |
-
|
51 |
}
|
52 |
}
|
53 |
|
18 |
* @return void
|
19 |
*/
|
20 |
public function init() {
|
21 |
+
if ( is_admin() ) {
|
22 |
+
// Load on plugins page
|
23 |
+
if ( strpos($_SERVER['REQUEST_URI'], 'plugins.php' ) ) {
|
24 |
+
add_filter( 'plugin_row_meta', array(&$this, 'plugin_links'), 10, 2);
|
25 |
+
}
|
26 |
+
// Add global admin scripts
|
27 |
+
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'));
|
28 |
}
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
36 |
* @return void
|
37 |
*/
|
38 |
public function admin_enqueue_scripts() {
|
39 |
+
wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-global', $this->getPlugin()->getPluginUrl() . '/css/admin.css', array(), $this->getPlugin()->getVersion());
|
40 |
}
|
41 |
|
42 |
/**
|
48 |
*/
|
49 |
public function meta_box_render( $module, $metabox = array() ) {
|
50 |
if ( isset($metabox['args']['metabox']) ) {
|
51 |
+
$this->getPlugin()->renderView('metabox/' . $metabox['args']['metabox'], array('metabox' => $metabox));
|
52 |
}
|
53 |
}
|
54 |
|
lib/WordPressHTTPS/Module/Core.php
CHANGED
@@ -12,40 +12,87 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
12 |
/**
|
13 |
* Initialize
|
14 |
*
|
15 |
-
* @param none
|
16 |
* @return void
|
17 |
*/
|
18 |
public function init() {
|
19 |
-
|
|
|
|
|
|
|
20 |
// Prevent WordPress' canonical redirect when using a different SSL Host
|
21 |
remove_filter('template_redirect', 'redirect_canonical');
|
22 |
// Add SSL Host path to rewrite rules
|
23 |
add_filter('rewrite_rules_array', array(&$this, 'rewrite_rules'), 10, 1);
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
// Add SSL Host to allowed redirect hosts
|
27 |
add_filter('allowed_redirect_hosts' , array(&$this, 'allowed_redirect_hosts'), 10, 1);
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
add_filter('
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
// Filter force_ssl
|
@@ -58,23 +105,18 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
58 |
add_filter('force_ssl', array(&$this, 'secure_post'), 40, 3);
|
59 |
add_filter('force_ssl', array(&$this, 'secure_exclusive'), 50, 3);
|
60 |
|
61 |
-
$filters = array('page_link', 'preview_page_link', 'post_link', 'preview_page_link', 'post_type_link', 'attachment_link', 'day_link', 'month_link', 'year_link', 'comment_reply_link', 'category_link', 'author_link', 'archives_link', 'tag_link', 'search_link');
|
62 |
-
foreach( $filters as $filter ) {
|
63 |
-
add_filter($filter, array(&$this, 'secure_post_link'), 10);
|
64 |
-
}
|
65 |
-
|
66 |
// Run install when new blog is created
|
67 |
-
add_action('wpmu_new_blog', array($
|
68 |
|
69 |
// Set response headers
|
70 |
-
add_action($
|
71 |
|
72 |
-
if ( $
|
73 |
// Remove SSL Host authentication cookies on logout
|
74 |
add_action('clear_auth_cookie', array(&$this, 'clear_cookies'));
|
75 |
|
76 |
// Set authentication cookie
|
77 |
-
if ( $
|
78 |
add_action('set_auth_cookie', array(&$this, 'set_cookie'), 10, 5);
|
79 |
add_action('set_logged_in_cookie', array(&$this, 'set_cookie'), 10, 5);
|
80 |
}
|
@@ -89,24 +131,24 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
89 |
add_action('admin_print_styles', array(&$this, 'fix_styles'), 100, 0);
|
90 |
|
91 |
// Run proxy check
|
92 |
-
if ( $
|
93 |
// If page is not SSL and no proxy cookie is detected, run proxy check
|
94 |
-
if ( ! $
|
95 |
add_action('init', array(&$this, 'proxy_check'), 1);
|
96 |
add_action('admin_init', array(&$this, 'proxy_check'), 1);
|
97 |
// Update ssl_proxy setting if a proxy has been detected
|
98 |
-
} else if ( $
|
99 |
-
$
|
100 |
// Update ssl_proxy if proxy is no longer detected
|
101 |
-
} else if ( $
|
102 |
-
$
|
103 |
}
|
104 |
}
|
105 |
|
106 |
// Check if the page needs to be redirected
|
107 |
if ( is_admin() || preg_match('/wp-login\.php/', $_SERVER['REQUEST_URI']) === 1 ) {
|
108 |
-
add_action($
|
109 |
-
add_action($
|
110 |
} else {
|
111 |
add_action('template_redirect', array(&$this, 'redirect_check'));
|
112 |
add_action('template_redirect', array(&$this, 'clear_redirect_count_cookie'), 9, 1);
|
@@ -132,11 +174,12 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
132 |
* @return string $url
|
133 |
*/
|
134 |
public function secure_url( $url = '' ) {
|
|
|
135 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
136 |
if ( $force_ssl ) {
|
137 |
-
$url = $
|
138 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
139 |
-
$url = $
|
140 |
}
|
141 |
return $url;
|
142 |
}
|
@@ -148,11 +191,12 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
148 |
* @return string $url
|
149 |
*/
|
150 |
public function element_url( $url = '' ) {
|
|
|
151 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
152 |
-
if ( $
|
153 |
-
$url = $
|
154 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
155 |
-
$url = $
|
156 |
}
|
157 |
return $url;
|
158 |
}
|
@@ -164,11 +208,12 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
164 |
* @return array $rules
|
165 |
*/
|
166 |
public function rewrite_rules( $rules = array() ) {
|
167 |
-
$
|
168 |
-
|
169 |
-
|
|
|
170 |
} else {
|
171 |
-
$httpsPath = $
|
172 |
}
|
173 |
if ( $httpsPath != '/' ) {
|
174 |
$rules['^' . $httpsPath . '([^\'"]+)'] = 'index.php?pagename=$matches[1]';
|
@@ -185,17 +230,18 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
185 |
* @return string $url
|
186 |
*/
|
187 |
public function admin_url( $url, $scheme ) {
|
|
|
188 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
189 |
|
190 |
// Catches base URL's used by low-level WordPress code
|
191 |
-
if ( is_null($force_ssl) && is_admin() && $
|
192 |
$force_ssl = true;
|
193 |
}
|
194 |
|
195 |
if ( $scheme != 'http' && $force_ssl ) {
|
196 |
-
$url = $
|
197 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
198 |
-
$url = $
|
199 |
}
|
200 |
return $url;
|
201 |
}
|
@@ -211,12 +257,13 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
211 |
* @return string $url
|
212 |
*/
|
213 |
public function site_url( $url, $path, $scheme, $blog_id ) {
|
|
|
214 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
215 |
|
216 |
if ( $scheme != 'http' && $force_ssl ) {
|
217 |
-
$url = $
|
218 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
219 |
-
$url = $
|
220 |
}
|
221 |
return $url;
|
222 |
}
|
@@ -225,14 +272,19 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
225 |
* Secure Post Link
|
226 |
*
|
227 |
* @param string $url
|
|
|
228 |
* @return string $url
|
229 |
*/
|
230 |
-
public function secure_post_link( $url ) {
|
231 |
-
$
|
|
|
|
|
|
|
|
|
232 |
if ( $force_ssl ) {
|
233 |
-
$url = $
|
234 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
235 |
-
$url = $
|
236 |
}
|
237 |
return $url;
|
238 |
}
|
@@ -247,15 +299,16 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
247 |
* @return boolean $force_ssl
|
248 |
*/
|
249 |
public function secure_admin( $force_ssl, $post_id = 0, $url = '' ) {
|
250 |
-
|
251 |
-
|
|
|
252 |
$force_ssl = false;
|
253 |
//TODO When logged in to HTTP and visiting an HTTPS page, admin links will always be forced to HTTPS, even if the user is not logged in via HTTPS. I need to find a way to detect this.
|
254 |
-
} else if ( ( $
|
255 |
$force_ssl = true;
|
256 |
}
|
257 |
if ( strpos($url, 'admin-ajax.php') !== false ) {
|
258 |
-
if ( $
|
259 |
$force_ssl = true;
|
260 |
} else {
|
261 |
$force_ssl = false;
|
@@ -276,9 +329,20 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
276 |
* @return boolean $force_ssl
|
277 |
*/
|
278 |
public function secure_login( $force_ssl, $post_id = 0, $url = '' ) {
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
283 |
}
|
284 |
return $force_ssl;
|
@@ -294,14 +358,18 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
294 |
* @return boolean $force_ssl
|
295 |
*/
|
296 |
public function secure_element( $force_ssl, $post_id = 0, $url = '' ) {
|
297 |
-
|
|
|
298 |
$filename = basename($url);
|
299 |
-
foreach( $
|
300 |
-
|
301 |
-
if ( $
|
302 |
-
$
|
303 |
-
|
304 |
-
|
|
|
|
|
|
|
305 |
}
|
306 |
}
|
307 |
}
|
@@ -337,7 +405,8 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
337 |
* @return boolean $force_ssl
|
338 |
*/
|
339 |
public function secure_exclusive( $force_ssl, $post_id = 0, $url = '' ) {
|
340 |
-
|
|
|
341 |
$force_ssl = false;
|
342 |
}
|
343 |
return $force_ssl;
|
@@ -353,8 +422,9 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
353 |
* @return boolean $force_ssl
|
354 |
*/
|
355 |
public function secure_different_host_admin( $force_ssl, $post_id = 0, $url = '' ) {
|
356 |
-
|
357 |
-
|
|
|
358 |
$force_ssl = true;
|
359 |
}
|
360 |
}
|
@@ -371,7 +441,8 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
371 |
* @return boolean $force_ssl
|
372 |
*/
|
373 |
public function secure_wordpress_forms( $force_ssl, $post_id = 0, $url = '' ) {
|
374 |
-
|
|
|
375 |
$force_ssl = true;
|
376 |
}
|
377 |
return $force_ssl;
|
@@ -408,21 +479,23 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
408 |
*/
|
409 |
public function fix_scripts() {
|
410 |
global $wp_scripts;
|
|
|
|
|
411 |
if ( isset($wp_scripts) && sizeof($wp_scripts->registered) > 0 ) {
|
412 |
foreach ( $wp_scripts->registered as $script ) {
|
413 |
if ( in_array($script->handle, $wp_scripts->queue) ) {
|
414 |
if ( strpos($script->src, 'http') === 0 ) {
|
415 |
-
if ( $
|
416 |
-
$updated = $
|
417 |
$script->src = $updated;
|
418 |
} else {
|
419 |
-
$updated = $
|
420 |
$script->src = $updated;
|
421 |
}
|
422 |
if ( $script->src != $updated ) {
|
423 |
$log = '[FIXED] Element: <script> - ' . $url . ' => ' . $updated;
|
424 |
-
if ( ! in_array($log, $
|
425 |
-
$
|
426 |
}
|
427 |
}
|
428 |
}
|
@@ -439,21 +512,23 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
439 |
*/
|
440 |
public function fix_styles() {
|
441 |
global $wp_styles;
|
|
|
|
|
442 |
if ( isset($wp_styles) && sizeof($wp_styles->registered) > 0 ) {
|
443 |
foreach ( (array)$wp_styles->registered as $style ) {
|
444 |
if ( in_array($style->handle, $wp_styles->queue) ) {
|
445 |
if ( strpos($style->src, 'http') === 0 ) {
|
446 |
-
if ( $
|
447 |
-
$updated = $
|
448 |
$style->src = $updated;
|
449 |
} else {
|
450 |
-
$updated = $
|
451 |
$style->src = $updated;
|
452 |
}
|
453 |
if ( $style->src != $updated ) {
|
454 |
$log = '[FIXED] Element: <link> - ' . $url . ' => ' . $updated;
|
455 |
-
if ( ! in_array($log, $
|
456 |
-
$
|
457 |
}
|
458 |
}
|
459 |
}
|
@@ -464,7 +539,7 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
464 |
|
465 |
/**
|
466 |
* Proxy Check
|
467 |
-
*
|
468 |
* If the server is on a proxy and not correctly reporting HTTPS, this
|
469 |
* JavaScript makes sure that the correct redirect takes place.
|
470 |
*
|
@@ -484,7 +559,7 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
484 |
|
485 |
/**
|
486 |
* Redirect Check
|
487 |
-
*
|
488 |
* Checks if the current page needs to be redirected
|
489 |
*
|
490 |
* @param none
|
@@ -493,22 +568,35 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
493 |
public function redirect_check() {
|
494 |
global $post;
|
495 |
|
496 |
-
$
|
|
|
497 |
|
498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
$scheme = 'https';
|
500 |
-
} else if ( $
|
501 |
$scheme = 'http';
|
502 |
}
|
503 |
|
504 |
if ( isset($scheme) ) {
|
505 |
-
$
|
506 |
}
|
507 |
}
|
508 |
|
509 |
/**
|
510 |
* Add Access-Control-Allow-Origin header to AJAX calls
|
511 |
-
*
|
512 |
* @param none
|
513 |
* @return void
|
514 |
*/
|
@@ -530,10 +618,12 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
530 |
* @return void
|
531 |
*/
|
532 |
public function set_cookie($cookie, $expire, $expiration, $user_id, $scheme) {
|
533 |
-
|
|
|
|
|
534 |
$secure = true;
|
535 |
}
|
536 |
-
$secure = apply_filters('secure_auth_cookie',
|
537 |
|
538 |
if( $scheme == 'logged_in' ) {
|
539 |
$cookie_name = LOGGED_IN_COOKIE;
|
@@ -552,30 +642,30 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
552 |
$cookie_path_plugins = PLUGINS_COOKIE_PATH;
|
553 |
$cookie_path_admin = ADMIN_COOKIE_PATH;
|
554 |
|
555 |
-
if ( $
|
556 |
// If SSL Host is a subdomain, make cookie domain a wildcard
|
557 |
-
if ( $
|
558 |
-
$cookie_domain = '.' . $
|
559 |
// Otherwise, cookie domain set for different SSL Host
|
560 |
} else {
|
561 |
-
$cookie_domain = $
|
562 |
}
|
563 |
|
564 |
-
if ( $
|
565 |
-
$cookie_path = str_replace($
|
566 |
-
$cookie_path_site = str_replace($
|
567 |
-
$cookie_path_plugins = str_replace($
|
568 |
}
|
569 |
-
|
570 |
-
if ( $
|
571 |
-
$cookie_path = str_replace($
|
572 |
-
$cookie_path_site = str_replace($
|
573 |
-
$cookie_path_plugins = str_replace($
|
574 |
}
|
575 |
|
576 |
-
$cookie_path = rtrim($
|
577 |
-
$cookie_path_site = rtrim($
|
578 |
-
$cookie_path_plugins = rtrim($
|
579 |
$cookie_path_admin = rtrim($cookie_path_site, '/') . '/wp-admin';
|
580 |
}
|
581 |
|
@@ -584,9 +674,9 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
584 |
if ( $cookie_path != $cookie_path_site ) {
|
585 |
setcookie($cookie_name, $cookie, $expire, $cookie_path_site, $cookie_domain, $secure, true);
|
586 |
}
|
587 |
-
} else {
|
588 |
-
setcookie($cookie_name, $cookie, $expire, $cookie_path_plugins, $cookie_domain,
|
589 |
-
setcookie($cookie_name, $cookie, $expire, $cookie_path_admin, $cookie_domain,
|
590 |
}
|
591 |
}
|
592 |
|
@@ -610,31 +700,32 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
610 |
* @return void
|
611 |
*/
|
612 |
public function clear_cookies() {
|
613 |
-
|
614 |
-
|
|
|
615 |
} else {
|
616 |
-
$cookie_domain = $
|
617 |
}
|
618 |
|
619 |
$cookie_path = COOKIEPATH;
|
620 |
$cookie_path_site = SITECOOKIEPATH;
|
621 |
$cookie_path_plugins = PLUGINS_COOKIE_PATH;
|
622 |
|
623 |
-
if ( $
|
624 |
-
$cookie_path = str_replace($
|
625 |
-
$cookie_path_site = str_replace($
|
626 |
-
$cookie_path_plugins = str_replace($
|
627 |
}
|
628 |
-
|
629 |
-
if ( $
|
630 |
-
$cookie_path = str_replace($
|
631 |
-
$cookie_path_site = str_replace($
|
632 |
-
$cookie_path_plugins = str_replace($
|
633 |
}
|
634 |
|
635 |
-
$cookie_path = rtrim($
|
636 |
-
$cookie_path_site = rtrim($
|
637 |
-
$cookie_path_plugins = rtrim($
|
638 |
$cookie_path_admin = $cookie_path_site . 'wp-admin';
|
639 |
|
640 |
setcookie(AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_admin, $cookie_domain);
|
@@ -652,4 +743,4 @@ class WordPressHTTPS_Module_Core extends Mvied_Plugin_Module {
|
|
652 |
setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path_site);
|
653 |
}
|
654 |
|
655 |
-
}
|
12 |
/**
|
13 |
* Initialize
|
14 |
*
|
|
|
15 |
* @return void
|
16 |
*/
|
17 |
public function init() {
|
18 |
+
global $wp_scripts, $wp_styles;
|
19 |
+
$plugin = $this->getPlugin();
|
20 |
+
$isSsl = $plugin->isSsl();
|
21 |
+
if ( $plugin->getSetting('ssl_host_diff') && $isSsl ) {
|
22 |
// Prevent WordPress' canonical redirect when using a different SSL Host
|
23 |
remove_filter('template_redirect', 'redirect_canonical');
|
24 |
// Add SSL Host path to rewrite rules
|
25 |
add_filter('rewrite_rules_array', array(&$this, 'rewrite_rules'), 10, 1);
|
26 |
}
|
27 |
|
28 |
+
if ( $isSsl ) {
|
29 |
+
wp_scripts();
|
30 |
+
wp_styles();
|
31 |
+
$wp_styles->base_url = $this->getPlugin()->makeUrlHttps($wp_styles->base_url);
|
32 |
+
$wp_scripts->base_url = $this->getPlugin()->makeUrlHttps($wp_scripts->base_url);
|
33 |
+
}
|
34 |
+
|
35 |
// Add SSL Host to allowed redirect hosts
|
36 |
add_filter('allowed_redirect_hosts' , array(&$this, 'allowed_redirect_hosts'), 10, 1);
|
37 |
|
38 |
+
add_filter( 'the_permalink_rss', array( &$this, 'secure_url' ), 10 );
|
39 |
+
|
40 |
+
if ( !$this->getPlugin()->getSetting('content_fixer') ) {
|
41 |
+
// Filter URL's
|
42 |
+
add_filter( 'home_url', array( &$this, 'secure_url' ), 10 );
|
43 |
+
add_filter( 'bloginfo_url', array( &$this, 'secure_url' ), 10 );
|
44 |
+
add_filter( 'logout_url', array( &$this, 'secure_url' ), 10 );
|
45 |
+
add_filter( 'login_url', array( &$this, 'secure_url' ), 10 );
|
46 |
+
add_filter( 'network_admin_url', array( &$this, 'secure_url' ), 10 );
|
47 |
+
|
48 |
+
// Filter Element URL's
|
49 |
+
add_filter( 'get_avatar', array( &$this, 'element_url' ), 10 );
|
50 |
+
add_filter( 'wp_get_attachment_url', array( &$this, 'element_url' ), 10 );
|
51 |
+
add_filter( 'template_directory_uri', array( &$this, 'element_url' ), 10 );
|
52 |
+
add_filter( 'stylesheet_directory_uri', array( &$this, 'element_url' ), 10 );
|
53 |
+
add_filter( 'plugins_url', array( &$this, 'element_url' ), 10 );
|
54 |
+
add_filter( 'includes_url', array( &$this, 'element_url' ), 10 );
|
55 |
+
add_filter( 'content_url', array( &$this, 'element_url' ), 10 );
|
56 |
+
|
57 |
+
// Filter admin_url in admin
|
58 |
+
if ( is_admin() ) {
|
59 |
+
add_filter( 'admin_url', array( &$this, 'admin_url' ), 10, 2 );
|
60 |
+
// Filter site_url publicly
|
61 |
+
} else {
|
62 |
+
if ( $isSsl ) {
|
63 |
+
add_filter( 'admin_url', array( &$this, 'admin_url' ), 10, 2 );
|
64 |
+
}
|
65 |
+
add_filter( 'site_url', array( &$this, 'site_url' ), 10, 4 );
|
66 |
+
}
|
67 |
+
|
68 |
+
//add filters that provide the post or post id
|
69 |
+
$filters_that_use_post = array(
|
70 |
+
'page_link',
|
71 |
+
'preview_page_link',
|
72 |
+
'post_link',
|
73 |
+
'preview_page_link',
|
74 |
+
'post_type_link',
|
75 |
+
'attachment_link',
|
76 |
+
'search_link'
|
77 |
+
);
|
78 |
+
foreach ( $filters_that_use_post as $filter ) {
|
79 |
+
add_filter( $filter, array( &$this, 'secure_post_link' ), 10, 3 );
|
80 |
+
}
|
81 |
+
|
82 |
+
//add filters that don't provide a post id
|
83 |
+
$filters_without_post = array(
|
84 |
+
'comment_reply_link',
|
85 |
+
'day_link',
|
86 |
+
'month_link',
|
87 |
+
'year_link',
|
88 |
+
'category_link',
|
89 |
+
'author_link',
|
90 |
+
'archives_link',
|
91 |
+
'tag_link',
|
92 |
+
);
|
93 |
+
foreach ( $filters_without_post as $filter ) {
|
94 |
+
add_filter( $filter, array( &$this, 'secure_post_link' ), 10 );
|
95 |
+
}
|
96 |
}
|
97 |
|
98 |
// Filter force_ssl
|
105 |
add_filter('force_ssl', array(&$this, 'secure_post'), 40, 3);
|
106 |
add_filter('force_ssl', array(&$this, 'secure_exclusive'), 50, 3);
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
// Run install when new blog is created
|
109 |
+
add_action('wpmu_new_blog', array($plugin, 'install'), 10, 0);
|
110 |
|
111 |
// Set response headers
|
112 |
+
add_action($plugin->getSlug() . '_init', array(&$this, 'set_headers'), 9, 1);
|
113 |
|
114 |
+
if ( $plugin->getSetting('ssl_host_diff') ) {
|
115 |
// Remove SSL Host authentication cookies on logout
|
116 |
add_action('clear_auth_cookie', array(&$this, 'clear_cookies'));
|
117 |
|
118 |
// Set authentication cookie
|
119 |
+
if ( $isSsl ) {
|
120 |
add_action('set_auth_cookie', array(&$this, 'set_cookie'), 10, 5);
|
121 |
add_action('set_logged_in_cookie', array(&$this, 'set_cookie'), 10, 5);
|
122 |
}
|
131 |
add_action('admin_print_styles', array(&$this, 'fix_styles'), 100, 0);
|
132 |
|
133 |
// Run proxy check
|
134 |
+
if ( $plugin->getSetting('ssl_proxy') === 'auto' ) {
|
135 |
// If page is not SSL and no proxy cookie is detected, run proxy check
|
136 |
+
if ( ! $isSsl && ! isset($_COOKIE['wp_proxy']) ) {
|
137 |
add_action('init', array(&$this, 'proxy_check'), 1);
|
138 |
add_action('admin_init', array(&$this, 'proxy_check'), 1);
|
139 |
// Update ssl_proxy setting if a proxy has been detected
|
140 |
+
} else if ( $plugin->getSetting('ssl_proxy') !== true && isset($_COOKIE['wp_proxy']) && $_COOKIE['wp_proxy'] == 1 ) {
|
141 |
+
$plugin->setSetting('ssl_proxy', 1);
|
142 |
// Update ssl_proxy if proxy is no longer detected
|
143 |
+
} else if ( $plugin->getSetting('ssl_proxy') !== false && isset($_COOKIE['wp_proxy']) && $_COOKIE['wp_proxy'] != 1 ) {
|
144 |
+
$plugin->setSetting('ssl_proxy', 0);
|
145 |
}
|
146 |
}
|
147 |
|
148 |
// Check if the page needs to be redirected
|
149 |
if ( is_admin() || preg_match('/wp-login\.php/', $_SERVER['REQUEST_URI']) === 1 ) {
|
150 |
+
add_action($plugin->getSlug() . '_init', array(&$this, 'redirect_check'));
|
151 |
+
add_action($plugin->getSlug() . '_init', array(&$this, 'clear_redirect_count_cookie'), 9, 1);
|
152 |
} else {
|
153 |
add_action('template_redirect', array(&$this, 'redirect_check'));
|
154 |
add_action('template_redirect', array(&$this, 'clear_redirect_count_cookie'), 9, 1);
|
174 |
* @return string $url
|
175 |
*/
|
176 |
public function secure_url( $url = '' ) {
|
177 |
+
$plugin = $this->getPlugin();
|
178 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
179 |
if ( $force_ssl ) {
|
180 |
+
$url = $plugin->makeUrlHttps($url);
|
181 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
182 |
+
$url = $plugin->makeUrlHttp($url);
|
183 |
}
|
184 |
return $url;
|
185 |
}
|
191 |
* @return string $url
|
192 |
*/
|
193 |
public function element_url( $url = '' ) {
|
194 |
+
$plugin = $this->getPlugin();
|
195 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
196 |
+
if ( $plugin->isSsl() || $force_ssl ) {
|
197 |
+
$url = $plugin->makeUrlHttps($url);
|
198 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
199 |
+
$url = $plugin->makeUrlHttp($url);
|
200 |
}
|
201 |
return $url;
|
202 |
}
|
208 |
* @return array $rules
|
209 |
*/
|
210 |
public function rewrite_rules( $rules = array() ) {
|
211 |
+
$plugin = $this->getPlugin();
|
212 |
+
$requestPath = str_replace($plugin->getHttpsUrl()->getPath(), '', $_SERVER['REQUEST_URI']);
|
213 |
+
if ( $plugin->getHttpUrl()->getPath() != '/' ) {
|
214 |
+
$httpsPath = str_replace($plugin->getHttpUrl()->getPath(), '', $plugin->getHttpsUrl()->getPath());
|
215 |
} else {
|
216 |
+
$httpsPath = $plugin->getHttpsUrl()->getPath();
|
217 |
}
|
218 |
if ( $httpsPath != '/' ) {
|
219 |
$rules['^' . $httpsPath . '([^\'"]+)'] = 'index.php?pagename=$matches[1]';
|
230 |
* @return string $url
|
231 |
*/
|
232 |
public function admin_url( $url, $scheme ) {
|
233 |
+
$plugin = $this->getPlugin();
|
234 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
235 |
|
236 |
// Catches base URL's used by low-level WordPress code
|
237 |
+
if ( is_null($force_ssl) && is_admin() && $plugin->isSsl() && ($url_parts = parse_url($url)) && ( !isset($url_parts['path']) || trim($url_parts['path'], '/') == '' ) ) {
|
238 |
$force_ssl = true;
|
239 |
}
|
240 |
|
241 |
if ( $scheme != 'http' && $force_ssl ) {
|
242 |
+
$url = $plugin->makeUrlHttps($url);
|
243 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
244 |
+
$url = $plugin->makeUrlHttp($url);
|
245 |
}
|
246 |
return $url;
|
247 |
}
|
257 |
* @return string $url
|
258 |
*/
|
259 |
public function site_url( $url, $path, $scheme, $blog_id ) {
|
260 |
+
$plugin = $this->getPlugin();
|
261 |
$force_ssl = apply_filters('force_ssl', null, 0, $url);
|
262 |
|
263 |
if ( $scheme != 'http' && $force_ssl ) {
|
264 |
+
$url = $plugin->makeUrlHttps($url);
|
265 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
266 |
+
$url = $plugin->makeUrlHttp($url);
|
267 |
}
|
268 |
return $url;
|
269 |
}
|
272 |
* Secure Post Link
|
273 |
*
|
274 |
* @param string $url
|
275 |
+
* @param WP_Post|int $post if one is provided
|
276 |
* @return string $url
|
277 |
*/
|
278 |
+
public function secure_post_link( $url, $post = null) {
|
279 |
+
$plugin = $this->getPlugin();
|
280 |
+
if( $post instanceof WP_Post){
|
281 |
+
$post = $post->ID;
|
282 |
+
}
|
283 |
+
$force_ssl = apply_filters('force_ssl', null, $post, $url);
|
284 |
if ( $force_ssl ) {
|
285 |
+
$url = $plugin->makeUrlHttps($url);
|
286 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
287 |
+
$url = $plugin->makeUrlHttp($url);
|
288 |
}
|
289 |
return $url;
|
290 |
}
|
299 |
* @return boolean $force_ssl
|
300 |
*/
|
301 |
public function secure_admin( $force_ssl, $post_id = 0, $url = '' ) {
|
302 |
+
$plugin = $this->getPlugin();
|
303 |
+
if ( $url != '' && $plugin->isUrlLocal($url) && ( strpos($url, 'wp-admin') !== false || strpos($url, 'wp-login') !== false ) ) {
|
304 |
+
if ( $plugin->getSetting('exclusive_https') && !( ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $plugin->getSetting('ssl_admin') ) ) {
|
305 |
$force_ssl = false;
|
306 |
//TODO When logged in to HTTP and visiting an HTTPS page, admin links will always be forced to HTTPS, even if the user is not logged in via HTTPS. I need to find a way to detect this.
|
307 |
+
} else if ( ( $plugin->isSsl() && !$plugin->getSetting('exclusive_https') ) || ( ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $plugin->getSetting('ssl_admin') ) ) {
|
308 |
$force_ssl = true;
|
309 |
}
|
310 |
if ( strpos($url, 'admin-ajax.php') !== false ) {
|
311 |
+
if ( $plugin->isSsl() ) {
|
312 |
$force_ssl = true;
|
313 |
} else {
|
314 |
$force_ssl = false;
|
329 |
* @return boolean $force_ssl
|
330 |
*/
|
331 |
public function secure_login( $force_ssl, $post_id = 0, $url = '' ) {
|
332 |
+
/**
|
333 |
+
* Forward compatibility for Wordpress 4.4+
|
334 |
+
*/
|
335 |
+
if ( version_compare(get_bloginfo('version'), '4.4', '>') ) {
|
336 |
+
if ( $url != '' && $this->getPlugin()->isUrlLocal($url) ) {
|
337 |
+
if ( force_ssl_admin() && preg_match('/wp-login\.php$/', $url) === 1 ) {
|
338 |
+
$force_ssl = true;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
} else {
|
342 |
+
if ( $url != '' && $this->getPlugin()->isUrlLocal($url) ) {
|
343 |
+
if ( force_ssl_login() && preg_match('/wp-login\.php$/', $url) === 1 ) {
|
344 |
+
$force_ssl = true;
|
345 |
+
}
|
346 |
}
|
347 |
}
|
348 |
return $force_ssl;
|
358 |
* @return boolean $force_ssl
|
359 |
*/
|
360 |
public function secure_element( $force_ssl, $post_id = 0, $url = '' ) {
|
361 |
+
$plugin = $this->getPlugin();
|
362 |
+
if ( $url != '' && $plugin->isUrlLocal($url) ) {
|
363 |
$filename = basename($url);
|
364 |
+
foreach( $plugin->getFileExtensions() as $type => $extensions ) {
|
365 |
+
foreach( $extensions as $extension ) {
|
366 |
+
if ( preg_match('/\.' . $extension . '(\?|$)/', $filename) ) {
|
367 |
+
if ( $plugin->isSsl() ) {
|
368 |
+
$force_ssl = true;
|
369 |
+
} else {
|
370 |
+
$force_ssl = false;
|
371 |
+
}
|
372 |
+
break 2;
|
373 |
}
|
374 |
}
|
375 |
}
|
405 |
* @return boolean $force_ssl
|
406 |
*/
|
407 |
public function secure_exclusive( $force_ssl, $post_id = 0, $url = '' ) {
|
408 |
+
$plugin = $this->getPlugin();
|
409 |
+
if ( is_null($force_ssl) && $plugin->isUrlLocal($url) && $plugin->getSetting('exclusive_https') ) {
|
410 |
$force_ssl = false;
|
411 |
}
|
412 |
return $force_ssl;
|
422 |
* @return boolean $force_ssl
|
423 |
*/
|
424 |
public function secure_different_host_admin( $force_ssl, $post_id = 0, $url = '' ) {
|
425 |
+
$plugin = $this->getPlugin();
|
426 |
+
if ( $post_id > 0 || ( $url != '' && $plugin->isUrlLocal($url) ) ) {
|
427 |
+
if ( !$plugin->getSetting('exclusive_https') && !$plugin->getSetting('ssl_host_subdomain') && $plugin->getSetting('ssl_host_diff') && $plugin->getSetting('ssl_admin') && function_exists('is_user_logged_in') && is_user_logged_in() ) {
|
428 |
$force_ssl = true;
|
429 |
}
|
430 |
}
|
441 |
* @return boolean $force_ssl
|
442 |
*/
|
443 |
public function secure_wordpress_forms( $force_ssl, $post_id = 0, $url = '' ) {
|
444 |
+
$plugin = $this->getPlugin();
|
445 |
+
if ( $plugin->isSsl() && $plugin->isUrlLocal($url) && ( strpos($url, 'wp-pass.php') !== false || strpos($url, 'wp-login.php?action=') !== false || strpos($url, 'wp-comments-post.php') !== false ) ) {
|
446 |
$force_ssl = true;
|
447 |
}
|
448 |
return $force_ssl;
|
479 |
*/
|
480 |
public function fix_scripts() {
|
481 |
global $wp_scripts;
|
482 |
+
$plugin = $this->getPlugin();
|
483 |
+
$wp_scripts->base_url = $plugin->makeUrlHttps($wp_scripts->base_url);
|
484 |
if ( isset($wp_scripts) && sizeof($wp_scripts->registered) > 0 ) {
|
485 |
foreach ( $wp_scripts->registered as $script ) {
|
486 |
if ( in_array($script->handle, $wp_scripts->queue) ) {
|
487 |
if ( strpos($script->src, 'http') === 0 ) {
|
488 |
+
if ( $plugin->isSsl() ) {
|
489 |
+
$updated = $plugin->makeUrlHttps($script->src);
|
490 |
$script->src = $updated;
|
491 |
} else {
|
492 |
+
$updated = $plugin->makeUrlHttp($script->src);
|
493 |
$script->src = $updated;
|
494 |
}
|
495 |
if ( $script->src != $updated ) {
|
496 |
$log = '[FIXED] Element: <script> - ' . $url . ' => ' . $updated;
|
497 |
+
if ( ! in_array($log, $plugin->getLogger()->getLog()) ) {
|
498 |
+
$plugin->getLogger()->log($log);
|
499 |
}
|
500 |
}
|
501 |
}
|
512 |
*/
|
513 |
public function fix_styles() {
|
514 |
global $wp_styles;
|
515 |
+
$plugin = $this->getPlugin();
|
516 |
+
$wp_styles->base_url = $plugin->makeUrlHttps($wp_styles->base_url);
|
517 |
if ( isset($wp_styles) && sizeof($wp_styles->registered) > 0 ) {
|
518 |
foreach ( (array)$wp_styles->registered as $style ) {
|
519 |
if ( in_array($style->handle, $wp_styles->queue) ) {
|
520 |
if ( strpos($style->src, 'http') === 0 ) {
|
521 |
+
if ( $plugin->isSsl() ) {
|
522 |
+
$updated = $plugin->makeUrlHttps($style->src);
|
523 |
$style->src = $updated;
|
524 |
} else {
|
525 |
+
$updated = $plugin->makeUrlHttp($style->src);
|
526 |
$style->src = $updated;
|
527 |
}
|
528 |
if ( $style->src != $updated ) {
|
529 |
$log = '[FIXED] Element: <link> - ' . $url . ' => ' . $updated;
|
530 |
+
if ( ! in_array($log, $plugin->getLogger()->getLog()) ) {
|
531 |
+
$plugin->getLogger()->log($log);
|
532 |
}
|
533 |
}
|
534 |
}
|
539 |
|
540 |
/**
|
541 |
* Proxy Check
|
542 |
+
*
|
543 |
* If the server is on a proxy and not correctly reporting HTTPS, this
|
544 |
* JavaScript makes sure that the correct redirect takes place.
|
545 |
*
|
559 |
|
560 |
/**
|
561 |
* Redirect Check
|
562 |
+
*
|
563 |
* Checks if the current page needs to be redirected
|
564 |
*
|
565 |
* @param none
|
568 |
public function redirect_check() {
|
569 |
global $post;
|
570 |
|
571 |
+
$plugin = $this->getPlugin();
|
572 |
+
$force_ssl = apply_filters('force_ssl', null, ( $post ? $post->ID : null ), ( $plugin->isSsl() ? 'https' : 'http' ) . '://' . ( isset($_SERVER['HTTP_X_FORWARDED_SERVER']) ? $_SERVER['HTTP_X_FORWARDED_SERVER'] : $_SERVER['HTTP_HOST'] ) . $_SERVER['REQUEST_URI'] );
|
573 |
|
574 |
+
// Domain mapping check
|
575 |
+
if ( function_exists('domain_mapping_siteurl') && $force_ssl ) {
|
576 |
+
$mapped_domain = domain_mapping_siteurl(false);
|
577 |
+
if ( strpos($plugin->getHttpsUrl(), $mapped_domain) === false ) {
|
578 |
+
if ( remove_action('template_redirect', 'redirect_to_mapped_domain') ) {
|
579 |
+
$plugin->getLogger()->log('[FIXED] Domain mapping redirect removed.');
|
580 |
+
} else {
|
581 |
+
$plugin->getLogger()->log('[WARNING] Unable to remove domain mapping redirect.');
|
582 |
+
}
|
583 |
+
}
|
584 |
+
}
|
585 |
+
|
586 |
+
if ( ! $plugin->isSsl() && isset($force_ssl) && $force_ssl ) {
|
587 |
$scheme = 'https';
|
588 |
+
} else if ( $plugin->isSsl() && isset($force_ssl) && ! $force_ssl ) {
|
589 |
$scheme = 'http';
|
590 |
}
|
591 |
|
592 |
if ( isset($scheme) ) {
|
593 |
+
$plugin->redirect($scheme);
|
594 |
}
|
595 |
}
|
596 |
|
597 |
/**
|
598 |
* Add Access-Control-Allow-Origin header to AJAX calls
|
599 |
+
*
|
600 |
* @param none
|
601 |
* @return void
|
602 |
*/
|
618 |
* @return void
|
619 |
*/
|
620 |
public function set_cookie($cookie, $expire, $expiration, $user_id, $scheme) {
|
621 |
+
$plugin = $this->getPlugin();
|
622 |
+
$secure = null;
|
623 |
+
if ( ( $scheme == 'secure_auth' && $plugin->isSsl() ) || ( ( ( defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) || $plugin->getSetting('ssl_admin') ) && ! $plugin->getSetting('ssl_host_subdomain') ) ) {
|
624 |
$secure = true;
|
625 |
}
|
626 |
+
$secure = apply_filters('secure_auth_cookie', $secure, $user_id);
|
627 |
|
628 |
if( $scheme == 'logged_in' ) {
|
629 |
$cookie_name = LOGGED_IN_COOKIE;
|
642 |
$cookie_path_plugins = PLUGINS_COOKIE_PATH;
|
643 |
$cookie_path_admin = ADMIN_COOKIE_PATH;
|
644 |
|
645 |
+
if ( $plugin->isSsl() ) {
|
646 |
// If SSL Host is a subdomain, make cookie domain a wildcard
|
647 |
+
if ( $plugin->getSetting('ssl_host_subdomain') ) {
|
648 |
+
$cookie_domain = '.' . $plugin->getHttpsUrl()->getBaseHost();
|
649 |
// Otherwise, cookie domain set for different SSL Host
|
650 |
} else {
|
651 |
+
$cookie_domain = $plugin->getHttpsUrl()->getHost();
|
652 |
}
|
653 |
|
654 |
+
if ( $plugin->getHttpsUrl()->getPath() != '/' ) {
|
655 |
+
$cookie_path = str_replace($plugin->getHttpsUrl()->getPath(), '', $cookie_path);
|
656 |
+
$cookie_path_site = str_replace($plugin->getHttpsUrl()->getPath(), '', $cookie_path_site);
|
657 |
+
$cookie_path_plugins = str_replace($plugin->getHttpsUrl()->getPath(), '', $cookie_path_plugins);
|
658 |
}
|
659 |
+
|
660 |
+
if ( $plugin->getHttpUrl()->getPath() != '/' ) {
|
661 |
+
$cookie_path = str_replace($plugin->getHttpUrl()->getPath(), '', $cookie_path);
|
662 |
+
$cookie_path_site = str_replace($plugin->getHttpUrl()->getPath(), '', $cookie_path_site);
|
663 |
+
$cookie_path_plugins = str_replace($plugin->getHttpUrl()->getPath(), '', $cookie_path_plugins);
|
664 |
}
|
665 |
|
666 |
+
$cookie_path = rtrim($plugin->getHttpsUrl()->getPath(), '/') . $cookie_path;
|
667 |
+
$cookie_path_site = rtrim($plugin->getHttpsUrl()->getPath(), '/') . $cookie_path_site;
|
668 |
+
$cookie_path_plugins = rtrim($plugin->getHttpsUrl()->getPath(), '/') . $cookie_path_plugins;
|
669 |
$cookie_path_admin = rtrim($cookie_path_site, '/') . '/wp-admin';
|
670 |
}
|
671 |
|
674 |
if ( $cookie_path != $cookie_path_site ) {
|
675 |
setcookie($cookie_name, $cookie, $expire, $cookie_path_site, $cookie_domain, $secure, true);
|
676 |
}
|
677 |
+
} else {
|
678 |
+
setcookie($cookie_name, $cookie, $expire, $cookie_path_plugins, $cookie_domain, $secure, true);
|
679 |
+
setcookie($cookie_name, $cookie, $expire, $cookie_path_admin, $cookie_domain, $secure, true);
|
680 |
}
|
681 |
}
|
682 |
|
700 |
* @return void
|
701 |
*/
|
702 |
public function clear_cookies() {
|
703 |
+
$plugin = $this->getPlugin();
|
704 |
+
if ( $plugin->getSetting('ssl_host_subdomain') ) {
|
705 |
+
$cookie_domain = '.' . $plugin->getHttpsUrl()->getBaseHost();
|
706 |
} else {
|
707 |
+
$cookie_domain = $plugin->getHttpsUrl()->getHost();
|
708 |
}
|
709 |
|
710 |
$cookie_path = COOKIEPATH;
|
711 |
$cookie_path_site = SITECOOKIEPATH;
|
712 |
$cookie_path_plugins = PLUGINS_COOKIE_PATH;
|
713 |
|
714 |
+
if ( $plugin->getHttpsUrl()->getPath() != '/' ) {
|
715 |
+
$cookie_path = str_replace($plugin->getHttpsUrl()->getPath(), '', $cookie_path);
|
716 |
+
$cookie_path_site = str_replace($plugin->getHttpsUrl()->getPath(), '', $cookie_path_site);
|
717 |
+
$cookie_path_plugins = str_replace($plugin->getHttpsUrl()->getPath(), '', $cookie_path_plugins);
|
718 |
}
|
719 |
+
|
720 |
+
if ( $plugin->getHttpUrl()->getPath() != '/' ) {
|
721 |
+
$cookie_path = str_replace($plugin->getHttpUrl()->getPath(), '', $cookie_path);
|
722 |
+
$cookie_path_site = str_replace($plugin->getHttpUrl()->getPath(), '', $cookie_path_site);
|
723 |
+
$cookie_path_plugins = str_replace($plugin->getHttpUrl()->getPath(), '', $cookie_path_plugins);
|
724 |
}
|
725 |
|
726 |
+
$cookie_path = rtrim($plugin->getHttpsUrl()->getPath(), '/') . $cookie_path;
|
727 |
+
$cookie_path_site = rtrim($plugin->getHttpsUrl()->getPath(), '/') . $cookie_path_site;
|
728 |
+
$cookie_path_plugins = rtrim($plugin->getHttpsUrl()->getPath(), '/') . $cookie_path_plugins;
|
729 |
$cookie_path_admin = $cookie_path_site . 'wp-admin';
|
730 |
|
731 |
setcookie(AUTH_COOKIE, ' ', time() - 31536000, $cookie_path_admin, $cookie_domain);
|
743 |
setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, $cookie_path_site);
|
744 |
}
|
745 |
|
746 |
+
}
|
lib/WordPressHTTPS/Module/DomainMapping.php
DELETED
@@ -1,116 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin Domain Mapping Module
|
4 |
-
*
|
5 |
-
* Adds the settings page.
|
6 |
-
*
|
7 |
-
* @author Mike Ems
|
8 |
-
* @package WordPressHTTPS
|
9 |
-
*
|
10 |
-
*/
|
11 |
-
|
12 |
-
class WordPressHTTPS_Module_DomainMapping extends Mvied_Plugin_Module {
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Initialize Module
|
16 |
-
*
|
17 |
-
* @param none
|
18 |
-
* @return void
|
19 |
-
*/
|
20 |
-
public function init() {
|
21 |
-
if ( is_admin() ) {
|
22 |
-
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_domain_mapping_save', array(&$this, 'save'));
|
23 |
-
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_domain_mapping_reset', array(&$this, 'reset'));
|
24 |
-
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
|
25 |
-
// Add meta boxes
|
26 |
-
add_action('admin_init', array(&$this, 'add_meta_boxes'));
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
// Custom filter https_external_url
|
31 |
-
add_filter('https_external_url', array(&$this, 'map_url'), 10);
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Domain Mapping
|
36 |
-
*
|
37 |
-
* @param string $url
|
38 |
-
* @return string $url
|
39 |
-
*/
|
40 |
-
public function map_url( $url ) {
|
41 |
-
if ( is_array($this->getPlugin()->getSetting('ssl_host_mapping')) && sizeof($this->getPlugin()->getSetting('ssl_host_mapping')) > 0 ) {
|
42 |
-
foreach( $this->getPlugin()->getSetting('ssl_host_mapping') as $http_domain => $https_domain ) {
|
43 |
-
preg_match('/' . $http_domain . '/', $url, $matches);
|
44 |
-
if ( sizeof($matches) > 0 ) {
|
45 |
-
$url = preg_replace('/' . $http_domain . '/', $https_domain, $url);
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
return $url;
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Add meta boxes to WordPress HTTPS Settings page.
|
54 |
-
*
|
55 |
-
* @param none
|
56 |
-
* @return void
|
57 |
-
*/
|
58 |
-
public function add_meta_boxes() {
|
59 |
-
add_meta_box(
|
60 |
-
$this->getPlugin()->getSlug() . '_domain_mapping',
|
61 |
-
__( 'Domain Mapping', $this->getPlugin()->getSlug() ),
|
62 |
-
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
63 |
-
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
64 |
-
'main',
|
65 |
-
'core',
|
66 |
-
array( 'metabox' => 'domain_mapping' )
|
67 |
-
);
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Reset Domain Mapping
|
72 |
-
*
|
73 |
-
* @param array $settings
|
74 |
-
* @return void
|
75 |
-
*/
|
76 |
-
public function reset() {
|
77 |
-
if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
|
78 |
-
return false;
|
79 |
-
}
|
80 |
-
|
81 |
-
$message = "Domain Mapping reset.";
|
82 |
-
$errors = array();
|
83 |
-
$reload = true;
|
84 |
-
|
85 |
-
$this->getPlugin()->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping);
|
86 |
-
|
87 |
-
require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Save Domain Mapping
|
92 |
-
*
|
93 |
-
* @param array $settings
|
94 |
-
* @return void
|
95 |
-
*/
|
96 |
-
public function save() {
|
97 |
-
if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
|
98 |
-
return false;
|
99 |
-
}
|
100 |
-
|
101 |
-
$message = "Domain Mapping saved.";
|
102 |
-
$errors = array();
|
103 |
-
$reload = false;
|
104 |
-
|
105 |
-
$ssl_host_mapping = array();
|
106 |
-
for( $i=0; $i<sizeof($_POST['http_domain']); $i++ ) {
|
107 |
-
if ( isset($_POST['http_domain'][$i]) && $_POST['http_domain'][$i] != '' && isset($_POST['https_domain'][$i]) && $_POST['https_domain'][$i] != '' ) {
|
108 |
-
$ssl_host_mapping[str_replace('\\\\', '\\', $_POST['http_domain'][$i])] = str_replace('\\\\', '\\', $_POST['https_domain'][$i]);
|
109 |
-
}
|
110 |
-
}
|
111 |
-
$this->getPlugin()->setSetting('ssl_host_mapping', $ssl_host_mapping);
|
112 |
-
|
113 |
-
require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
|
114 |
-
}
|
115 |
-
|
116 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/WordPressHTTPS/Module/Ecommerce.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* E-commerce Module
|
|
|
|
|
4 |
*
|
5 |
* @author Mike Ems
|
6 |
* @package WordPressHTTPS
|
1 |
<?php
|
2 |
/**
|
3 |
* E-commerce Module
|
4 |
+
*
|
5 |
+
* Handles conflicts with popular E-commerce plugins' SSL settings.
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
lib/WordPressHTTPS/Module/Network.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Network
|
4 |
*
|
5 |
-
* Adds the network settings page.
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
@@ -27,10 +27,10 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
27 |
// Add scripts
|
28 |
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'));
|
29 |
}
|
30 |
-
}
|
31 |
|
32 |
-
|
33 |
-
|
|
|
34 |
}
|
35 |
}
|
36 |
|
@@ -54,7 +54,7 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
54 |
public function add_meta_boxes() {
|
55 |
add_meta_box(
|
56 |
$this->getPlugin()->getSlug() . '_settings',
|
57 |
-
__( 'Network Settings',
|
58 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
59 |
'toplevel_page_' . $this->getPlugin()->getSlug() . '_network',
|
60 |
'main',
|
@@ -63,12 +63,12 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
63 |
);
|
64 |
add_meta_box(
|
65 |
$this->getPlugin()->getSlug() . '_donate2',
|
66 |
-
__( '
|
67 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
68 |
'toplevel_page_' . $this->getPlugin()->getSlug() . '_network',
|
69 |
'main',
|
70 |
'low',
|
71 |
-
array( 'metabox' => '
|
72 |
);
|
73 |
}
|
74 |
|
@@ -94,7 +94,7 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
94 |
* @return void
|
95 |
*/
|
96 |
public function admin_enqueue_scripts() {
|
97 |
-
wp_enqueue_style($this->getPlugin()->getSlug() . '-network-admin-page', $this->getPlugin()->getPluginUrl() . '/
|
98 |
}
|
99 |
|
100 |
/**
|
@@ -104,7 +104,7 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
104 |
* @return void
|
105 |
*/
|
106 |
public function render() {
|
107 |
-
|
108 |
}
|
109 |
|
110 |
/**
|
@@ -118,7 +118,7 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
118 |
return false;
|
119 |
}
|
120 |
|
121 |
-
$message =
|
122 |
$errors = array();
|
123 |
$reload = false;
|
124 |
$logout = false;
|
@@ -127,18 +127,14 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
127 |
foreach( $_POST['blog'] as $blog_id => $setting ) {
|
128 |
foreach( $setting as $key => $value ) {
|
129 |
if ( $key == 'ssl_host' && $value != '' ) {
|
130 |
-
$blog_url =
|
131 |
$value = strtolower($value);
|
132 |
// Add Scheme
|
133 |
if ( strpos($value, 'http://') === false && strpos($value, 'https://') === false ) {
|
134 |
$value = 'https://' . $value;
|
135 |
}
|
136 |
|
137 |
-
$ssl_host =
|
138 |
-
|
139 |
-
// Add Port
|
140 |
-
$port = (($blog_url->getPort() && $blog_url->getPort() != 80 && $blog_url->getPort() != 443) ? $port : null);
|
141 |
-
$ssl_host->setPort($port);
|
142 |
|
143 |
// Add Path
|
144 |
if ( strpos($ssl_host->getPath(), $blog_url->getPath()) !== true ) {
|
@@ -160,7 +156,7 @@ class WordPressHTTPS_Module_Network extends Mvied_Plugin_Module {
|
|
160 |
wp_logout();
|
161 |
}
|
162 |
|
163 |
-
|
164 |
}
|
165 |
|
166 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Network Module
|
4 |
*
|
5 |
+
* Adds the network settings page to network dashboard.
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
27 |
// Add scripts
|
28 |
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'));
|
29 |
}
|
|
|
30 |
|
31 |
+
if ( is_multisite() ) {
|
32 |
+
add_action('network_admin_menu', array(&$this, 'network_admin_menu'));
|
33 |
+
}
|
34 |
}
|
35 |
}
|
36 |
|
54 |
public function add_meta_boxes() {
|
55 |
add_meta_box(
|
56 |
$this->getPlugin()->getSlug() . '_settings',
|
57 |
+
__( 'Network Settings', 'wordpress-https' ),
|
58 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
59 |
'toplevel_page_' . $this->getPlugin()->getSlug() . '_network',
|
60 |
'main',
|
63 |
);
|
64 |
add_meta_box(
|
65 |
$this->getPlugin()->getSlug() . '_donate2',
|
66 |
+
__( 'Promotion', 'wordpress-https' ),
|
67 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
68 |
'toplevel_page_' . $this->getPlugin()->getSlug() . '_network',
|
69 |
'main',
|
70 |
'low',
|
71 |
+
array( 'metabox' => 'donate2' )
|
72 |
);
|
73 |
}
|
74 |
|
94 |
* @return void
|
95 |
*/
|
96 |
public function admin_enqueue_scripts() {
|
97 |
+
wp_enqueue_style($this->getPlugin()->getSlug() . '-network-admin-page', $this->getPlugin()->getPluginUrl() . '/css/network.css', array($this->getPlugin()->getSlug() . '-admin-page'), $this->getPlugin()->getVersion());
|
98 |
}
|
99 |
|
100 |
/**
|
104 |
* @return void
|
105 |
*/
|
106 |
public function render() {
|
107 |
+
$this->getPlugin()->renderView('network');
|
108 |
}
|
109 |
|
110 |
/**
|
118 |
return false;
|
119 |
}
|
120 |
|
121 |
+
$message = __('Network settings saved.','wordpress-https');
|
122 |
$errors = array();
|
123 |
$reload = false;
|
124 |
$logout = false;
|
127 |
foreach( $_POST['blog'] as $blog_id => $setting ) {
|
128 |
foreach( $setting as $key => $value ) {
|
129 |
if ( $key == 'ssl_host' && $value != '' ) {
|
130 |
+
$blog_url = Mvied_Url::fromString(get_site_url($blog_id, '', 'https'));
|
131 |
$value = strtolower($value);
|
132 |
// Add Scheme
|
133 |
if ( strpos($value, 'http://') === false && strpos($value, 'https://') === false ) {
|
134 |
$value = 'https://' . $value;
|
135 |
}
|
136 |
|
137 |
+
$ssl_host = Mvied_Url::fromString($value);
|
|
|
|
|
|
|
|
|
138 |
|
139 |
// Add Path
|
140 |
if ( strpos($ssl_host->getPath(), $blog_url->getPath()) !== true ) {
|
156 |
wp_logout();
|
157 |
}
|
158 |
|
159 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload, 'logout' => $logout));
|
160 |
}
|
161 |
|
162 |
}
|
lib/WordPressHTTPS/Module/Parser.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
|
|
|
|
4 |
*
|
5 |
* @author Mike Ems
|
6 |
* @package WordPressHTTPS
|
@@ -23,8 +25,10 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
23 |
* @return void
|
24 |
*/
|
25 |
public function init() {
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
}
|
29 |
|
30 |
/**
|
@@ -38,12 +42,14 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
38 |
public function parseHtml( $buffer ) {
|
39 |
$this->_html = $buffer;
|
40 |
|
41 |
-
$this->
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
47 |
|
48 |
// Output logger contents to browsers console if in Debug Mode
|
49 |
if ( $this->getPlugin()->getSetting('debug') == true ) {
|
@@ -71,13 +77,14 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
71 |
* @return boolean
|
72 |
*/
|
73 |
public function secureElement( $url, $type = '' ) {
|
|
|
74 |
$updated = false;
|
75 |
$result = false;
|
76 |
$upload_dir = wp_upload_dir();
|
77 |
-
$upload_path = str_replace($
|
78 |
|
79 |
if ( ! is_admin() || ( is_admin() && strpos($url, $upload_path) === false ) ) {
|
80 |
-
$updated = $
|
81 |
if ( $url != $updated ) {
|
82 |
$this->_html = str_replace($url, $updated, $this->_html);
|
83 |
} else {
|
@@ -90,14 +97,14 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
90 |
$log = '[FIXED] Element: ' . ( $type != '' ? '<' . $type . '> ' : '' ) . $url . ' => ' . $updated;
|
91 |
$result = true;
|
92 |
} else if ( strpos($url, 'http://') === 0 ) {
|
93 |
-
if ( $
|
94 |
$log = '[FIXED] Removed Unsecure Element: <' . $type . '> - ' . $url;
|
95 |
} else {
|
96 |
$log = '[WARNING] Unsecure Element: <' . $type . '> - ' . $url;
|
97 |
}
|
98 |
}
|
99 |
-
if ( isset($log) && ! in_array($log, $
|
100 |
-
$
|
101 |
}
|
102 |
|
103 |
return $result;
|
@@ -111,14 +118,20 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
111 |
* @return boolean
|
112 |
*/
|
113 |
public function unsecureElement( $url, $type = '' ) {
|
|
|
114 |
$updated = false;
|
115 |
$result = false;
|
116 |
$upload_dir = wp_upload_dir();
|
117 |
-
$upload_path = str_replace($
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
$
|
|
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
|
124 |
// Add log entry if this change hasn't been logged
|
@@ -126,8 +139,8 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
126 |
$log = '[FIXED] Element: ' . ( $type != '' ? '<' . $type . '> ' : '' ) . $url . ' => ' . $updated;
|
127 |
$result = true;
|
128 |
}
|
129 |
-
if ( isset($log) && ! in_array($log, $
|
130 |
-
$
|
131 |
}
|
132 |
|
133 |
return $result;
|
@@ -140,14 +153,15 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
140 |
* @return void
|
141 |
*/
|
142 |
public function normalizeElements() {
|
|
|
143 |
$httpMatches = array();
|
144 |
$httpsMatches = array();
|
145 |
-
if ( $
|
146 |
-
$url = clone $
|
147 |
$url->setScheme('http');
|
148 |
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpsMatches);
|
149 |
|
150 |
-
$url = clone $
|
151 |
$url->setScheme('https');
|
152 |
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpMatches);
|
153 |
|
@@ -156,7 +170,7 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
156 |
if ( isset($matches[1][$i]) ) {
|
157 |
$url_parts = parse_url($matches[1][$i]);
|
158 |
if ( $url_parts && strpos($url_parts['path'], 'wp-admin') === false && strpos($url_parts['path'], 'wp-login') === false ) {
|
159 |
-
$this->_html = str_replace($url, $
|
160 |
}
|
161 |
}
|
162 |
}
|
@@ -170,6 +184,7 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
170 |
* @return void
|
171 |
*/
|
172 |
public function fixElements() {
|
|
|
173 |
if ( is_admin() ) {
|
174 |
preg_match_all('/\<(script|link|img)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>(<\/(script|link|img|input|embed|param|iframe)>\s*)?/im', $this->_html, $matches);
|
175 |
} else {
|
@@ -191,11 +206,11 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
191 |
( $type == 'input' && strpos($html, 'image') !== false ) ||
|
192 |
( $type == 'param' && strpos($html, 'movie') !== false )
|
193 |
) {
|
194 |
-
if ( $
|
195 |
-
if ( !$this->secureElement($url, $type) && $
|
196 |
$this->_html = str_replace($html, '', $this->_html);
|
197 |
}
|
198 |
-
} else if ( !$
|
199 |
$this->unsecureElement($url, $type);
|
200 |
}
|
201 |
}
|
@@ -209,13 +224,14 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
209 |
* @return void
|
210 |
*/
|
211 |
public function fixCssElements() {
|
|
|
212 |
preg_match_all('/(import|background)[:]?[^u]*url\([\'"]?(http:\/\/[^\'"\)]+)[\'"\)]?\)/im', $this->_html, $matches);
|
213 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
214 |
$css = $matches[0][$i];
|
215 |
$url = $matches[2][$i];
|
216 |
-
if ( $
|
217 |
$this->secureElement($url, 'style');
|
218 |
-
} else if ( !$
|
219 |
$this->unsecureElement($url, 'style');
|
220 |
}
|
221 |
}
|
@@ -228,7 +244,8 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
228 |
* @return void
|
229 |
*/
|
230 |
public function fixRelativeElements() {
|
231 |
-
|
|
|
232 |
preg_match_all('/\<(script|link|img|input|form|embed|param)[^>]+(src|href|action|data|movie|image|value)=[\'"](\/[^\'"]*)[\'"][^>]*>/im', $this->_html, $matches);
|
233 |
|
234 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
@@ -242,10 +259,10 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
242 |
( $type == 'input' && strpos($html, '_wp_http_referer') !== false )
|
243 |
) {
|
244 |
if ( strpos($url_path, '//') !== 0 ) {
|
245 |
-
$updated = clone $
|
246 |
$updated->setPath($url_path);
|
247 |
$this->_html = str_replace($html, str_replace($url_path, $updated, $html), $this->_html);
|
248 |
-
$
|
249 |
}
|
250 |
}
|
251 |
}
|
@@ -259,28 +276,22 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
259 |
* @return void
|
260 |
*/
|
261 |
public function fixExtensions() {
|
|
|
262 |
@preg_match_all('/((http|https):\/\/[^\'"\)\s]+)[\'"\)]?/i', $this->_html, $matches);
|
263 |
for ($i = 0; $i < sizeof($matches[1]); $i++) {
|
264 |
$url = $matches[1][$i];
|
265 |
$filename = basename($url);
|
266 |
$scheme = $matches[2][$i];
|
267 |
|
268 |
-
foreach( $
|
269 |
-
|
270 |
-
$
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
}
|
278 |
-
|
279 |
-
if ( preg_match('/\.' . $extension . '(\?|$)/', $filename) ) {
|
280 |
-
if ( $this->getPlugin()->isSsl() && ( $this->getPlugin()->getSetting('ssl_host_diff') || ( !$this->getPlugin()->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
281 |
-
$this->secureElement($url, $type);
|
282 |
-
} else if ( !$this->getPlugin()->isSsl() && strpos($url, 'https://') === 0 ) {
|
283 |
-
$this->unsecureElement($url, $type);
|
284 |
}
|
285 |
}
|
286 |
}
|
@@ -298,6 +309,10 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
298 |
// Update anchor and form tags to appropriate URL's
|
299 |
preg_match_all('/\<(a|form)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>/im', $this->_html, $matches);
|
300 |
|
|
|
|
|
|
|
|
|
301 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
302 |
$html = $matches[0][$i];
|
303 |
$type = $matches[1][$i];
|
@@ -307,19 +322,21 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
307 |
$post_id = null;
|
308 |
$blog_id = null;
|
309 |
$force_ssl = null;
|
310 |
-
$url_path =
|
|
|
|
|
311 |
|
312 |
-
if ( !$
|
313 |
continue;
|
314 |
}
|
315 |
|
316 |
if ( $url != '' && ($url_parts = parse_url($url)) && isset($url_parts['path']) ) {
|
317 |
-
if ( $
|
318 |
-
if ( $
|
319 |
-
$url_parts['path'] = str_replace($
|
320 |
}
|
321 |
-
if ( $
|
322 |
-
$url_parts['path'] = str_replace($
|
323 |
}
|
324 |
}
|
325 |
|
@@ -339,46 +356,44 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
339 |
if ( get_option('show_on_front') == 'page' ) {
|
340 |
$post_id = get_option('page_on_front');
|
341 |
}
|
342 |
-
} else if ( isset($url_parts['path'])
|
343 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
}
|
345 |
|
346 |
if ( is_multisite() && isset($url_parts['host']) ) {
|
347 |
if ( is_subdomain_install() ) {
|
348 |
-
$
|
|
|
|
|
|
|
|
|
|
|
349 |
} else {
|
350 |
$url_path_segments = explode('/', $url_parts['path']);
|
351 |
if ( sizeof($url_path_segments) > 1 ) {
|
352 |
foreach( $url_path_segments as $url_path_segment ) {
|
353 |
if ( is_null($blog_id) && $url_path_segment != '' ) {
|
354 |
-
$
|
355 |
-
|
356 |
-
|
|
|
357 |
} else {
|
358 |
-
$blog_id =
|
359 |
}
|
360 |
}
|
361 |
}
|
362 |
}
|
363 |
}
|
364 |
-
|
365 |
-
if ( !is_null($blog_id) && $blog_id != $wpdb->blogid ) {
|
366 |
-
// URL Filters
|
367 |
-
if ( sizeof((array)$this->getPlugin()->getSetting('secure_filter', $blog_id)) > 0 ) {
|
368 |
-
foreach( $this->getPlugin()->getSetting('secure_filter', $blog_id) as $filter ) {
|
369 |
-
if ( preg_match('/' . str_replace('/', '\/', $filter) . '/', $url) === 1 ) {
|
370 |
-
$force_ssl = true;
|
371 |
-
}
|
372 |
-
}
|
373 |
-
}
|
374 |
-
if ( ( $this->getPlugin()->getSetting('ssl_admin', $blog_id) || defined('FORCE_SSL_ADMIN') && constant('FORCE_SSL_ADMIN') ) && strpos($url_parts['path'], 'wp-admin') !== false && ( ! $this->getPlugin()->getSetting('ssl_host_diff', $blog_id) || ( $this->getPlugin()->getSetting('ssl_host_diff', $blog_id) && function_exists('is_user_logged_in') && is_user_logged_in() ) ) ) {
|
375 |
-
$force_ssl = true;
|
376 |
-
} else if ( is_null($force_ssl) && $this->getPlugin()->getSetting('exclusive_https', $blog_id) ) {
|
377 |
-
$force_ssl = false;
|
378 |
-
} else if ( strpos($url, 'https://') === 0 ) {
|
379 |
-
$force_ssl = true;
|
380 |
-
}
|
381 |
-
}
|
382 |
}
|
383 |
}
|
384 |
|
@@ -389,31 +404,12 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
389 |
|
390 |
if ( $force_ssl == true ) {
|
391 |
if ( is_null($blog_id) ) {
|
392 |
-
$updated = $
|
393 |
-
} else {
|
394 |
-
if ( $this->getPlugin()->getSetting('ssl_host', $blog_id) ) {
|
395 |
-
$ssl_host = $this->getPlugin()->getSetting('ssl_host', $blog_id);
|
396 |
-
} else {
|
397 |
-
$ssl_host = parse_url(get_home_url($blog_id, '/'), PHP_URL_HOST);
|
398 |
-
}
|
399 |
-
if ( is_subdomain_install() ) {
|
400 |
-
$host = $url_parts['host'] . '/';
|
401 |
-
} else {
|
402 |
-
$host = $url_parts['host'] . '/' . $url_path;
|
403 |
-
}
|
404 |
-
$updated = str_replace($url_parts['scheme'] . '://' . $host, $ssl_host, $url);
|
405 |
}
|
406 |
$this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html);
|
407 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
408 |
if ( is_null($blog_id) ) {
|
409 |
-
$updated = $
|
410 |
-
} else {
|
411 |
-
if ( is_subdomain_install() ) {
|
412 |
-
$host = $url_parts['host'] . '/';
|
413 |
-
} else {
|
414 |
-
$host = $url_parts['host'] . '/' . $url_path;
|
415 |
-
}
|
416 |
-
$updated = str_replace($url_parts['scheme'] . '://' . $host, get_home_url($blog_id, '/'), $url);
|
417 |
}
|
418 |
$this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html);
|
419 |
}
|
@@ -421,11 +417,13 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
421 |
// Add log entry if this change hasn't been logged
|
422 |
if ( $updated && $url != $updated ) {
|
423 |
$log = '[FIXED] Element: <' . $type . '> - ' . $url . ' => ' . $updated;
|
424 |
-
if ( ! in_array($log, $
|
425 |
-
$
|
426 |
}
|
427 |
}
|
428 |
}
|
|
|
|
|
429 |
}
|
430 |
|
431 |
/**
|
@@ -438,4 +436,4 @@ class WordPressHTTPS_Module_Parser extends Mvied_Plugin_Module {
|
|
438 |
$this->_html = str_replace('</body>', $this->getPlugin()->getLogger()->consoleLog() . "\n\n</body>", $this->_html);
|
439 |
}
|
440 |
|
441 |
-
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Parser Module
|
4 |
+
*
|
5 |
+
* Parses the output buffer with awesomeness.
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
25 |
* @return void
|
26 |
*/
|
27 |
public function init() {
|
28 |
+
if ( apply_filters( 'wordpress_https_parser_ob', true ) ) {
|
29 |
+
// Start output buffering
|
30 |
+
add_action('init', array(&$this, 'startOutputBuffering'));
|
31 |
+
}
|
32 |
}
|
33 |
|
34 |
/**
|
42 |
public function parseHtml( $buffer ) {
|
43 |
$this->_html = $buffer;
|
44 |
|
45 |
+
if ( $this->getPlugin()->getSetting('content_fixer') ) {
|
46 |
+
$this->normalizeElements();
|
47 |
+
$this->fixLinksAndForms();
|
48 |
+
$this->fixExtensions();
|
49 |
+
$this->fixElements();
|
50 |
+
$this->fixCssElements();
|
51 |
+
$this->fixRelativeElements();
|
52 |
+
}
|
53 |
|
54 |
// Output logger contents to browsers console if in Debug Mode
|
55 |
if ( $this->getPlugin()->getSetting('debug') == true ) {
|
77 |
* @return boolean
|
78 |
*/
|
79 |
public function secureElement( $url, $type = '' ) {
|
80 |
+
$plugin = $this->getPlugin();
|
81 |
$updated = false;
|
82 |
$result = false;
|
83 |
$upload_dir = wp_upload_dir();
|
84 |
+
$upload_path = str_replace($plugin->getHttpsUrl()->getPath(), $plugin->getHttpUrl()->getPath(), parse_url($upload_dir['baseurl'], PHP_URL_PATH));
|
85 |
|
86 |
if ( ! is_admin() || ( is_admin() && strpos($url, $upload_path) === false ) ) {
|
87 |
+
$updated = $plugin->makeUrlHttps($url);
|
88 |
if ( $url != $updated ) {
|
89 |
$this->_html = str_replace($url, $updated, $this->_html);
|
90 |
} else {
|
97 |
$log = '[FIXED] Element: ' . ( $type != '' ? '<' . $type . '> ' : '' ) . $url . ' => ' . $updated;
|
98 |
$result = true;
|
99 |
} else if ( strpos($url, 'http://') === 0 ) {
|
100 |
+
if ( $plugin->getSetting('remove_unsecure') ) {
|
101 |
$log = '[FIXED] Removed Unsecure Element: <' . $type . '> - ' . $url;
|
102 |
} else {
|
103 |
$log = '[WARNING] Unsecure Element: <' . $type . '> - ' . $url;
|
104 |
}
|
105 |
}
|
106 |
+
if ( isset($log) && ! in_array($log, $plugin->getLogger()->getLog()) ) {
|
107 |
+
$plugin->getLogger()->log($log);
|
108 |
}
|
109 |
|
110 |
return $result;
|
118 |
* @return boolean
|
119 |
*/
|
120 |
public function unsecureElement( $url, $type = '' ) {
|
121 |
+
$plugin = $this->getPlugin();
|
122 |
$updated = false;
|
123 |
$result = false;
|
124 |
$upload_dir = wp_upload_dir();
|
125 |
+
$upload_path = str_replace($plugin->getHttpsUrl()->getPath(), $plugin->getHttpUrl()->getPath(), parse_url($upload_dir['baseurl'], PHP_URL_PATH));
|
126 |
|
127 |
+
// Only filter external resources that are being unsecured
|
128 |
+
if ( !$plugin->isUrlLocal($url) ) {
|
129 |
+
$updated = apply_filters('http_external_url', $url);
|
130 |
+
} else {
|
131 |
+
if ( ! is_admin() || ( is_admin() && strpos($url, $upload_path) === false ) ) {
|
132 |
+
$updated = $plugin->makeUrlHttp($url);
|
133 |
+
$this->_html = str_replace($url, $updated, $this->_html);
|
134 |
+
}
|
135 |
}
|
136 |
|
137 |
// Add log entry if this change hasn't been logged
|
139 |
$log = '[FIXED] Element: ' . ( $type != '' ? '<' . $type . '> ' : '' ) . $url . ' => ' . $updated;
|
140 |
$result = true;
|
141 |
}
|
142 |
+
if ( isset($log) && ! in_array($log, $plugin->getLogger()->getLog()) ) {
|
143 |
+
$plugin->getLogger()->log($log);
|
144 |
}
|
145 |
|
146 |
return $result;
|
153 |
* @return void
|
154 |
*/
|
155 |
public function normalizeElements() {
|
156 |
+
$plugin = $this->getPlugin();
|
157 |
$httpMatches = array();
|
158 |
$httpsMatches = array();
|
159 |
+
if ( $plugin->getSetting('ssl_host_diff') && !is_admin() ) {
|
160 |
+
$url = clone $plugin->getHttpsUrl();
|
161 |
$url->setScheme('http');
|
162 |
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpsMatches);
|
163 |
|
164 |
+
$url = clone $plugin->getHttpUrl();
|
165 |
$url->setScheme('https');
|
166 |
preg_match_all('/(' . str_replace('/', '\/', preg_quote($url->toString())) . '[^\'"]*)[\'"]?/im', $this->_html, $httpMatches);
|
167 |
|
170 |
if ( isset($matches[1][$i]) ) {
|
171 |
$url_parts = parse_url($matches[1][$i]);
|
172 |
if ( $url_parts && strpos($url_parts['path'], 'wp-admin') === false && strpos($url_parts['path'], 'wp-login') === false ) {
|
173 |
+
$this->_html = str_replace($url, $plugin->makeUrlHttp($url), $this->_html);
|
174 |
}
|
175 |
}
|
176 |
}
|
184 |
* @return void
|
185 |
*/
|
186 |
public function fixElements() {
|
187 |
+
$plugin = $this->getPlugin();
|
188 |
if ( is_admin() ) {
|
189 |
preg_match_all('/\<(script|link|img)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>(<\/(script|link|img|input|embed|param|iframe)>\s*)?/im', $this->_html, $matches);
|
190 |
} else {
|
206 |
( $type == 'input' && strpos($html, 'image') !== false ) ||
|
207 |
( $type == 'param' && strpos($html, 'movie') !== false )
|
208 |
) {
|
209 |
+
if ( $plugin->isSsl() && ( $plugin->getSetting('ssl_host_diff') || ( !$plugin->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
210 |
+
if ( !$this->secureElement($url, $type) && $plugin->getSetting('remove_unsecure') ) {
|
211 |
$this->_html = str_replace($html, '', $this->_html);
|
212 |
}
|
213 |
+
} else if ( !$plugin->isSsl() && strpos($url, 'https://') === 0 ) {
|
214 |
$this->unsecureElement($url, $type);
|
215 |
}
|
216 |
}
|
224 |
* @return void
|
225 |
*/
|
226 |
public function fixCssElements() {
|
227 |
+
$plugin = $this->getPlugin();
|
228 |
preg_match_all('/(import|background)[:]?[^u]*url\([\'"]?(http:\/\/[^\'"\)]+)[\'"\)]?\)/im', $this->_html, $matches);
|
229 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
230 |
$css = $matches[0][$i];
|
231 |
$url = $matches[2][$i];
|
232 |
+
if ( $plugin->isSsl() && ( $plugin->getSetting('ssl_host_diff') || ( !$plugin->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
233 |
$this->secureElement($url, 'style');
|
234 |
+
} else if ( !$plugin->isSsl() && strpos($url, 'https://') === 0 ) {
|
235 |
$this->unsecureElement($url, 'style');
|
236 |
}
|
237 |
}
|
244 |
* @return void
|
245 |
*/
|
246 |
public function fixRelativeElements() {
|
247 |
+
$plugin = $this->getPlugin();
|
248 |
+
if ( $plugin->isSsl() && $plugin->getHttpUrl()->getPath() != $plugin->getHttpsUrl()->getPath() ) {
|
249 |
preg_match_all('/\<(script|link|img|input|form|embed|param)[^>]+(src|href|action|data|movie|image|value)=[\'"](\/[^\'"]*)[\'"][^>]*>/im', $this->_html, $matches);
|
250 |
|
251 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
259 |
( $type == 'input' && strpos($html, '_wp_http_referer') !== false )
|
260 |
) {
|
261 |
if ( strpos($url_path, '//') !== 0 ) {
|
262 |
+
$updated = clone $plugin->getHttpsUrl();
|
263 |
$updated->setPath($url_path);
|
264 |
$this->_html = str_replace($html, str_replace($url_path, $updated, $html), $this->_html);
|
265 |
+
$plugin->getLogger()->log('[FIXED] Element: <' . $type . '> - ' . $url_path . ' => ' . $updated);
|
266 |
}
|
267 |
}
|
268 |
}
|
276 |
* @return void
|
277 |
*/
|
278 |
public function fixExtensions() {
|
279 |
+
$plugin = $this->getPlugin();
|
280 |
@preg_match_all('/((http|https):\/\/[^\'"\)\s]+)[\'"\)]?/i', $this->_html, $matches);
|
281 |
for ($i = 0; $i < sizeof($matches[1]); $i++) {
|
282 |
$url = $matches[1][$i];
|
283 |
$filename = basename($url);
|
284 |
$scheme = $matches[2][$i];
|
285 |
|
286 |
+
foreach( $plugin->getFileExtensions() as $type => $extensions ) {
|
287 |
+
foreach( $extensions as $extension ) {
|
288 |
+
if ( preg_match('/\.' . $extension . '(\?|$)/', $filename) ) {
|
289 |
+
if ( $plugin->isSsl() && ( $plugin->getSetting('ssl_host_diff') || ( !$plugin->getSetting('ssl_host_diff') && strpos($url, 'http://') === 0 ) ) ) {
|
290 |
+
$this->secureElement($url, $type);
|
291 |
+
} else if ( !$plugin->isSsl() && strpos($url, 'https://') === 0 ) {
|
292 |
+
$this->unsecureElement($url, $type);
|
293 |
+
}
|
294 |
+
break 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
}
|
297 |
}
|
309 |
// Update anchor and form tags to appropriate URL's
|
310 |
preg_match_all('/\<(a|form)[^>]+[\'"]((http|https):\/\/[^\'"]+)[\'"][^>]*>/im', $this->_html, $matches);
|
311 |
|
312 |
+
$plugin = $this->getPlugin();
|
313 |
+
$path_cache = $plugin->getSetting('path_cache');
|
314 |
+
$blog_cache = $plugin->getSetting('blog_cache');
|
315 |
+
|
316 |
for ($i = 0; $i < sizeof($matches[0]); $i++) {
|
317 |
$html = $matches[0][$i];
|
318 |
$type = $matches[1][$i];
|
322 |
$post_id = null;
|
323 |
$blog_id = null;
|
324 |
$force_ssl = null;
|
325 |
+
$url_path = null;
|
326 |
+
$blog_path = null;
|
327 |
+
$blog_url_path = '/';
|
328 |
|
329 |
+
if ( !$plugin->isUrlLocal($url) ) {
|
330 |
continue;
|
331 |
}
|
332 |
|
333 |
if ( $url != '' && ($url_parts = parse_url($url)) && isset($url_parts['path']) ) {
|
334 |
+
if ( $plugin->getHttpsUrl()->getPath() != '/' ) {
|
335 |
+
if ( $plugin->getSetting('ssl_host_diff') ) {
|
336 |
+
$url_parts['path'] = str_replace($plugin->getHttpsUrl()->getPath(), '', $url_parts['path']);
|
337 |
}
|
338 |
+
if ( $plugin->getHttpUrl()->getPath() != '/' ) {
|
339 |
+
$url_parts['path'] = str_replace($plugin->getHttpUrl()->getPath(), '', $url_parts['path']);
|
340 |
}
|
341 |
}
|
342 |
|
356 |
if ( get_option('show_on_front') == 'page' ) {
|
357 |
$post_id = get_option('page_on_front');
|
358 |
}
|
359 |
+
} else if ( isset($url_parts['path']) ) {
|
360 |
+
$url_path = $url_parts['path'];
|
361 |
+
if ( !array_key_exists($url_path, $path_cache) ) {
|
362 |
+
if ( $post = get_page_by_path($url_path) ) {
|
363 |
+
$post_id = $post->ID;
|
364 |
+
$path_cache[$url_path] = $post_id;
|
365 |
+
} else {
|
366 |
+
$path_cache[$url_path] = 0;
|
367 |
+
}
|
368 |
+
} else {
|
369 |
+
$post_id = $path_cache[$url_path];
|
370 |
+
}
|
371 |
}
|
372 |
|
373 |
if ( is_multisite() && isset($url_parts['host']) ) {
|
374 |
if ( is_subdomain_install() ) {
|
375 |
+
$blog_path = $url_parts['host'] . '/';
|
376 |
+
if ( array_key_exists($blog_path, $blog_cache) ) {
|
377 |
+
$blog_id = $blog_cache[$blog_path];
|
378 |
+
} else {
|
379 |
+
$blog_id = get_blog_id_from_url( $url_parts['host'], '/');
|
380 |
+
}
|
381 |
} else {
|
382 |
$url_path_segments = explode('/', $url_parts['path']);
|
383 |
if ( sizeof($url_path_segments) > 1 ) {
|
384 |
foreach( $url_path_segments as $url_path_segment ) {
|
385 |
if ( is_null($blog_id) && $url_path_segment != '' ) {
|
386 |
+
$blog_url_path .= $url_path_segment . '/';
|
387 |
+
$blog_path = $url_parts['host'] . $blog_url_path;
|
388 |
+
if ( array_key_exists($blog_path, $blog_cache) ) {
|
389 |
+
$blog_id = $blog_cache[$blog_path];
|
390 |
} else {
|
391 |
+
$blog_id = $blog_cache[$blog_path] = get_blog_id_from_url( $url_parts['host'], $blog_url_path);
|
392 |
}
|
393 |
}
|
394 |
}
|
395 |
}
|
396 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
}
|
399 |
|
404 |
|
405 |
if ( $force_ssl == true ) {
|
406 |
if ( is_null($blog_id) ) {
|
407 |
+
$updated = $plugin->makeUrlHttps($url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
}
|
409 |
$this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html);
|
410 |
} else if ( !is_null($force_ssl) && !$force_ssl ) {
|
411 |
if ( is_null($blog_id) ) {
|
412 |
+
$updated = $plugin->makeUrlHttp($url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
}
|
414 |
$this->_html = str_replace($html, str_replace($url, $updated, $html), $this->_html);
|
415 |
}
|
417 |
// Add log entry if this change hasn't been logged
|
418 |
if ( $updated && $url != $updated ) {
|
419 |
$log = '[FIXED] Element: <' . $type . '> - ' . $url . ' => ' . $updated;
|
420 |
+
if ( ! in_array($log, $plugin->getLogger()->getLog()) ) {
|
421 |
+
$plugin->getLogger()->log($log);
|
422 |
}
|
423 |
}
|
424 |
}
|
425 |
+
$plugin->setSetting('path_cache', $path_cache);
|
426 |
+
$plugin->setSetting('blog_cache', $blog_cache);
|
427 |
}
|
428 |
|
429 |
/**
|
436 |
$this->_html = str_replace('</body>', $this->getPlugin()->getLogger()->consoleLog() . "\n\n</body>", $this->_html);
|
437 |
}
|
438 |
|
439 |
+
}
|
lib/WordPressHTTPS/Module/Post.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Post Module
|
4 |
*
|
5 |
-
* Adds
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
@@ -39,7 +39,7 @@ class WordPressHTTPS_Module_Post extends Mvied_Plugin_Module {
|
|
39 |
foreach($post_types as $post_type ) {
|
40 |
add_meta_box(
|
41 |
$this->getPlugin()->getSlug(),
|
42 |
-
__( 'HTTPS',
|
43 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
44 |
$post_type,
|
45 |
'side',
|
@@ -65,7 +65,7 @@ class WordPressHTTPS_Module_Post extends Mvied_Plugin_Module {
|
|
65 |
return $post_id;
|
66 |
}
|
67 |
|
68 |
-
if (
|
69 |
if ( !current_user_can('edit_page', $post_id) ) {
|
70 |
return $post_id;
|
71 |
}
|
@@ -75,14 +75,14 @@ class WordPressHTTPS_Module_Post extends Mvied_Plugin_Module {
|
|
75 |
}
|
76 |
}
|
77 |
|
78 |
-
$force_ssl = (
|
79 |
if ( $force_ssl ) {
|
80 |
update_post_meta($post_id, 'force_ssl', 1);
|
81 |
} else {
|
82 |
delete_post_meta($post_id, 'force_ssl');
|
83 |
}
|
84 |
|
85 |
-
$force_ssl_children = (
|
86 |
if ( $force_ssl_children ) {
|
87 |
update_post_meta($post_id, 'force_ssl_children', 1);
|
88 |
} else {
|
2 |
/**
|
3 |
* Post Module
|
4 |
*
|
5 |
+
* Adds options metabox to dashboard when publishing posts and pages.
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
39 |
foreach($post_types as $post_type ) {
|
40 |
add_meta_box(
|
41 |
$this->getPlugin()->getSlug(),
|
42 |
+
__( 'HTTPS', 'wordpress-https' ),
|
43 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
44 |
$post_type,
|
45 |
'side',
|
65 |
return $post_id;
|
66 |
}
|
67 |
|
68 |
+
if ( isset($_POST['post_type']) && $_POST['post_type'] == 'page' ) {
|
69 |
if ( !current_user_can('edit_page', $post_id) ) {
|
70 |
return $post_id;
|
71 |
}
|
75 |
}
|
76 |
}
|
77 |
|
78 |
+
$force_ssl = ( isset($_POST['force_ssl']) && $_POST['force_ssl'] == 1 ? true : false);
|
79 |
if ( $force_ssl ) {
|
80 |
update_post_meta($post_id, 'force_ssl', 1);
|
81 |
} else {
|
82 |
delete_post_meta($post_id, 'force_ssl');
|
83 |
}
|
84 |
|
85 |
+
$force_ssl_children = ( isset($_POST['force_ssl_children']) && $_POST['force_ssl_children'] == 1 ? true : false);
|
86 |
if ( $force_ssl_children ) {
|
87 |
update_post_meta($post_id, 'force_ssl_children', 1);
|
88 |
} else {
|
lib/WordPressHTTPS/Module/Settings.php
CHANGED
@@ -21,7 +21,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
21 |
if ( is_admin() ) {
|
22 |
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_settings_save', array(&$this, 'save'));
|
23 |
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_settings_reset', array(&$this, 'reset'));
|
24 |
-
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '
|
25 |
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
|
26 |
// Add meta boxes
|
27 |
add_action('admin_init', array(&$this, 'add_meta_boxes'));
|
@@ -59,57 +59,48 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
59 |
public function add_meta_boxes() {
|
60 |
add_meta_box(
|
61 |
$this->getPlugin()->getSlug() . '_settings',
|
62 |
-
__( 'General Settings',
|
63 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
64 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
65 |
'main',
|
66 |
'high',
|
67 |
array( 'metabox' => 'settings' )
|
68 |
);
|
69 |
-
add_meta_box(
|
70 |
-
$this->getPlugin()->getSlug() . '_updates',
|
71 |
-
__( 'Developer Updates', $this->getPlugin()->getSlug() ),
|
72 |
-
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
73 |
-
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
74 |
-
'side',
|
75 |
-
'high',
|
76 |
-
array( 'metabox' => 'ajax', 'url' => 'http://wordpresshttps.com/client/updates.php' )
|
77 |
-
);
|
78 |
add_meta_box(
|
79 |
$this->getPlugin()->getSlug() . '_support',
|
80 |
-
__( 'Support',
|
81 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
82 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
83 |
'side',
|
84 |
'high',
|
85 |
-
array( 'metabox' => '
|
86 |
);
|
87 |
add_meta_box(
|
88 |
$this->getPlugin()->getSlug() . '_rate',
|
89 |
-
__( 'Feedback',
|
90 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
91 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
92 |
'side',
|
93 |
'core',
|
94 |
-
array( 'metabox' => '
|
95 |
);
|
96 |
add_meta_box(
|
97 |
$this->getPlugin()->getSlug() . '_donate',
|
98 |
-
__( 'Donate',
|
99 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
100 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
101 |
'side',
|
102 |
'core',
|
103 |
-
array( 'metabox' => '
|
104 |
);
|
105 |
add_meta_box(
|
106 |
$this->getPlugin()->getSlug() . '_donate2',
|
107 |
-
__( '
|
108 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
109 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
110 |
-
'
|
111 |
'low',
|
112 |
-
array( 'metabox' => '
|
113 |
);
|
114 |
}
|
115 |
|
@@ -127,36 +118,6 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
127 |
self::render();
|
128 |
}
|
129 |
|
130 |
-
/**
|
131 |
-
* Dispatch request for ajax metabox
|
132 |
-
*
|
133 |
-
* @param none
|
134 |
-
* @return void
|
135 |
-
*/
|
136 |
-
public function ajax_metabox() {
|
137 |
-
// Disable errors
|
138 |
-
error_reporting(0);
|
139 |
-
|
140 |
-
// Set headers
|
141 |
-
header("Status: 200");
|
142 |
-
header("HTTP/1.1 200 OK");
|
143 |
-
header('Content-Type: text/html');
|
144 |
-
header('Cache-Control: no-store, no-cache, must-revalidate');
|
145 |
-
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
146 |
-
header('Pragma: no-cache');
|
147 |
-
header("Vary: Accept-Encoding");
|
148 |
-
|
149 |
-
if ( ! wp_verify_nonce($_POST['_nonce'], $this->getPlugin()->getSlug()) ) {
|
150 |
-
exit;
|
151 |
-
}
|
152 |
-
|
153 |
-
$content = WordPressHTTPS_Url::fromString( $_POST['url'] )->getContent();
|
154 |
-
if ( $content ) {
|
155 |
-
echo $content;
|
156 |
-
}
|
157 |
-
exit;
|
158 |
-
}
|
159 |
-
|
160 |
/**
|
161 |
* Adds javascript and stylesheets to settings page in the admin panel.
|
162 |
* WordPress Hook - enqueue_scripts
|
@@ -165,7 +126,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
165 |
* @return void
|
166 |
*/
|
167 |
public function admin_enqueue_scripts() {
|
168 |
-
wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-page', $this->getPlugin()->getPluginUrl() . '/
|
169 |
wp_enqueue_script('jquery-form');
|
170 |
wp_enqueue_script('post');
|
171 |
|
@@ -181,7 +142,31 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
181 |
* @return void
|
182 |
*/
|
183 |
public function render() {
|
184 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
|
187 |
/**
|
@@ -195,7 +180,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
195 |
return false;
|
196 |
}
|
197 |
|
198 |
-
$message =
|
199 |
$errors = array();
|
200 |
$reload = true;
|
201 |
|
@@ -204,7 +189,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
204 |
}
|
205 |
$this->getPlugin()->install();
|
206 |
|
207 |
-
|
208 |
}
|
209 |
|
210 |
/**
|
@@ -214,14 +199,15 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
214 |
* @return void
|
215 |
*/
|
216 |
public function save() {
|
217 |
-
if ( !wp_verify_nonce($_POST['_wpnonce'],
|
218 |
return false;
|
219 |
}
|
220 |
|
221 |
-
$message =
|
222 |
$errors = array();
|
223 |
$reload = false;
|
224 |
$logout = false;
|
|
|
225 |
|
226 |
foreach ($this->getPlugin()->getSettings() as $key => $default) {
|
227 |
if ( !array_key_exists($key, $_POST) && $default == 0 ) {
|
@@ -236,11 +222,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
236 |
$_POST[$key] = 'https://' . $_POST[$key];
|
237 |
}
|
238 |
|
239 |
-
$ssl_host =
|
240 |
-
|
241 |
-
// Add Port
|
242 |
-
$_POST['ssl_port'] = $port = ((isset($_POST['ssl_port']) && is_int($_POST['ssl_port']) && $_POST['ssl_port'] != 443) ? $_POST['ssl_port'] : $ssl_host->getPort());
|
243 |
-
$ssl_host->setPort($port);
|
244 |
|
245 |
// Add Path
|
246 |
if ( strpos($ssl_host->getPath(), $this->getPlugin()->getHttpUrl()->getPath()) !== true ) {
|
@@ -256,7 +238,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
256 |
if ( $this->getPlugin()->isSsl() ) {
|
257 |
$logout = true;
|
258 |
}
|
259 |
-
$_POST[$key] = $ssl_host->
|
260 |
/*} else {
|
261 |
$errors[] = '<strong>SSL Host</strong> - Invalid WordPress installation at ' . $ssl_host;
|
262 |
$_POST[$key] = get_option($key);
|
@@ -297,7 +279,7 @@ class WordPressHTTPS_Module_Settings extends Mvied_Plugin_Module {
|
|
297 |
wp_logout();
|
298 |
}
|
299 |
|
300 |
-
|
301 |
}
|
302 |
|
303 |
}
|
21 |
if ( is_admin() ) {
|
22 |
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_settings_save', array(&$this, 'save'));
|
23 |
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_settings_reset', array(&$this, 'reset'));
|
24 |
+
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_settings_cache_reset', array(&$this, 'cache_reset'));
|
25 |
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
|
26 |
// Add meta boxes
|
27 |
add_action('admin_init', array(&$this, 'add_meta_boxes'));
|
59 |
public function add_meta_boxes() {
|
60 |
add_meta_box(
|
61 |
$this->getPlugin()->getSlug() . '_settings',
|
62 |
+
__( 'General Settings', 'wordpress-https' ),
|
63 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
64 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
65 |
'main',
|
66 |
'high',
|
67 |
array( 'metabox' => 'settings' )
|
68 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
add_meta_box(
|
70 |
$this->getPlugin()->getSlug() . '_support',
|
71 |
+
__( 'Support', 'wordpress-https' ),
|
72 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
73 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
74 |
'side',
|
75 |
'high',
|
76 |
+
array( 'metabox' => 'support' )
|
77 |
);
|
78 |
add_meta_box(
|
79 |
$this->getPlugin()->getSlug() . '_rate',
|
80 |
+
__( 'Feedback', 'wordpress-https' ),
|
81 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
82 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
83 |
'side',
|
84 |
'core',
|
85 |
+
array( 'metabox' => 'feedback' )
|
86 |
);
|
87 |
add_meta_box(
|
88 |
$this->getPlugin()->getSlug() . '_donate',
|
89 |
+
__( 'Donate', 'wordpress-https' ),
|
90 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
91 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
92 |
'side',
|
93 |
'core',
|
94 |
+
array( 'metabox' => 'donate' )
|
95 |
);
|
96 |
add_meta_box(
|
97 |
$this->getPlugin()->getSlug() . '_donate2',
|
98 |
+
__( 'Promotion', 'wordpress-https' ),
|
99 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
100 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
101 |
+
'side',
|
102 |
'low',
|
103 |
+
array( 'metabox' => 'donate2' )
|
104 |
);
|
105 |
}
|
106 |
|
118 |
self::render();
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
/**
|
122 |
* Adds javascript and stylesheets to settings page in the admin panel.
|
123 |
* WordPress Hook - enqueue_scripts
|
126 |
* @return void
|
127 |
*/
|
128 |
public function admin_enqueue_scripts() {
|
129 |
+
wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-page', $this->getPlugin()->getPluginUrl() . '/css/settings.css', array(), $this->getPlugin()->getVersion());
|
130 |
wp_enqueue_script('jquery-form');
|
131 |
wp_enqueue_script('post');
|
132 |
|
142 |
* @return void
|
143 |
*/
|
144 |
public function render() {
|
145 |
+
$this->getPlugin()->renderView('settings');
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Reset Cache
|
150 |
+
*
|
151 |
+
* @param none
|
152 |
+
* @return void
|
153 |
+
*/
|
154 |
+
public function cache_reset() {
|
155 |
+
if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
|
156 |
+
return false;
|
157 |
+
}
|
158 |
+
|
159 |
+
$message = __('Cache reset.', 'wordpress-https' );
|
160 |
+
$errors = array();
|
161 |
+
$reload = false;
|
162 |
+
|
163 |
+
$this->getPlugin()->setSetting('secure_external_urls', array());
|
164 |
+
$this->getPlugin()->setSetting('unsecure_external_urls', array());
|
165 |
+
$this->getPlugin()->setSetting('path_cache', array());
|
166 |
+
$this->getPlugin()->setSetting('blog_cache', array());
|
167 |
+
$this->getPlugin()->setSetting('hosts', array());
|
168 |
+
|
169 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));
|
170 |
}
|
171 |
|
172 |
/**
|
180 |
return false;
|
181 |
}
|
182 |
|
183 |
+
$message = __('Settings reset.', 'wordpress-https' );
|
184 |
$errors = array();
|
185 |
$reload = true;
|
186 |
|
189 |
}
|
190 |
$this->getPlugin()->install();
|
191 |
|
192 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));
|
193 |
}
|
194 |
|
195 |
/**
|
199 |
* @return void
|
200 |
*/
|
201 |
public function save() {
|
202 |
+
if ( !wp_verify_nonce($_POST['_wpnonce'], 'wordpress-https') ) {
|
203 |
return false;
|
204 |
}
|
205 |
|
206 |
+
$message = __('Settings saved.', 'wordpress-https' );
|
207 |
$errors = array();
|
208 |
$reload = false;
|
209 |
$logout = false;
|
210 |
+
$ssl_host = clone $this->getPlugin()->getHttpsUrl();
|
211 |
|
212 |
foreach ($this->getPlugin()->getSettings() as $key => $default) {
|
213 |
if ( !array_key_exists($key, $_POST) && $default == 0 ) {
|
222 |
$_POST[$key] = 'https://' . $_POST[$key];
|
223 |
}
|
224 |
|
225 |
+
$ssl_host = Mvied_Url::fromString($_POST[$key]);
|
|
|
|
|
|
|
|
|
226 |
|
227 |
// Add Path
|
228 |
if ( strpos($ssl_host->getPath(), $this->getPlugin()->getHttpUrl()->getPath()) !== true ) {
|
238 |
if ( $this->getPlugin()->isSsl() ) {
|
239 |
$logout = true;
|
240 |
}
|
241 |
+
$_POST[$key] = $ssl_host->toString();
|
242 |
/*} else {
|
243 |
$errors[] = '<strong>SSL Host</strong> - Invalid WordPress installation at ' . $ssl_host;
|
244 |
$_POST[$key] = get_option($key);
|
279 |
wp_logout();
|
280 |
}
|
281 |
|
282 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload, 'logout' => $logout));
|
283 |
}
|
284 |
|
285 |
}
|
lib/WordPressHTTPS/Module/UrlFilters.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
-
*
|
|
|
6 |
*
|
7 |
* @author Mike Ems
|
8 |
* @package WordPressHTTPS
|
@@ -19,8 +20,8 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
19 |
*/
|
20 |
public function init() {
|
21 |
if ( is_admin() ) {
|
22 |
-
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '
|
23 |
-
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '
|
24 |
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
|
25 |
// Add meta boxes
|
26 |
add_action('admin_init', array(&$this, 'add_meta_boxes'));
|
@@ -28,6 +29,7 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
28 |
}
|
29 |
|
30 |
add_filter('force_ssl', array(&$this, 'secure_filter_url'), 10, 3);
|
|
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -41,9 +43,10 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
41 |
*/
|
42 |
public function secure_filter_url( $force_ssl, $post_id = 0, $url = '' ) {
|
43 |
// Check secure filters
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
47 |
$force_ssl = true;
|
48 |
}
|
49 |
}
|
@@ -51,6 +54,28 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
51 |
return $force_ssl;
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* Add meta boxes to WordPress HTTPS Settings page.
|
56 |
*
|
@@ -60,12 +85,12 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
60 |
public function add_meta_boxes() {
|
61 |
add_meta_box(
|
62 |
$this->getPlugin()->getSlug() . '_filters',
|
63 |
-
__( 'URL Filters',
|
64 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
65 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
66 |
'main',
|
67 |
'default',
|
68 |
-
array( 'metabox' => '
|
69 |
);
|
70 |
}
|
71 |
|
@@ -80,13 +105,14 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
80 |
return false;
|
81 |
}
|
82 |
|
83 |
-
$message =
|
84 |
$errors = array();
|
85 |
$reload = true;
|
86 |
|
87 |
$this->getPlugin()->setSetting('secure_filter', array());
|
|
|
88 |
|
89 |
-
|
90 |
}
|
91 |
|
92 |
/**
|
@@ -100,15 +126,21 @@ class WordPressHTTPS_Module_UrlFilters extends Mvied_Plugin_Module {
|
|
100 |
return false;
|
101 |
}
|
102 |
|
103 |
-
$message =
|
104 |
$errors = array();
|
105 |
$reload = false;
|
106 |
|
107 |
-
$
|
108 |
-
$
|
109 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
-
|
112 |
}
|
113 |
|
114 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Url Filters Module
|
4 |
*
|
5 |
+
* Provides a mechanism to secure posts and pages using a simple
|
6 |
+
* string match or regular expressions.
|
7 |
*
|
8 |
* @author Mike Ems
|
9 |
* @package WordPressHTTPS
|
20 |
*/
|
21 |
public function init() {
|
22 |
if ( is_admin() ) {
|
23 |
+
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_url_filters_save', array(&$this, 'save'));
|
24 |
+
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_url_filters_reset', array(&$this, 'reset'));
|
25 |
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
|
26 |
// Add meta boxes
|
27 |
add_action('admin_init', array(&$this, 'add_meta_boxes'));
|
29 |
}
|
30 |
|
31 |
add_filter('force_ssl', array(&$this, 'secure_filter_url'), 10, 3);
|
32 |
+
add_filter('force_ssl', array(&$this, 'unsecure_filter_url'), 50, 3);
|
33 |
}
|
34 |
|
35 |
/**
|
43 |
*/
|
44 |
public function secure_filter_url( $force_ssl, $post_id = 0, $url = '' ) {
|
45 |
// Check secure filters
|
46 |
+
$plugin = $this->getPlugin();
|
47 |
+
if ( is_null($force_ssl) && sizeof((array)$plugin->getSetting('secure_filter')) > 0 ) {
|
48 |
+
foreach( (array)$plugin->getSetting('secure_filter') as $filter ) {
|
49 |
+
if ( preg_match('|' . $filter . '|', $url) === 1 ) {
|
50 |
$force_ssl = true;
|
51 |
}
|
52 |
}
|
54 |
return $force_ssl;
|
55 |
}
|
56 |
|
57 |
+
/**
|
58 |
+
* Unsecure Filter URL
|
59 |
+
* WordPress HTTPS Filter - force_ssl
|
60 |
+
*
|
61 |
+
* @param boolean $force_ssl
|
62 |
+
* @param int $post_id
|
63 |
+
* @param string $url
|
64 |
+
* @return boolean $force_ssl
|
65 |
+
*/
|
66 |
+
public function unsecure_filter_url( $force_ssl, $post_id = 0, $url = '' ) {
|
67 |
+
// Check unsecure filters
|
68 |
+
$plugin = $this->getPlugin();
|
69 |
+
if ( is_null($force_ssl) && sizeof((array)$plugin->getSetting('unsecure_filter')) > 0 ) {
|
70 |
+
foreach( (array)$plugin->getSetting('unsecure_filter') as $filter ) {
|
71 |
+
if ( preg_match('|' . $filter . '|', $url) === 1 ) {
|
72 |
+
$force_ssl = false;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
return $force_ssl;
|
77 |
+
}
|
78 |
+
|
79 |
/**
|
80 |
* Add meta boxes to WordPress HTTPS Settings page.
|
81 |
*
|
85 |
public function add_meta_boxes() {
|
86 |
add_meta_box(
|
87 |
$this->getPlugin()->getSlug() . '_filters',
|
88 |
+
__( 'URL Filters', 'wordpress-https' ),
|
89 |
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
90 |
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
91 |
'main',
|
92 |
'default',
|
93 |
+
array( 'metabox' => 'url_filters' )
|
94 |
);
|
95 |
}
|
96 |
|
105 |
return false;
|
106 |
}
|
107 |
|
108 |
+
$message = __('URL Filters reset.','wordpress-https');
|
109 |
$errors = array();
|
110 |
$reload = true;
|
111 |
|
112 |
$this->getPlugin()->setSetting('secure_filter', array());
|
113 |
+
$this->getPlugin()->setSetting('unsecure_filter', array());
|
114 |
|
115 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));
|
116 |
}
|
117 |
|
118 |
/**
|
126 |
return false;
|
127 |
}
|
128 |
|
129 |
+
$message = __('URL Filters saved.','wordpress-https');
|
130 |
$errors = array();
|
131 |
$reload = false;
|
132 |
|
133 |
+
$secure_filters = array_map('trim', (array)$_POST['secure_url_filters']);
|
134 |
+
$secure_filters = array_filter($secure_filters); // Removes blank array items
|
135 |
+
$secure_filters = stripslashes_deep($secure_filters);
|
136 |
+
$this->getPlugin()->setSetting('secure_filter', $secure_filters);
|
137 |
+
|
138 |
+
$unsecure_filters = array_map('trim', (array)$_POST['unsecure_url_filters']);
|
139 |
+
$unsecure_filters = array_filter($unsecure_filters); // Removes blank array items
|
140 |
+
$unsecure_filters = stripslashes_deep($unsecure_filters);
|
141 |
+
$this->getPlugin()->setSetting('unsecure_filter', $unsecure_filters);
|
142 |
|
143 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));
|
144 |
}
|
145 |
|
146 |
}
|
lib/WordPressHTTPS/Module/UrlMapping.php
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* URL Mapping Module
|
4 |
+
*
|
5 |
+
* Provides a way for users to specify if a host hosts their HTTPS
|
6 |
+
* content on a different domain.
|
7 |
+
*
|
8 |
+
* @author Mike Ems
|
9 |
+
* @package WordPressHTTPS
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
|
13 |
+
class WordPressHTTPS_Module_UrlMapping extends Mvied_Plugin_Module {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Initialize Module
|
17 |
+
*
|
18 |
+
* @param none
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
public function init() {
|
22 |
+
if ( is_admin() ) {
|
23 |
+
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_url_mapping_save', array(&$this, 'save'));
|
24 |
+
add_action('wp_ajax_' . $this->getPlugin()->getSlug() . '_url_mapping_reset', array(&$this, 'reset'));
|
25 |
+
if ( isset($_GET['page']) && strpos($_GET['page'], $this->getPlugin()->getSlug()) !== false ) {
|
26 |
+
// Add meta boxes
|
27 |
+
add_action('admin_init', array(&$this, 'add_meta_boxes'));
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
add_filter('http_internal_url', array(&$this, 'map_http_url'), 10);
|
32 |
+
add_filter('http_external_url', array(&$this, 'map_http_url'), 10);
|
33 |
+
add_filter('https_internal_url', array(&$this, 'map_https_url'), 10);
|
34 |
+
add_filter('https_external_url', array(&$this, 'map_https_url'), 10);
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Map HTTP URL
|
39 |
+
*
|
40 |
+
* @param string $url
|
41 |
+
* @return string $url
|
42 |
+
*/
|
43 |
+
public function map_http_url( $url ) {
|
44 |
+
$plugin = $this->getPlugin();
|
45 |
+
if ( is_array($plugin->getSetting('ssl_host_mapping')) && sizeof($plugin->getSetting('ssl_host_mapping')) > 0 ) {
|
46 |
+
foreach( $plugin->getSetting('ssl_host_mapping') as $mapping ) {
|
47 |
+
if ( !is_array($mapping) || ( isset($mapping[1]['scheme']) && $mapping[1]['scheme'] != 'http' ) ) {
|
48 |
+
continue;
|
49 |
+
}
|
50 |
+
$http_url = 'http://' . ( isset($mapping[1]['host']) ? $mapping[1]['host'] : '' );
|
51 |
+
$https_url = 'https://' . ( isset($mapping[0]['host']) ? $mapping[0]['host'] : '' );
|
52 |
+
preg_match('|' . $https_url . '|', $url, $matches);
|
53 |
+
if ( sizeof($matches) > 0 ) {
|
54 |
+
$url = preg_replace('|' . $https_url . '|', $http_url, $url);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
return $url;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Map HTTPS URL
|
63 |
+
*
|
64 |
+
* @param string $url
|
65 |
+
* @return string $url
|
66 |
+
*/
|
67 |
+
public function map_https_url( $url ) {
|
68 |
+
$plugin = $this->getPlugin();
|
69 |
+
if ( is_array($plugin->getSetting('ssl_host_mapping')) && sizeof($plugin->getSetting('ssl_host_mapping')) > 0 ) {
|
70 |
+
foreach( $plugin->getSetting('ssl_host_mapping') as $mapping ) {
|
71 |
+
if ( !is_array($mapping) || ( isset($mapping[1]['scheme']) && $mapping[1]['scheme'] != 'https' ) ) {
|
72 |
+
continue;
|
73 |
+
}
|
74 |
+
$http_url = 'http://' . ( isset($mapping[0]['host']) ? $mapping[0]['host'] : '' );
|
75 |
+
$https_url = 'https://' . ( isset($mapping[1]['host']) ? $mapping[1]['host'] : '' );
|
76 |
+
preg_match('|' . $http_url . '|', $url, $matches);
|
77 |
+
if ( sizeof($matches) > 0 ) {
|
78 |
+
$url = preg_replace('|' . $http_url . '|', $https_url, $url);
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
return $url;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Add meta boxes to WordPress HTTPS Settings page.
|
87 |
+
*
|
88 |
+
* @param none
|
89 |
+
* @return void
|
90 |
+
*/
|
91 |
+
public function add_meta_boxes() {
|
92 |
+
add_meta_box(
|
93 |
+
$this->getPlugin()->getSlug() . '_url_mapping',
|
94 |
+
__( 'URL Mapping', 'wordpress-https' ),
|
95 |
+
array($this->getPlugin()->getModule('Admin'), 'meta_box_render'),
|
96 |
+
'toplevel_page_' . $this->getPlugin()->getSlug(),
|
97 |
+
'main',
|
98 |
+
'core',
|
99 |
+
array( 'metabox' => 'url_mapping' )
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Reset URL Mapping
|
105 |
+
*
|
106 |
+
* @param array $settings
|
107 |
+
* @return void
|
108 |
+
*/
|
109 |
+
public function reset() {
|
110 |
+
if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
|
114 |
+
$message = __('URL Mapping reset.','wordpress-https');
|
115 |
+
$errors = array();
|
116 |
+
$reload = true;
|
117 |
+
|
118 |
+
$this->getPlugin()->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping);
|
119 |
+
|
120 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Save URL Mapping
|
125 |
+
*
|
126 |
+
* @param array $settings
|
127 |
+
* @return void
|
128 |
+
*/
|
129 |
+
public function save() {
|
130 |
+
if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
|
131 |
+
return false;
|
132 |
+
}
|
133 |
+
|
134 |
+
$message = __('URL Mapping saved.','wordpress-https');
|
135 |
+
$errors = array();
|
136 |
+
$reload = false;
|
137 |
+
|
138 |
+
$ssl_host_mapping = $this->getPlugin()->getSetting('ssl_host_mapping');
|
139 |
+
$mappings = array();
|
140 |
+
$i = 0;
|
141 |
+
for( $j=0; $j<sizeof($_POST['url_mapping']['scheme']); $j+=2 ) {
|
142 |
+
if ( isset($_POST['url_mapping']['host'][$j]) && $_POST['url_mapping']['host'][$j] != '' && isset($_POST['url_mapping']['host'][$j+1]) && $_POST['url_mapping']['host'][$j+1] != '' ) {
|
143 |
+
$mappings[$i][] = array(
|
144 |
+
'scheme' => $_POST['url_mapping']['scheme'][$j],
|
145 |
+
'host' => $_POST['url_mapping']['host'][$j]
|
146 |
+
);
|
147 |
+
$mappings[$i][] = array(
|
148 |
+
'scheme' => $_POST['url_mapping']['scheme'][$j+1],
|
149 |
+
'host' => $_POST['url_mapping']['host'][$j+1]
|
150 |
+
);
|
151 |
+
$i++;
|
152 |
+
}
|
153 |
+
}
|
154 |
+
$mappings = stripslashes_deep($mappings);
|
155 |
+
$this->getPlugin()->setSetting('ssl_host_mapping', $mappings);
|
156 |
+
|
157 |
+
$this->getPlugin()->renderView('ajax_message', array('message' => $message, 'errors' => $errors, 'reload' => $reload));
|
158 |
+
}
|
159 |
+
|
160 |
+
}
|
readme.txt
CHANGED
@@ -2,18 +2,27 @@
|
|
2 |
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.
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 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 |
-
<p>
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<p>Contribute Code at <a href="https://github.com/Mvied/wordpress-https">https://github.com/Mvied/wordpress-https</a></p>
|
16 |
-
<p>
|
|
|
17 |
|
18 |
== Installation ==
|
19 |
1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory.
|
@@ -95,6 +104,26 @@ add_filter('force_ssl', 'store_force_ssl', 10, 3);`
|
|
95 |
2. Force SSL checkbox added to add/edit posts screen
|
96 |
|
97 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
= 3.3.6 =
|
99 |
* Fixed bug where admin links in multisite networks were being broken.
|
100 |
* Added check for Jigoshop admin-ajax.php calls.
|
@@ -290,5 +319,7 @@ add_filter('force_ssl', 'store_force_ssl', 10, 3);`
|
|
290 |
* Initial Release.
|
291 |
|
292 |
== Upgrade Notice ==
|
|
|
|
|
293 |
= 3.2 =
|
294 |
You may lose your SSL Host setting upon upgrading if it is not default (matching your Site URL).
|
2 |
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.5
|
6 |
+
Tested up to: 4.9.1
|
7 |
+
Stable tag: 3.4.1
|
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 |
+
<p>WordPress HTTPS is intended to be an all-in-one solution to using SSL on WordPress sites.
|
14 |
+
WordPress HTTPS is well-known for being the "heavy-hitter" of SSL plugins. The latest release focuses on speed and performance.</p>
|
15 |
+
<p>If your SSL needs are simple, there are many fantastic, light-weight alternatives to WordPress HTTPS such as:
|
16 |
+
<a href="https://wordpress.org/plugins/really-simple-ssl/" target="_blank">Really Simple SSL</a> (great for securing the entire site),
|
17 |
+
<a href="https://wordpress.org/plugins/ssl-insecure-content-fixer/">SSL Insecure Content Fixer</a> (great at fixing most insecure content errors).</p>
|
18 |
+
<p>Read the <a href="http://wordpress.org/extend/plugins/wordpress-https/installation/">Installation Guide</a>.
|
19 |
+
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>.</p>
|
20 |
+
<p>If you are still unable to resolve your issue, <a href="http://wordpress.org/support/plugin/wordpress-https">start a support topic</a>
|
21 |
+
and someone from the community may be able to assist you. If you need immediate assistance, I am available for hire.
|
22 |
+
Unfortunately, I do not have time to support the plugin for free.</p>
|
23 |
<p>Contribute Code at <a href="https://github.com/Mvied/wordpress-https">https://github.com/Mvied/wordpress-https</a></p>
|
24 |
+
<p>Issue Tracker at <a href="https://github.com/mvied/wordpress-https/issues">https://github.com/mvied/wordpress-https/issues</a>
|
25 |
+
<p>Contribute Translations at <a href="https://translate.wordpress.org/projects/wp-plugins/wordpress-https">https://translate.wordpress.org/projects/wp-plugins/wordpress-https</a></p>
|
26 |
|
27 |
== Installation ==
|
28 |
1. Upload the `wordpress-https` folder to the `/wp-content/plugins/` directory.
|
104 |
2. Force SSL checkbox added to add/edit posts screen
|
105 |
|
106 |
== Changelog ==
|
107 |
+
= 3.4.1 =
|
108 |
+
* [Feature] Content Fixer is now optional in the plugin settings. This option should be on by default and is the preferred method to use the plugin.
|
109 |
+
* [Feature] Output buffering optional via `wordpress_https_parser_ob` filter. <a href="https://github.com/mvied/wordpress-https/issues/56">#56</a>
|
110 |
+
* [Bug] External resources being changed to local URL <a href="https://github.com/mvied/wordpress-https/issues/59">#59</a>
|
111 |
+
* [Bug] Added RSS permalink to filtered URLs.
|
112 |
+
* [Bug] Remove network defaults on uninstall.
|
113 |
+
* [Bug] Fixed displaying of Admin CSS when `site_url` is HTTP. <a href="https://github.com/mvied/wordpress-https/issues/58">#58</a>
|
114 |
+
* [Bug] Fixed issues displaying and resetting network settings introduced by 3.4.0.
|
115 |
+
= 3.4.0 =
|
116 |
+
* Tested with WordPress v4.9.1
|
117 |
+
* Many improvements to performance. Special thanks to <a href="https://github.com/heshiming">He Shiming</a> for help with profiling and improvements.
|
118 |
+
* Added internal caching to Parser module to drastically reduce queries.
|
119 |
+
* Added checks for Domain Mapping plugin.
|
120 |
+
* Renamed Domain Mapping featured to URL Mapping to reduce confusion with Domain Mapping plugin.
|
121 |
+
* Added ability to map both to and from HTTPS with URL Mapping.
|
122 |
+
* Added ability to also map local resources using URL Mapping.
|
123 |
+
* Fixed bug when external resources contained a port number, the port was not removed when testing for HTTPS.
|
124 |
+
* External HTTPS elements on HTTP pages will now stay HTTPS.
|
125 |
+
* Fonts should now be properly secured.
|
126 |
+
* Added check for HTTP_X_FORWARDED_SSL header.
|
127 |
= 3.3.6 =
|
128 |
* Fixed bug where admin links in multisite networks were being broken.
|
129 |
* Added check for Jigoshop admin-ajax.php calls.
|
319 |
* Initial Release.
|
320 |
|
321 |
== Upgrade Notice ==
|
322 |
+
= 3.5.0 =
|
323 |
+
Content Fixer is now optional in the plugin settings. This option should be on by default.
|
324 |
= 3.2 =
|
325 |
You may lose your SSL Host setting upon upgrading if it is not default (matching your Site URL).
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
uninstall.php
CHANGED
@@ -7,6 +7,9 @@ if ( !defined('WP_UNINSTALL_PLUGIN') ) {
|
|
7 |
}
|
8 |
|
9 |
$options = array(
|
|
|
|
|
|
|
10 |
'wordpress-https_external_urls',
|
11 |
'wordpress-https_secure_external_urls',
|
12 |
'wordpress-https_unsecure_external_urls',
|
@@ -23,12 +26,14 @@ $options = array(
|
|
23 |
'wordpress-https_debug',
|
24 |
'wordpress-https_admin_menu',
|
25 |
'wordpress-https_secure_filter',
|
26 |
-
'wordpress-https_ssl_host_mapping'
|
|
|
|
|
27 |
);
|
28 |
|
29 |
global $wpdb;
|
30 |
if ( is_multisite() && is_network_admin() ) {
|
31 |
-
$blogs = $wpdb->get_col(
|
32 |
} else {
|
33 |
$blogs = array($wpdb->blogid);
|
34 |
}
|
7 |
}
|
8 |
|
9 |
$options = array(
|
10 |
+
'wordpress-https_hosts',
|
11 |
+
'wordpress-https_content_fixer',
|
12 |
+
'wordpress-https_network_defaults',
|
13 |
'wordpress-https_external_urls',
|
14 |
'wordpress-https_secure_external_urls',
|
15 |
'wordpress-https_unsecure_external_urls',
|
26 |
'wordpress-https_debug',
|
27 |
'wordpress-https_admin_menu',
|
28 |
'wordpress-https_secure_filter',
|
29 |
+
'wordpress-https_ssl_host_mapping',
|
30 |
+
'wordpress-https_path_cache',
|
31 |
+
'wordpress-https_blog_cache',
|
32 |
);
|
33 |
|
34 |
global $wpdb;
|
35 |
if ( is_multisite() && is_network_admin() ) {
|
36 |
+
$blogs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
|
37 |
} else {
|
38 |
$blogs = array($wpdb->blogid);
|
39 |
}
|
{admin/templates → view}/ajax_message.php
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
if ( isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest' ) {
|
4 |
error_reporting(0);
|
5 |
while(@ob_end_clean());
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
if ( isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest' ) {
|
4 |
error_reporting(0);
|
5 |
while(@ob_end_clean());
|
view/metabox/donate.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p>If you found this plugin useful, or I've already helped you, please consider buying me a <a href="http://en.wikipedia.org/wiki/Newcastle_Brown_Ale" target="_blank">beer</a> or two.</p>
|
2 |
+
<p>Donations help alleviate the time spent developing and supporting this plugin and are greatly appreciated.</p>
|
3 |
+
|
4 |
+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N9NFVADLVUR7A" target="_blank" id="wphttps-donate-link">
|
5 |
+
<img alt="Donate" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" width="74" height="21" />
|
6 |
+
</a>
|
view/metabox/donate2.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<script type="text/javascript">jQuery(document).ready(function($) { $('label[for="wordpress-https_donate2-hide"]').contents().filter(function(){ return this.nodeType != 1; }).wrap('<span class="label"/>'); $('#wordpress-https_donate2 h3 span, label[for="wordpress-https_donate2-hide"] .label').text('Need an SSL Certificate?'); });</script>
|
2 |
+
<p style="text-align: center;">Enter promo code <strong>WPSSL</strong> to recieve a <strong style="color: #F00;">10%</strong> discount at <a <a href="https://www.certs4less.com/1071.html">certs4less.com</a>!</p>
|
view/metabox/feedback.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<p>Please show your appreciation for WordPress HTTPS by giving it a positive <a href="https://wordpress.org/support/plugin/wordpress-https/reviews/#new-post" target="_blank">review</a> in the plugin repository!</p>
|
{admin/templates → view}/metabox/network.php
RENAMED
@@ -1,5 +1,8 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
3 |
<input type="hidden" name="action" id="action" value="" />
|
4 |
|
5 |
<table id="blog-table">
|
@@ -9,6 +12,7 @@
|
|
9 |
<th class="blog-host"><?php _e('SSL Host','wordpress-https'); ?></th>
|
10 |
<th class="blog-ssl_admin"><?php _e('Force SSL Admin','wordpress-https'); ?></th>
|
11 |
<th class="blog-exclusive_https"><?php _e('Force SSL Exclusively','wordpress-https'); ?></th>
|
|
|
12 |
<th class="blog-remove_unsecure"><?php _e('Remove Unsecure Elements','wordpress-https'); ?></th>
|
13 |
<th class="blog-debug"><?php _e('Debug Mode','wordpress-https'); ?></th>
|
14 |
<th class="blog-proxy"><?php _e('Proxy','wordpress-https'); ?></th>
|
@@ -18,41 +22,42 @@
|
|
18 |
<tbody>
|
19 |
<?php
|
20 |
global $wpdb;
|
21 |
-
$blogs = $wpdb->get_col(
|
22 |
foreach($blogs as $blog_id) {
|
23 |
-
$ssl_host = ($this->
|
24 |
$ssl_host = preg_replace('/http[s]?:\/\//', '', $ssl_host);
|
25 |
$ssl_host = rtrim(str_replace(parse_url(get_site_url($blog_id, ''), PHP_URL_PATH), '', $ssl_host), '/');
|
26 |
?>
|
27 |
<tr>
|
28 |
<td class="blog-blog"><strong><?php echo preg_replace('/http[s]?:\/\//', '', get_site_url($blog_id)); ?></strong></td>
|
29 |
<td class="blog-host"><input name="blog[<?php echo $blog_id; ?>][ssl_host]" type="text" class="regular-text code" value="<?php echo $ssl_host; ?>" /></td>
|
30 |
-
<td class="blog-ssl_admin"><input type="hidden" name="blog[<?php echo $blog_id; ?>][ssl_admin]" value="<?php echo ((force_ssl_admin() && $this->
|
31 |
-
<td class="blog-exclusive_https"><input type="hidden" name="blog[<?php echo $blog_id; ?>][exclusive_https]" value="0" /><input name="blog[<?php echo $blog_id; ?>][exclusive_https]" type="checkbox" value="1"<?php echo (($this->
|
32 |
-
<td class="blog-
|
33 |
-
<td class="blog-
|
|
|
34 |
<td class="blog-proxy">
|
35 |
<select name="blog[<?php echo $blog_id; ?>][ssl_proxy]">
|
36 |
-
<option value="0"<?php echo ((! $this->
|
37 |
-
<option value="auto"<?php echo (($this->
|
38 |
-
<option value="1"<?php echo (($this->
|
39 |
</select>
|
40 |
</td>
|
41 |
<td class="blog-admin_menu">
|
42 |
<select name="blog[<?php echo $blog_id; ?>][admin_menu]">
|
43 |
-
<option value="side"<?php echo (($this->
|
44 |
-
<option value="settings"<?php echo (($this->
|
45 |
</select>
|
46 |
</td>
|
47 |
</tr>
|
48 |
<?php
|
49 |
}
|
50 |
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
}
|
57 |
?>
|
58 |
|
@@ -61,13 +66,14 @@
|
|
61 |
<td class="blog-host"><input name="blog_default[ssl_host]" type="text" class="regular-text code" value="<?php echo $defaults['ssl_host']; ?>" /></td>
|
62 |
<td class="blog-ssl_admin"><input type="hidden" name="blog_default[ssl_admin]" value="0" /><input name="blog_default[ssl_admin]" type="checkbox" value="1"<?php echo ($defaults['ssl_admin'] ? ' checked="checked"' : ''); ?> /></td>
|
63 |
<td class="blog-exclusive_https"><input type="hidden" name="blog_default[exclusive_https]" value="0" /><input name="blog_default[exclusive_https]" type="checkbox" value="1"<?php echo ($defaults['exclusive_https'] ? ' checked="checked"' : ''); ?> /></td>
|
|
|
64 |
<td class="blog-remove_unsecure"><input type="hidden" name="blog_default[remove_unsecure]" value="0" /><input name="blog_default[remove_unsecure]" type="checkbox" value="1"<?php echo ($defaults['remove_unsecure'] ? ' checked="checked"' : ''); ?> /></td>
|
65 |
<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>
|
66 |
<td class="blog-proxy">
|
67 |
<select name="blog_default[ssl_proxy]">
|
68 |
-
<option value="0"<?php echo (! $defaults['ssl_proxy'] ? ' selected="selected"' : ''); ?>><?php _e('No'
|
69 |
<option value="auto"<?php echo ($defaults['ssl_proxy'] === 'auto' ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
|
70 |
-
<option value="1"<?php echo ($defaults['ssl_proxy'] === 1 ? ' selected="selected"' : ''); ?>><?php _e('Yes'
|
71 |
</select>
|
72 |
</td>
|
73 |
<td class="blog-admin_menu">
|
@@ -82,15 +88,15 @@
|
|
82 |
</table>
|
83 |
|
84 |
<p class="button-controls">
|
85 |
-
<input type="submit" name="network-settings-save" value="<?php _e('Save Changes'
|
86 |
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
87 |
</p>
|
88 |
</form>
|
89 |
<script type="text/javascript">
|
90 |
jQuery(document).ready(function($) {
|
91 |
-
var form = $('#<?php echo $this->
|
92 |
$('#network-settings-save').click(function() {
|
93 |
-
$(form).find('input[name="action"]').val('<?php echo $this->
|
94 |
});
|
95 |
$(form).submit(function(e) {
|
96 |
e.preventDefault();
|
1 |
+
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
+
?>
|
4 |
+
<form name="<?php echo $this->getSlug(); ?>_network_settings_form" id="<?php echo $this->getSlug(); ?>_network_settings_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
5 |
+
<?php wp_nonce_field($this->getSlug()); ?>
|
6 |
<input type="hidden" name="action" id="action" value="" />
|
7 |
|
8 |
<table id="blog-table">
|
12 |
<th class="blog-host"><?php _e('SSL Host','wordpress-https'); ?></th>
|
13 |
<th class="blog-ssl_admin"><?php _e('Force SSL Admin','wordpress-https'); ?></th>
|
14 |
<th class="blog-exclusive_https"><?php _e('Force SSL Exclusively','wordpress-https'); ?></th>
|
15 |
+
<th class="blog-content_fixer"><?php _e('Content Fixer','wordpress-https'); ?></th>
|
16 |
<th class="blog-remove_unsecure"><?php _e('Remove Unsecure Elements','wordpress-https'); ?></th>
|
17 |
<th class="blog-debug"><?php _e('Debug Mode','wordpress-https'); ?></th>
|
18 |
<th class="blog-proxy"><?php _e('Proxy','wordpress-https'); ?></th>
|
22 |
<tbody>
|
23 |
<?php
|
24 |
global $wpdb;
|
25 |
+
$blogs = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
|
26 |
foreach($blogs as $blog_id) {
|
27 |
+
$ssl_host = ($this->getSetting('ssl_host', $blog_id) != '' ? $this->getSetting('ssl_host', $blog_id) : get_site_url($blog_id, '', 'https'));
|
28 |
$ssl_host = preg_replace('/http[s]?:\/\//', '', $ssl_host);
|
29 |
$ssl_host = rtrim(str_replace(parse_url(get_site_url($blog_id, ''), PHP_URL_PATH), '', $ssl_host), '/');
|
30 |
?>
|
31 |
<tr>
|
32 |
<td class="blog-blog"><strong><?php echo preg_replace('/http[s]?:\/\//', '', get_site_url($blog_id)); ?></strong></td>
|
33 |
<td class="blog-host"><input name="blog[<?php echo $blog_id; ?>][ssl_host]" type="text" class="regular-text code" value="<?php echo $ssl_host; ?>" /></td>
|
34 |
+
<td class="blog-ssl_admin"><input type="hidden" name="blog[<?php echo $blog_id; ?>][ssl_admin]" value="<?php echo ((force_ssl_admin() && $this->getSetting('ssl_admin', $blog_id) == 1) ? 1 : 0); ?>" /><input name="blog[<?php echo $blog_id; ?>][ssl_admin]" type="checkbox" value="1"<?php echo ((force_ssl_admin()) ? ' disabled="disabled" title="FORCE_SSL_ADMIN is true in wp-config.php"' : '') . ($this->getSetting('ssl_admin', $blog_id) ? ' checked="checked"' : ''); ?> /></td>
|
35 |
+
<td class="blog-exclusive_https"><input type="hidden" name="blog[<?php echo $blog_id; ?>][exclusive_https]" value="0" /><input name="blog[<?php echo $blog_id; ?>][exclusive_https]" type="checkbox" value="1"<?php echo (($this->getSetting('exclusive_https', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
|
36 |
+
<td class="blog-content_fixer"><input type="hidden" name="blog[<?php echo $blog_id; ?>][content_fixer]" value="0" /><input name="blog[<?php echo $blog_id; ?>][content_fixer]" type="checkbox" value="1"<?php echo (($this->getSetting('content_fixer', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
|
37 |
+
<td class="blog-remove_unsecure"><input type="hidden" name="blog[<?php echo $blog_id; ?>][remove_unsecure]" value="0" /><input name="blog[<?php echo $blog_id; ?>][remove_unsecure]" type="checkbox" value="1"<?php echo (($this->getSetting('remove_unsecure', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
|
38 |
+
<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->getSetting('debug', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
|
39 |
<td class="blog-proxy">
|
40 |
<select name="blog[<?php echo $blog_id; ?>][ssl_proxy]">
|
41 |
+
<option value="0"<?php echo ((! $this->getSetting('ssl_proxy', $blog_id)) ? ' selected="selected"' : ''); ?>><?php _e('No'); ?></option>
|
42 |
+
<option value="auto"<?php echo (($this->getSetting('ssl_proxy', $blog_id) === 'auto') ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
|
43 |
+
<option value="1"<?php echo (($this->getSetting('ssl_proxy', $blog_id) == 1) ? ' selected="selected"' : ''); ?>><?php _e('Yes'); ?></option>
|
44 |
</select>
|
45 |
</td>
|
46 |
<td class="blog-admin_menu">
|
47 |
<select name="blog[<?php echo $blog_id; ?>][admin_menu]">
|
48 |
+
<option value="side"<?php echo (($this->getSetting('admin_menu', $blog_id) === 'side') ? ' selected="selected"' : ''); ?>><?php _e('Sidebar','wordpress-https'); ?></option>
|
49 |
+
<option value="settings"<?php echo (($this->getSetting('admin_menu', $blog_id) === 'settings') ? ' selected="selected"' : ''); ?>><?php _e('Settings','wordpress-https'); ?></option>
|
50 |
</select>
|
51 |
</td>
|
52 |
</tr>
|
53 |
<?php
|
54 |
}
|
55 |
|
56 |
+
foreach( $this->getSettings() as $setting => $default ) {
|
57 |
+
$defaults[$setting] = $default;
|
58 |
+
}
|
59 |
+
foreach( $this->getSetting('network_defaults') as $setting => $default ) {
|
60 |
+
$defaults[$setting] = $default;
|
61 |
}
|
62 |
?>
|
63 |
|
66 |
<td class="blog-host"><input name="blog_default[ssl_host]" type="text" class="regular-text code" value="<?php echo $defaults['ssl_host']; ?>" /></td>
|
67 |
<td class="blog-ssl_admin"><input type="hidden" name="blog_default[ssl_admin]" value="0" /><input name="blog_default[ssl_admin]" type="checkbox" value="1"<?php echo ($defaults['ssl_admin'] ? ' checked="checked"' : ''); ?> /></td>
|
68 |
<td class="blog-exclusive_https"><input type="hidden" name="blog_default[exclusive_https]" value="0" /><input name="blog_default[exclusive_https]" type="checkbox" value="1"<?php echo ($defaults['exclusive_https'] ? ' checked="checked"' : ''); ?> /></td>
|
69 |
+
<td class="blog-content_fixer"><input type="hidden" name="blog_default[content_fixer]" value="0" /><input name="blog_default[content_fixer]" type="checkbox" value="1"<?php echo ($defaults['content_fixer'] ? ' checked="checked"' : ''); ?> /></td>
|
70 |
<td class="blog-remove_unsecure"><input type="hidden" name="blog_default[remove_unsecure]" value="0" /><input name="blog_default[remove_unsecure]" type="checkbox" value="1"<?php echo ($defaults['remove_unsecure'] ? ' checked="checked"' : ''); ?> /></td>
|
71 |
<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>
|
72 |
<td class="blog-proxy">
|
73 |
<select name="blog_default[ssl_proxy]">
|
74 |
+
<option value="0"<?php echo (! $defaults['ssl_proxy'] ? ' selected="selected"' : ''); ?>><?php _e('No'); ?></option>
|
75 |
<option value="auto"<?php echo ($defaults['ssl_proxy'] === 'auto' ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
|
76 |
+
<option value="1"<?php echo ($defaults['ssl_proxy'] === 1 ? ' selected="selected"' : ''); ?>><?php _e('Yes'); ?></option>
|
77 |
</select>
|
78 |
</td>
|
79 |
<td class="blog-admin_menu">
|
88 |
</table>
|
89 |
|
90 |
<p class="button-controls">
|
91 |
+
<input type="submit" name="network-settings-save" value="<?php _e('Save Changes'); ?>" class="button-primary" id="network-settings-save" />
|
92 |
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
93 |
</p>
|
94 |
</form>
|
95 |
<script type="text/javascript">
|
96 |
jQuery(document).ready(function($) {
|
97 |
+
var form = $('#<?php echo $this->getSlug(); ?>_network_settings_form').first();
|
98 |
$('#network-settings-save').click(function() {
|
99 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_network_settings_save');
|
100 |
});
|
101 |
$(form).submit(function(e) {
|
102 |
e.preventDefault();
|
{admin/templates → view}/metabox/post.php
RENAMED
@@ -1,4 +1,6 @@
|
|
1 |
<?php
|
|
|
|
|
2 |
global $post;
|
3 |
|
4 |
if ( $post->ID ) {
|
@@ -14,7 +16,7 @@ if ( $post->ID ) {
|
|
14 |
}
|
15 |
}
|
16 |
|
17 |
-
wp_nonce_field($this->
|
18 |
?>
|
19 |
|
20 |
<div class="misc-pub-section">
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
+
|
4 |
global $post;
|
5 |
|
6 |
if ( $post->ID ) {
|
16 |
}
|
17 |
}
|
18 |
|
19 |
+
wp_nonce_field($this->getSlug(), $this->getSlug());
|
20 |
?>
|
21 |
|
22 |
<div class="misc-pub-section">
|
{admin/templates → view}/metabox/settings.php
RENAMED
@@ -1,14 +1,17 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
9 |
?>
|
10 |
-
<form name="<?php echo $this->
|
11 |
-
<?php wp_nonce_field($this->
|
12 |
<input type="hidden" name="action" id="action" value="" />
|
13 |
|
14 |
<table class="form-table">
|
@@ -19,9 +22,6 @@
|
|
19 |
<label for="ssl_host" id="ssl_host_label">
|
20 |
<input name="ssl_host" type="text" id="ssl_host" class="regular-text code" value="<?php echo $ssl_host; ?>" />
|
21 |
</label>
|
22 |
-
<label for="ssl_port" id="ssl_port_label"><?php _e('Port','wordpress-https'); ?>
|
23 |
-
<input name="ssl_port" type="text" id="ssl_port" class="small-text" value="<?php echo $this->getPlugin()->getSetting('ssl_port'); ?>" />
|
24 |
-
</label>
|
25 |
</fieldset>
|
26 |
</td>
|
27 |
</tr>
|
@@ -30,9 +30,9 @@
|
|
30 |
<td>
|
31 |
<fieldset>
|
32 |
<label for="ssl_admin">
|
33 |
-
<input type="hidden" name="ssl_admin" value="<?php echo ((force_ssl_admin() && $this->
|
34 |
-
<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->
|
35 |
-
<p class="description"><?php printf( __('Always use HTTPS while in the admin panel. This setting is identical to %s
|
36 |
</label>
|
37 |
</fieldset>
|
38 |
</td>
|
@@ -43,8 +43,20 @@
|
|
43 |
<fieldset>
|
44 |
<label for="exclusive_https">
|
45 |
<input type="hidden" name="exclusive_https" value="0" />
|
46 |
-
<input name="exclusive_https" type="checkbox" id="exclusive_https" value="1"<?php echo (($this->
|
47 |
-
<p class="description"><?php printf( __('Any page that is not secured via %s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</label>
|
49 |
</fieldset>
|
50 |
</td>
|
@@ -55,8 +67,8 @@
|
|
55 |
<fieldset>
|
56 |
<label for="remove_unsecure">
|
57 |
<input type="hidden" name="remove_unsecure" value="0" />
|
58 |
-
<input name="remove_unsecure" type="checkbox" id="remove_unsecure" value="1"<?php echo (($this->
|
59 |
-
<p class="description"><?php _e(
|
60 |
</label>
|
61 |
</fieldset>
|
62 |
</td>
|
@@ -67,7 +79,7 @@
|
|
67 |
<fieldset>
|
68 |
<label for="debug">
|
69 |
<input type="hidden" name="debug" value="0" />
|
70 |
-
<input name="debug" type="checkbox" id="debug" value="1"<?php echo (($this->
|
71 |
<p class="description"><?php _e('Outputs debug information to the browser\'s console.','wordpress-https'); ?></p>
|
72 |
</label>
|
73 |
</fieldset>
|
@@ -78,9 +90,9 @@
|
|
78 |
<td>
|
79 |
<fieldset>
|
80 |
<label for="ssl_proxy" class="label-radio">
|
81 |
-
<input type="radio" name="ssl_proxy" value="0"<?php echo ((! $this->
|
82 |
-
<input type="radio" name="ssl_proxy" value="auto"<?php echo (($this->
|
83 |
-
<input type="radio" name="ssl_proxy" value="1"<?php echo (($this->
|
84 |
</label>
|
85 |
<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>
|
86 |
</fieldset>
|
@@ -91,36 +103,45 @@
|
|
91 |
<td>
|
92 |
<fieldset>
|
93 |
<label for="admin_menu_side" class="label-radio">
|
94 |
-
<input type="radio" name="admin_menu" id="admin_menu_side" value="side"<?php echo (($this->
|
95 |
</label>
|
96 |
<label for="admin_menu_settings" class="label-radio">
|
97 |
-
<input type="radio" name="admin_menu" id="admin_menu_settings" value="settings"<?php echo (($this->
|
98 |
</label>
|
99 |
</fieldset>
|
100 |
</td>
|
101 |
</tr>
|
102 |
</table>
|
103 |
|
104 |
-
<input type="hidden" name="ssl_host_subdomain" value="<?php echo (($this->
|
105 |
-
<input type="hidden" name="ssl_host_diff" value="<?php echo (($this->
|
106 |
|
107 |
<p class="button-controls">
|
108 |
-
<input type="submit" name="settings-save" value="<?php _e('Save Changes'
|
109 |
-
<input type="submit" name="settings-reset" value="<?php _e('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">
|
114 |
jQuery(document).ready(function($) {
|
115 |
-
var form = $('#<?php echo $this->
|
|
|
116 |
$('#settings-save').click(function() {
|
117 |
-
$(form).find('input[name="action"]').val('<?php echo $this->
|
|
|
|
|
|
|
118 |
});
|
119 |
$('#settings-reset').click(function() {
|
120 |
-
$(form).find('input[name="action"]').val('<?php echo $this->
|
121 |
});
|
122 |
$(form).submit(function(e) {
|
123 |
e.preventDefault();
|
|
|
|
|
|
|
|
|
124 |
$(form).find('.submit-waiting').show();
|
125 |
$.post(ajaxurl, $(form).serialize(), function(response) {
|
126 |
$(form).find('.submit-waiting').hide();
|
@@ -128,18 +149,11 @@ jQuery(document).ready(function($) {
|
|
128 |
});
|
129 |
});
|
130 |
|
131 |
-
/*.ajaxForm({
|
132 |
-
success: function(responseText, textStatus, XMLHttpRequest) {
|
133 |
-
$('#<?php echo $this->getPlugin()->getSlug(); ?>_settings_form .submit-waiting').hide();
|
134 |
-
$('#message-body').html(responseText).fadeOut(0).fadeIn().delay(5000).fadeOut();
|
135 |
-
}
|
136 |
-
});*/
|
137 |
-
|
138 |
$('#settings-reset').click(function(e, el) {
|
139 |
-
|
140 |
e.preventDefault();
|
141 |
return false;
|
142 |
-
|
143 |
});
|
144 |
});
|
145 |
</script>
|
1 |
<?php
|
2 |
+
|
3 |
+
if ( !defined('ABSPATH') ) exit;
|
4 |
+
|
5 |
+
$count = 1; // Used to restrict str_replace count
|
6 |
+
$ssl_host = clone $this->getHttpsUrl();
|
7 |
+
$ssl_host = $ssl_host->setScheme('')->toString();
|
8 |
+
if ( $this->getHttpUrl()->getPath() != '/' ) {
|
9 |
+
$ssl_host = str_replace($this->getHttpUrl()->getPath(), '', $ssl_host, $count);
|
10 |
+
}
|
11 |
+
$ssl_host = rtrim($ssl_host, '/');
|
12 |
?>
|
13 |
+
<form name="<?php echo $this->getSlug(); ?>_settings_form" id="<?php echo $this->getSlug(); ?>_settings_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
14 |
+
<?php wp_nonce_field($this->getSlug()); ?>
|
15 |
<input type="hidden" name="action" id="action" value="" />
|
16 |
|
17 |
<table class="form-table">
|
22 |
<label for="ssl_host" id="ssl_host_label">
|
23 |
<input name="ssl_host" type="text" id="ssl_host" class="regular-text code" value="<?php echo $ssl_host; ?>" />
|
24 |
</label>
|
|
|
|
|
|
|
25 |
</fieldset>
|
26 |
</td>
|
27 |
</tr>
|
30 |
<td>
|
31 |
<fieldset>
|
32 |
<label for="ssl_admin">
|
33 |
+
<input type="hidden" name="ssl_admin" value="<?php echo ((force_ssl_admin() && $this->getSetting('ssl_admin') == 1) ? 1 : 0); ?>" />
|
34 |
+
<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->getSetting('ssl_admin')) ? ' checked="checked"' : '') ); ?> />
|
35 |
+
<p class="description"><?php printf( __('Always use HTTPS while in the admin panel. This setting is identical to %s.','wordpress-https'),'<a href="http://codex.wordpress.org/Administration_Over_SSL#Example_2" target="_blank">' . 'FORCE_SSL_ADMIN' . '</a>'); ?></p>
|
36 |
</label>
|
37 |
</fieldset>
|
38 |
</td>
|
43 |
<fieldset>
|
44 |
<label for="exclusive_https">
|
45 |
<input type="hidden" name="exclusive_https" value="0" />
|
46 |
+
<input name="exclusive_https" type="checkbox" id="exclusive_https" value="1"<?php echo (($this->getSetting('exclusive_https')) ? ' checked="checked"' : ''); ?> />
|
47 |
+
<p class="description"><?php printf( __('Any page that is not secured via %s or URL Filters will be redirected to HTTP.','wordpress-https'),'<a href="' . parse_url($this->getPluginUrl(), PHP_URL_PATH) . '/screenshot-2.png" class="thickbox">' . __('Force SSL','wordpress-https') . '</a>'); ?></a></p>
|
48 |
+
</label>
|
49 |
+
</fieldset>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
<tr valign="top" id="content_fixer_row">
|
53 |
+
<th scope="row"><?php _e('Content Fixer','wordpress-https'); ?></th>
|
54 |
+
<td>
|
55 |
+
<fieldset>
|
56 |
+
<label for="content_fixer">
|
57 |
+
<input type="hidden" name="content_fixer" value="0" />
|
58 |
+
<input name="content_fixer" type="checkbox" id="content_fixer" value="1"<?php echo (($this->getSetting('content_fixer')) ? ' checked="checked"' : ''); ?> />
|
59 |
+
<p class="description"><?php _e("Fixes insecure HTTP elements on HTTPS pages.",'wordpress-https'); ?></p>
|
60 |
</label>
|
61 |
</fieldset>
|
62 |
</td>
|
67 |
<fieldset>
|
68 |
<label for="remove_unsecure">
|
69 |
<input type="hidden" name="remove_unsecure" value="0" />
|
70 |
+
<input name="remove_unsecure" type="checkbox" id="remove_unsecure" value="1"<?php echo (($this->getSetting('remove_unsecure')) ? ' checked="checked"' : ''); ?> />
|
71 |
+
<p class="description"><?php _e("Remove elements inaccessible over HTTPS. May break other plugins' functionality.",'wordpress-https'); ?></p>
|
72 |
</label>
|
73 |
</fieldset>
|
74 |
</td>
|
79 |
<fieldset>
|
80 |
<label for="debug">
|
81 |
<input type="hidden" name="debug" value="0" />
|
82 |
+
<input name="debug" type="checkbox" id="debug" value="1"<?php echo (($this->getSetting('debug')) ? ' checked="checked"' : ''); ?> />
|
83 |
<p class="description"><?php _e('Outputs debug information to the browser\'s console.','wordpress-https'); ?></p>
|
84 |
</label>
|
85 |
</fieldset>
|
90 |
<td>
|
91 |
<fieldset>
|
92 |
<label for="ssl_proxy" class="label-radio">
|
93 |
+
<input type="radio" name="ssl_proxy" value="0"<?php echo ((! $this->getSetting('ssl_proxy')) ? ' checked="checked"' : ''); ?>> <span><?php _e('No'); ?></span>
|
94 |
+
<input type="radio" name="ssl_proxy" value="auto"<?php echo (($this->getSetting('ssl_proxy') === 'auto') ? ' checked="checked"' : ''); ?>> <span><?php _e('Auto','wordpress-https'); ?></span>
|
95 |
+
<input type="radio" name="ssl_proxy" value="1"<?php echo (($this->getSetting('ssl_proxy') == 1) ? ' checked="checked"' : ''); ?>> <span><?php _e('Yes'); ?></span>
|
96 |
</label>
|
97 |
<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>
|
98 |
</fieldset>
|
103 |
<td>
|
104 |
<fieldset>
|
105 |
<label for="admin_menu_side" class="label-radio">
|
106 |
+
<input type="radio" name="admin_menu" id="admin_menu_side" value="side"<?php echo (($this->getSetting('admin_menu') === 'side') ? ' checked="checked"' : ''); ?>> <span><?php _e('Sidebar','wordpress-https'); ?></span>
|
107 |
</label>
|
108 |
<label for="admin_menu_settings" class="label-radio">
|
109 |
+
<input type="radio" name="admin_menu" id="admin_menu_settings" value="settings"<?php echo (($this->getSetting('admin_menu') === 'settings') ? ' checked="checked"' : ''); ?>> <span><?php _e('Settings','wordpress-https'); ?></span>
|
110 |
</label>
|
111 |
</fieldset>
|
112 |
</td>
|
113 |
</tr>
|
114 |
</table>
|
115 |
|
116 |
+
<input type="hidden" name="ssl_host_subdomain" value="<?php echo (($this->getSetting('ssl_host_subdomain') != 1) ? 0 : 1); ?>" />
|
117 |
+
<input type="hidden" name="ssl_host_diff" value="<?php echo (($this->getSetting('ssl_host_diff') != 1) ? 0 : 1); ?>" />
|
118 |
|
119 |
<p class="button-controls">
|
120 |
+
<input type="submit" name="settings-save" value="<?php _e('Save Changes'); ?>" class="button-primary" id="settings-save" />
|
121 |
+
<input type="submit" name="settings-reset" value="<?php _e('Reset'); ?>" class="button-secondary" id="settings-reset" />
|
122 |
+
<input type="submit" name="settings-cache-reset" value="<?php _e('Purge Cache','wordpress-https'); ?>" class="button-secondary" id="settings-cache-reset" />
|
123 |
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
124 |
</p>
|
125 |
</form>
|
126 |
<script type="text/javascript">
|
127 |
jQuery(document).ready(function($) {
|
128 |
+
var form = $('#<?php echo $this->getSlug(); ?>_settings_form').first();
|
129 |
+
var ssl_host_value = $('#ssl_host').val();
|
130 |
$('#settings-save').click(function() {
|
131 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_settings_save');
|
132 |
+
});
|
133 |
+
$('#settings-cache-reset').click(function() {
|
134 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_settings_cache_reset');
|
135 |
});
|
136 |
$('#settings-reset').click(function() {
|
137 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_settings_reset');
|
138 |
});
|
139 |
$(form).submit(function(e) {
|
140 |
e.preventDefault();
|
141 |
+
if ( $('#ssl_host').val() != ssl_host_value && ! confirm("<?php _e("Are you sure you want to set your SSL Host to '%s'? An incorrect value here may render your admin dashboard unusable until you reset the plugin's settings following the directions in the FAQ.",'wordpress-https'); ?>".replace('%s', $('#ssl_host').val())) ) {
|
142 |
+
e.preventDefault();
|
143 |
+
return false;
|
144 |
+
}
|
145 |
$(form).find('.submit-waiting').show();
|
146 |
$.post(ajaxurl, $(form).serialize(), function(response) {
|
147 |
$(form).find('.submit-waiting').hide();
|
149 |
});
|
150 |
});
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
$('#settings-reset').click(function(e, el) {
|
153 |
+
if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS settings?','wordpress-https'); ?>') ) {
|
154 |
e.preventDefault();
|
155 |
return false;
|
156 |
+
}
|
157 |
});
|
158 |
});
|
159 |
</script>
|
view/metabox/support.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<ul>
|
2 |
+
<li>Having problems getting your site secure?</li>
|
3 |
+
<li>Please read the introductory <a href="http://wordpress.org/extend/plugins/wordpress-https/installation/" target="_blank">Installation Guide</a>.</li>
|
4 |
+
<li>If you haven't already, check out the <a href="http://wordpress.org/extend/plugins/wordpress-https/faq/" target="_blank">Frequently Asked Questions</a>.</li>
|
5 |
+
</ul>
|
6 |
+
<p>Still not fixed? Please <a href="https://wordpress.org/support/plugin/wordpress-https#new-post" target="_blank">start a support topic</a> and someone from the community may be able to assist you. If you need immediate assistance, I am available for hire. Unfortunately, I do not have time to support the plugin for free.</p>
|
view/metabox/url_filters.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
+
?>
|
4 |
+
<form name="<?php echo $this->getSlug(); ?>_url_filters_form" id="<?php echo $this->getSlug(); ?>_url_filters_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
5 |
+
<?php wp_nonce_field($this->getSlug()); ?>
|
6 |
+
<input type="hidden" name="action" id="action" value="" />
|
7 |
+
|
8 |
+
<p><?php printf( __('URL Filters allow you to specify what content should always be secure or unsecure using simple string comparisons or %s.','wordpress-https'),'<a href="#TB_inline?height=155&width=350&inlineId=regex-help" class="thickbox" title="' . __('Regular Expressions Help','wordpress-https') . '">'.__('Regular Expressions','wordpress-https').'</a>'); ?></p>
|
9 |
+
|
10 |
+
<table class="form-table url_filters" id="secure_url_filters">
|
11 |
+
<tr valign="top">
|
12 |
+
<td colspan="2"><h4><?php _e('Secure Filters','wordpress-https'); ?></h4></td>
|
13 |
+
</tr>
|
14 |
+
<?php if ( sizeof($this->getSetting('secure_filter')) > 0 ) : foreach ( (array)$this->getSetting('secure_filter') as $filter ) : ?>
|
15 |
+
<tr valign="top" class="secure_url_filters_row">
|
16 |
+
<td>
|
17 |
+
<input type="text" name="secure_url_filters[]" value="<?php echo $filter; ?>" />
|
18 |
+
</td>
|
19 |
+
<td class="controls">
|
20 |
+
<a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
21 |
+
<a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
<?php endforeach; else: ?>
|
25 |
+
<tr valign="top" class="secure_url_filters_row">
|
26 |
+
<td>
|
27 |
+
<input type="text" name="secure_url_filters[]" value="" />
|
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 |
+
<?php endif; ?>
|
35 |
+
</table>
|
36 |
+
|
37 |
+
<table class="form-table url_filters" id="unsecure_url_filters">
|
38 |
+
<tr valign="top">
|
39 |
+
<td colspan="2"><h4><?php _e('Unsecure Filters','wordpress-https'); ?></h4></td>
|
40 |
+
</tr>
|
41 |
+
<?php if ( sizeof($this->getSetting('unsecure_filter')) > 0 ) : foreach ( (array)$this->getSetting('unsecure_filter') as $filter ) : ?>
|
42 |
+
<tr valign="top" class="unsecure_url_filters_row">
|
43 |
+
<td>
|
44 |
+
<input type="text" name="unsecure_url_filters[]" value="<?php echo $filter; ?>" />
|
45 |
+
</td>
|
46 |
+
<td class="controls">
|
47 |
+
<a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
48 |
+
<a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
<?php endforeach; else: ?>
|
52 |
+
<tr valign="top" class="unsecure_url_filters_row">
|
53 |
+
<td>
|
54 |
+
<input type="text" name="unsecure_url_filters[]" value="" />
|
55 |
+
</td>
|
56 |
+
<td class="controls">
|
57 |
+
<a class="remove" href="#" title="<?php _e('Remove URL Filter','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
58 |
+
<a class="add" href="#" title="<?php _e('Add URL Filter','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
<?php endif; ?>
|
62 |
+
</table>
|
63 |
+
|
64 |
+
<p class="button-controls">
|
65 |
+
<input type="submit" name="url-filters-save" value="<?php _e('Save Changes'); ?>" class="button-primary" id="url-filters-save" />
|
66 |
+
<input type="submit" name="url-filters-reset" value="<?php _e('Reset'); ?>" class="button-secondary" id="url-filters-reset" />
|
67 |
+
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
68 |
+
</p>
|
69 |
+
</form>
|
70 |
+
|
71 |
+
<script type="text/javascript">
|
72 |
+
jQuery(document).ready(function($) {
|
73 |
+
var form = $('#<?php echo $this->getSlug(); ?>_url_filters_form').first();
|
74 |
+
$('#url-filters-save').click(function() {
|
75 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_url_filters_save');
|
76 |
+
});
|
77 |
+
$('#url-filters-reset').click(function() {
|
78 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_url_filters_reset');
|
79 |
+
});
|
80 |
+
$(form).submit(function(e) {
|
81 |
+
e.preventDefault();
|
82 |
+
$(form).find('.submit-waiting').show();
|
83 |
+
$.post(ajaxurl, $(form).serialize(), function(response) {
|
84 |
+
$(form).find('.submit-waiting').hide();
|
85 |
+
$('#message-body').html(response).fadeOut(0).fadeIn().delay(5000).fadeOut();
|
86 |
+
});
|
87 |
+
});
|
88 |
+
|
89 |
+
$('#url-filters-reset').click(function(e, el) {
|
90 |
+
if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS URL Filters?','wordpress-https'); ?>') ) {
|
91 |
+
e.preventDefault();
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
});
|
95 |
+
|
96 |
+
$('#secure_url_filters').on('click', '.secure_url_filters_row .add', function(e) {
|
97 |
+
e.preventDefault();
|
98 |
+
var row = $(this).parents('tr').clone();
|
99 |
+
row.find('input').val('');
|
100 |
+
$(this).parents('table').append(row);
|
101 |
+
$(this).hide();
|
102 |
+
$('#secure_url_filters .remove').show();
|
103 |
+
return false;
|
104 |
+
});
|
105 |
+
|
106 |
+
$('#secure_url_filters').on('click', '.secure_url_filters_row .remove', function(e) {
|
107 |
+
e.preventDefault();
|
108 |
+
$(this).parents('tr').remove();
|
109 |
+
if ( $('#secure_url_filters tr').length <= 2 ) {
|
110 |
+
$('#secure_url_filters .remove').hide();
|
111 |
+
} else {
|
112 |
+
$('#secure_url_filters .remove').show();
|
113 |
+
}
|
114 |
+
$('#secure_url_filters .add').hide();
|
115 |
+
$('#secure_url_filters tr:last-child .add').show();
|
116 |
+
return false;
|
117 |
+
});
|
118 |
+
|
119 |
+
if ( $('#secure_url_filters tr').length <= 2 ) {
|
120 |
+
$('#secure_url_filters .remove').hide();
|
121 |
+
} else {
|
122 |
+
$('#secure_url_filters .remove').show();
|
123 |
+
$('#secure_url_filters .add').hide();
|
124 |
+
$('#secure_url_filters tr:last-child .add').show();
|
125 |
+
}
|
126 |
+
|
127 |
+
$('#unsecure_url_filters').on('click', '.unsecure_url_filters_row .add', function(e) {
|
128 |
+
e.preventDefault();
|
129 |
+
var row = $(this).parents('tr').clone();
|
130 |
+
row.find('input').val('');
|
131 |
+
$(this).parents('table').append(row);
|
132 |
+
$(this).hide();
|
133 |
+
$('#unsecure_url_filters .remove').show();
|
134 |
+
return false;
|
135 |
+
});
|
136 |
+
|
137 |
+
$('#unsecure_url_filters').on('click', '.unsecure_url_filters_row .remove', function(e) {
|
138 |
+
e.preventDefault();
|
139 |
+
$(this).parents('tr').remove();
|
140 |
+
if ( $('#unsecure_url_filters tr').length <= 2 ) {
|
141 |
+
$('#unsecure_url_filters .remove').hide();
|
142 |
+
} else {
|
143 |
+
$('#unsecure_url_filters .remove').show();
|
144 |
+
}
|
145 |
+
$('#unsecure_url_filters .add').hide();
|
146 |
+
$('#unsecure_url_filters tr:last-child .add').show();
|
147 |
+
return false;
|
148 |
+
});
|
149 |
+
|
150 |
+
if ( $('#unsecure_url_filters tr').length <= 2 ) {
|
151 |
+
$('#unsecure_url_filters .remove').hide();
|
152 |
+
} else {
|
153 |
+
$('#unsecure_url_filters .remove').show();
|
154 |
+
$('#unsecure_url_filters .add').hide();
|
155 |
+
$('#unsecure_url_filters tr:last-child .add').show();
|
156 |
+
}
|
157 |
+
});
|
158 |
+
</script>
|
view/metabox/url_mapping.php
ADDED
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
+
$http_url = clone $this->getHttpUrl();
|
4 |
+
$http_url = rtrim($http_url->setScheme('')->toString(), '/');
|
5 |
+
$https_url = clone $this->getHttpsUrl();
|
6 |
+
$https_url = rtrim($https_url->setScheme('')->toString(), '/');
|
7 |
+
?>
|
8 |
+
<form name="<?php echo $this->getSlug(); ?>_url_mapping_form" id="<?php echo $this->getSlug(); ?>_url_mapping_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
9 |
+
<?php wp_nonce_field($this->getSlug()); ?>
|
10 |
+
<input type="hidden" name="action" id="action" value="" />
|
11 |
+
|
12 |
+
<p><?php printf( __('URL Mapping allows you to map urls that host their HTTPS content on a different url. You may use %s for the URL on the left side of the mapping.','wordpress-https'),'<a href="#TB_inline?height=155&width=350&inlineId=regex-help" class="thickbox" title="' . __('Regular Expressions Help','wordpress-https') . '">'.__('Regular Expressions','wordpress-https').'</a>') ; ?></p>
|
13 |
+
|
14 |
+
<table class="form-table" id="url_mapping">
|
15 |
+
<thead>
|
16 |
+
</thead>
|
17 |
+
<tbody>
|
18 |
+
<tr valign="top" class="url_mapping_row url_mapping_row">
|
19 |
+
<td class="scheme">
|
20 |
+
<select name="http_scheme" disabled="disabled">
|
21 |
+
<option>http</option>
|
22 |
+
</select>
|
23 |
+
</td>
|
24 |
+
<td class="sep">
|
25 |
+
<span class="label">://</span>
|
26 |
+
</td>
|
27 |
+
<td class="host">
|
28 |
+
<input id="http_url" type="text" name="http_host" value="<?php echo $http_url ?>" disabled="disabled" title="<?php echo _e('You can modify this mapping by changing your Home URL.','wordpress-https'); ?>" />
|
29 |
+
</td>
|
30 |
+
<td class="sep url-sep">
|
31 |
+
<span class="label">»</span>
|
32 |
+
</td>
|
33 |
+
<td class="scheme">
|
34 |
+
<select name="https_scheme" disabled="disabled">
|
35 |
+
<option>https</option>
|
36 |
+
</select>
|
37 |
+
</td>
|
38 |
+
<td class="sep">
|
39 |
+
<span class="label">://</span>
|
40 |
+
</td>
|
41 |
+
<td class="host">
|
42 |
+
<input id="https_url" type="text" name="https_host" value="<?php echo $https_url ?>" disabled="disabled" title="<?php echo _e('You can modify this mapping by changing your SSL Host in the settings above.','wordpress-https'); ?>" />
|
43 |
+
</td>
|
44 |
+
<td class="controls">
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
<?php
|
48 |
+
$ssl_host_mapping = ( is_array($this->getSetting('ssl_host_mapping')) ? $this->getSetting('ssl_host_mapping') : array() );
|
49 |
+
if ( sizeof($ssl_host_mapping) > 0 ) {
|
50 |
+
foreach( $ssl_host_mapping as $mapping ) {
|
51 |
+
if ( !is_array($mapping) ) {
|
52 |
+
continue;
|
53 |
+
}
|
54 |
+
?>
|
55 |
+
<tr valign="top" class="url_mapping_row">
|
56 |
+
<td class="scheme">
|
57 |
+
<select name="url_mapping[scheme][]">
|
58 |
+
<option<?php echo isset($mapping[0]['scheme']) && $mapping[0]['scheme'] == 'http' ? ' selected="selected"' : ''; ?>>http</option>
|
59 |
+
<option<?php echo isset($mapping[0]['scheme']) && $mapping[0]['scheme'] == 'https' ? ' selected="selected"' : ''; ?>>https</option>
|
60 |
+
</select>
|
61 |
+
</td>
|
62 |
+
<td class="sep">
|
63 |
+
<span class="label">://</span>
|
64 |
+
</td>
|
65 |
+
<td class="host">
|
66 |
+
<input type="text" name="url_mapping[host][]" value="<?php echo @$mapping[0]['host']; ?>" />
|
67 |
+
</td>
|
68 |
+
<td class="sep url-sep">
|
69 |
+
<span class="label">»</span>
|
70 |
+
</td>
|
71 |
+
<td class="scheme">
|
72 |
+
<select name="url_mapping[scheme][]">
|
73 |
+
<option<?php echo isset($mapping[1]['scheme']) && $mapping[1]['scheme'] == 'https' ? ' selected="selected"' : ''; ?>>https</option>
|
74 |
+
<option<?php echo isset($mapping[1]['scheme']) && $mapping[1]['scheme'] == 'http' ? ' selected="selected"' : ''; ?>>http</option>
|
75 |
+
</select>
|
76 |
+
</td>
|
77 |
+
<td class="sep">
|
78 |
+
<span class="label">://</span>
|
79 |
+
</td>
|
80 |
+
<td class="host">
|
81 |
+
<input type="text" name="url_mapping[host][]" value="<?php echo @$mapping[1]['host']; ?>" />
|
82 |
+
</td>
|
83 |
+
<td class="controls">
|
84 |
+
<a class="remove" href="#" title="<?php _e('Remove URL Mapping','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
85 |
+
<a class="add" href="#" title="<?php _e('Add URL Mapping','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
|
89 |
+
<?php
|
90 |
+
}
|
91 |
+
}
|
92 |
+
?>
|
93 |
+
<tr valign="top" class="url_mapping_row">
|
94 |
+
<td class="scheme">
|
95 |
+
<select name="url_mapping[scheme][]">
|
96 |
+
<option>http</option>
|
97 |
+
<option>https</option>
|
98 |
+
</select>
|
99 |
+
</td>
|
100 |
+
<td class="sep">
|
101 |
+
<span class="label">://</span>
|
102 |
+
</td>
|
103 |
+
<td class="host">
|
104 |
+
<input type="text" name="url_mapping[host][]" value="" />
|
105 |
+
</td>
|
106 |
+
<td class="sep url-sep">
|
107 |
+
<span class="label">»</span>
|
108 |
+
</td>
|
109 |
+
<td class="scheme">
|
110 |
+
<select name="url_mapping[scheme][]">
|
111 |
+
<option>https</option>
|
112 |
+
<option>http</option>
|
113 |
+
</select>
|
114 |
+
</td>
|
115 |
+
<td class="sep">
|
116 |
+
<span class="label">://</span>
|
117 |
+
</td>
|
118 |
+
<td class="host">
|
119 |
+
<input type="text" name="url_mapping[host][]" value="" />
|
120 |
+
</td>
|
121 |
+
<td class="controls">
|
122 |
+
<a class="remove" href="#" title="<?php _e('Remove URL Mapping','wordpress-https'); ?>"><?php _e('Remove','wordpress-https'); ?></a>
|
123 |
+
<a class="add" href="#" title="<?php _e('Add URL Mapping','wordpress-https'); ?>"><?php _e('Add','wordpress-https'); ?></a>
|
124 |
+
</td>
|
125 |
+
</tr>
|
126 |
+
</tbody>
|
127 |
+
</table>
|
128 |
+
|
129 |
+
<p class="button-controls">
|
130 |
+
<input type="submit" name="url-mapping-save" value="<?php _e('Save Changes'); ?>" class="button-primary" id="url-mapping-save" />
|
131 |
+
<input type="submit" name="url-mapping-reset" value="<?php _e('Reset'); ?>" class="button-secondary" id="url-mapping-reset" />
|
132 |
+
<img alt="<?php _e('Waiting...','wordpress-https'); ?>" src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="waiting submit-waiting" />
|
133 |
+
</p>
|
134 |
+
</form>
|
135 |
+
<script type="text/javascript">
|
136 |
+
jQuery(document).ready(function($) {
|
137 |
+
var form = $('#<?php echo $this->getSlug(); ?>_url_mapping_form').first();
|
138 |
+
$('#url-mapping-save').click(function() {
|
139 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_url_mapping_save');
|
140 |
+
});
|
141 |
+
$('#url-mapping-reset').click(function() {
|
142 |
+
if ( ! confirm('<?php _e('Are you sure you want to reset all WordPress HTTPS url mappings?','wordpress-https'); ?>') ) {
|
143 |
+
e.preventDefault();
|
144 |
+
return false;
|
145 |
+
}
|
146 |
+
$(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_url_mapping_reset');
|
147 |
+
});
|
148 |
+
$(form).submit(function(e) {
|
149 |
+
e.preventDefault();
|
150 |
+
$(form).find('.submit-waiting').show();
|
151 |
+
$.post(ajaxurl, $(form).serialize(), function(response) {
|
152 |
+
$(form).find('.submit-waiting').hide();
|
153 |
+
$('#message-body').html(response).fadeOut(0).fadeIn().delay(5000).fadeOut();
|
154 |
+
});
|
155 |
+
});
|
156 |
+
|
157 |
+
var ssl_host;
|
158 |
+
$('#ssl_host').keyup(function() {
|
159 |
+
var value = $(this).val();
|
160 |
+
$('#https_url').val($('#https_url').val().replace(ssl_host, value));
|
161 |
+
ssl_host = value;
|
162 |
+
}).keyup();
|
163 |
+
|
164 |
+
$('#url_mapping').on('change', '.url_mapping_row .scheme select', function(e) {
|
165 |
+
e.preventDefault();
|
166 |
+
var thisSelect = this;
|
167 |
+
$(thisSelect).parents('tr').find('select').each(function(i, otherSelect) {
|
168 |
+
if ( i > 0 && thisSelect != otherSelect ) {
|
169 |
+
if ( $(thisSelect).val() == 'http' ) {
|
170 |
+
$(otherSelect).val('https');
|
171 |
+
} else {
|
172 |
+
$(otherSelect).val('http');
|
173 |
+
}
|
174 |
+
}
|
175 |
+
});
|
176 |
+
return false;
|
177 |
+
});
|
178 |
+
|
179 |
+
$('#url_mapping').on('click', '.url_mapping_row .add', function(e) {
|
180 |
+
e.preventDefault();
|
181 |
+
var row = $(this).parents('tr').clone();
|
182 |
+
row.find('input').val('');
|
183 |
+
$(this).parents('table').append(row);
|
184 |
+
$(this).hide();
|
185 |
+
$('#url_mapping .remove').show();
|
186 |
+
return false;
|
187 |
+
});
|
188 |
+
|
189 |
+
$('#url_mapping').on('click', '.url_mapping_row .remove', function(e) {
|
190 |
+
e.preventDefault();
|
191 |
+
$(this).parents('tr').remove();
|
192 |
+
if ( $('#url_mapping tr').length <= 2 ) {
|
193 |
+
$('#url_mapping .remove').hide();
|
194 |
+
} else {
|
195 |
+
$('#url_mapping .remove').show();
|
196 |
+
}
|
197 |
+
$('#url_mapping .add').hide();
|
198 |
+
$('#url_mapping tr:last-child .add').show();
|
199 |
+
return false;
|
200 |
+
});
|
201 |
+
|
202 |
+
if ( $('#url_mapping tr').length <= 2 ) {
|
203 |
+
$('#url_mapping .remove').hide();
|
204 |
+
} else {
|
205 |
+
$('#url_mapping .remove').show();
|
206 |
+
$('#url_mapping .add').hide();
|
207 |
+
$('#url_mapping tr:last-child .add').show();
|
208 |
+
}
|
209 |
+
});
|
210 |
+
</script>
|
{admin/templates → view}/network.php
RENAMED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
require_once('../includes/template.php'); // WordPress Dashboard Functions
|
3 |
?>
|
4 |
|
@@ -14,7 +15,7 @@ require_once('../includes/template.php'); // WordPress Dashboard Functions
|
|
14 |
?>
|
15 |
<div id="poststuff" class="columns metabox-holder">
|
16 |
<div class="postbox-container">
|
17 |
-
<?php do_meta_boxes('toplevel_page_' . $this->
|
18 |
</div>
|
19 |
</div>
|
20 |
</div>
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
require_once('../includes/template.php'); // WordPress Dashboard Functions
|
4 |
?>
|
5 |
|
15 |
?>
|
16 |
<div id="poststuff" class="columns metabox-holder">
|
17 |
<div class="postbox-container">
|
18 |
+
<?php do_meta_boxes('toplevel_page_' . $this->getSlug() . '_network', 'main', $this); ?>
|
19 |
</div>
|
20 |
</div>
|
21 |
</div>
|
{admin/templates → view}/settings.php
RENAMED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
require_once('includes/template.php'); // WordPress Dashboard Functions
|
3 |
?>
|
4 |
|
@@ -14,10 +15,10 @@ require_once('includes/template.php'); // WordPress Dashboard Functions
|
|
14 |
?>
|
15 |
<div id="poststuff" class="columns metabox-holder">
|
16 |
<div class="postbox-container column-primary">
|
17 |
-
<?php do_meta_boxes('toplevel_page_' . $this->
|
18 |
</div>
|
19 |
<div class="postbox-container column-secondary">
|
20 |
-
<?php do_meta_boxes('toplevel_page_' . $this->
|
21 |
</div>
|
22 |
</div>
|
23 |
|
1 |
<?php
|
2 |
+
if ( !defined('ABSPATH') ) exit;
|
3 |
require_once('includes/template.php'); // WordPress Dashboard Functions
|
4 |
?>
|
5 |
|
15 |
?>
|
16 |
<div id="poststuff" class="columns metabox-holder">
|
17 |
<div class="postbox-container column-primary">
|
18 |
+
<?php do_meta_boxes('toplevel_page_' . $this->getSlug(), 'main', $this); ?>
|
19 |
</div>
|
20 |
<div class="postbox-container column-secondary">
|
21 |
+
<?php do_meta_boxes('toplevel_page_' . $this->getSlug(), 'side', $this); ?>
|
22 |
</div>
|
23 |
</div>
|
24 |
|
wordpress-https.php
CHANGED
@@ -4,15 +4,15 @@
|
|
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.
|
8 |
Author URI: http://mvied.com/
|
9 |
|
10 |
Text Domain: wordpress-https
|
11 |
-
Domain Path: /
|
12 |
*/
|
13 |
|
14 |
/*
|
15 |
-
Copyright
|
16 |
|
17 |
This program is free software: you can redistribute it and/or modify
|
18 |
it under the terms of the GNU General Public License as published by
|
@@ -30,7 +30,7 @@
|
|
30 |
|
31 |
if ( !defined('ABSPATH') ) exit;
|
32 |
|
33 |
-
load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/
|
34 |
|
35 |
function wphttps_autoloader($class) {
|
36 |
$namespaces = array(
|
@@ -54,10 +54,11 @@ spl_autoload_register('wphttps_autoloader');
|
|
54 |
if ( ! defined('WP_UNINSTALL_PLUGIN') ) {
|
55 |
$wordpress_https = new WordPressHTTPS;
|
56 |
$wordpress_https->setSlug('wordpress-https');
|
57 |
-
$wordpress_https->setVersion('3.
|
58 |
-
$wordpress_https->setLogger(
|
59 |
$wordpress_https->setDirectory(dirname(__FILE__));
|
60 |
$wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');
|
|
|
61 |
|
62 |
// Load Modules
|
63 |
$wordpress_https->loadModules();
|
@@ -65,7 +66,10 @@ if ( ! defined('WP_UNINSTALL_PLUGIN') ) {
|
|
65 |
// If WPHTTPS_RESET global is defined, reset settings
|
66 |
if ( defined('WPHTTPS_RESET') && constant('WPHTTPS_RESET') == true ) {
|
67 |
foreach($wordpress_https->getSettings() as $key => $default) {
|
68 |
-
|
|
|
|
|
|
|
69 |
}
|
70 |
}
|
71 |
|
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.4.1
|
8 |
Author URI: http://mvied.com/
|
9 |
|
10 |
Text Domain: wordpress-https
|
11 |
+
Domain Path: /lang/
|
12 |
*/
|
13 |
|
14 |
/*
|
15 |
+
Copyright 2018 Mike Ems (email : mike@mvied.com)
|
16 |
|
17 |
This program is free software: you can redistribute it and/or modify
|
18 |
it under the terms of the GNU General Public License as published by
|
30 |
|
31 |
if ( !defined('ABSPATH') ) exit;
|
32 |
|
33 |
+
load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
34 |
|
35 |
function wphttps_autoloader($class) {
|
36 |
$namespaces = array(
|
54 |
if ( ! defined('WP_UNINSTALL_PLUGIN') ) {
|
55 |
$wordpress_https = new WordPressHTTPS;
|
56 |
$wordpress_https->setSlug('wordpress-https');
|
57 |
+
$wordpress_https->setVersion('3.4.1');
|
58 |
+
$wordpress_https->setLogger(Mvied_Logger::getInstance());
|
59 |
$wordpress_https->setDirectory(dirname(__FILE__));
|
60 |
$wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');
|
61 |
+
$wordpress_https->setViewDirectory(dirname(__FILE__) . '/view/');
|
62 |
|
63 |
// Load Modules
|
64 |
$wordpress_https->loadModules();
|
66 |
// If WPHTTPS_RESET global is defined, reset settings
|
67 |
if ( defined('WPHTTPS_RESET') && constant('WPHTTPS_RESET') == true ) {
|
68 |
foreach($wordpress_https->getSettings() as $key => $default) {
|
69 |
+
if ($key == 'ssl_host_mapping')
|
70 |
+
$wordpress_https->setSetting($key, WordPressHTTPS::$ssl_host_mapping);
|
71 |
+
else
|
72 |
+
$wordpress_https->setSetting($key, $default);
|
73 |
}
|
74 |
}
|
75 |
|