Skip to content
Browse files

Updated Mvied library to use view rendering. Re-organized css, js, im…

…age and template files.
  • Loading branch information...
1 parent ce98cde commit 0e9139ad37cde3ca85d209ce416cc01a9c776245 @mvied committed
View
4 admin/css/admin.css → css/admin.css
@@ -2,7 +2,6 @@
#adminmenu .menu-top.toplevel_page_wordpress-https.wp-has-current-submenu .wp-menu-image,
#adminmenu .menu-top.toplevel_page_wordpress-https:hover .wp-menu-image,
#adminmenu .menu-top.toplevel_page_wordpress-https.focused .wp-menu-image {
- /* background-position: -360px -1px; */
background-position: 0% 0%;
}
#adminmenu .menu-top.toplevel_page_wordpress-https .wp-menu-image img {
@@ -10,8 +9,7 @@
}
#adminmenu .menu-top.toplevel_page_wordpress-https div.wp-menu-image {
- /* background: url('../../../../../wp-admin/images/menu.png') no-repeat scroll -360px -33px; */
- background: url('images/admin-icon.png') no-repeat 0% 100%;;
+ background: url('../img/admin-icon.png') no-repeat 0% 100%;;
}
#side-sortables #wordpress-https .inside {
padding: 0;
View
0 admin/css/network.css → css/network.css
File renamed without changes.
View
5 admin/css/settings.css → css/settings.css
@@ -12,7 +12,7 @@
}
#wphttps-main #icon-options-https {
- background: url(images/admin-icon32.png) no-repeat;
+ background: url(../img/admin-icon32.png) no-repeat;
}
#wphttps-main .meta-box-sortables {
@@ -95,7 +95,8 @@
margin-right: 10px;
}
#wphttps-main #ssl_host {
- width: 70%;
+ width: 80%;
+ margin-top: 3px;
}
#wphttps-main #exclusive_https_row label {
padding-top: 5px;
View
0 admin/css/images/add.png → img/add.png
File renamed without changes
View
0 admin/css/images/admin-icon.png → img/admin-icon.png
File renamed without changes
View
0 admin/css/images/admin-icon32.png → img/admin-icon32.png
File renamed without changes
View
0 admin/css/images/arrow_left.png → img/arrow_left.png
File renamed without changes
View
0 admin/css/images/arrow_right.png → img/arrow_right.png
File renamed without changes
View
0 admin/css/images/delete.png → img/delete.png
File renamed without changes
View
0 admin/css/images/lock-icon.png → img/lock-icon.png
File renamed without changes
View
0 languages/wordpress-https-de_DE.mo → lang/wordpress-https-de_DE.mo
File renamed without changes.
View
0 languages/wordpress-https-de_DE.po → lang/wordpress-https-de_DE.po
File renamed without changes.
View
0 languages/wordpress-https.pot → lang/wordpress-https.pot
File renamed without changes.
2 lib/Mvied
@@ -1 +1 @@
-Subproject commit 311a2343b6be4e4dfc1c30330ac937ab1ae47825
+Subproject commit b9329054ecf7f8c64b5b8dea3bc26c0f1092c89c
View
4 lib/WordPressHTTPS/Module/Admin.php
@@ -35,7 +35,7 @@ public function init() {
* @return void
*/
public function admin_enqueue_scripts() {
- wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-global', $this->getPlugin()->getPluginUrl() . '/admin/css/admin.css', array(), $this->getPlugin()->getVersion());
+ wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-global', $this->getPlugin()->getPluginUrl() . '/css/admin.css', array(), $this->getPlugin()->getVersion());
}
/**
@@ -47,7 +47,7 @@ public function admin_enqueue_scripts() {
*/
public function meta_box_render( $module, $metabox = array() ) {
if ( isset($metabox['args']['metabox']) ) {
- include($this->getPlugin()->getDirectory() . '/admin/templates/metabox/' . $metabox['args']['metabox'] . '.php');
+ $this->getPlugin()->renderView('metabox/' . $metabox['args']['metabox'], array('metabox' => $metabox));
}
}
View
4 lib/WordPressHTTPS/Module/DomainMapping.php
@@ -84,7 +84,7 @@ public function reset() {
$this->getPlugin()->setSetting('ssl_host_mapping', WordPressHTTPS::$ssl_host_mapping);
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
/**
@@ -110,7 +110,7 @@ public function save() {
}
$this->getPlugin()->setSetting('ssl_host_mapping', $ssl_host_mapping);
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
}
View
6 lib/WordPressHTTPS/Module/Network.php
@@ -94,7 +94,7 @@ public function dispatch() {
* @return void
*/
public function admin_enqueue_scripts() {
- wp_enqueue_style($this->getPlugin()->getSlug() . '-network-admin-page', $this->getPlugin()->getPluginUrl() . '/admin/css/network.css', array($this->getPlugin()->getSlug() . '-admin-page'), $this->getPlugin()->getVersion());
+ wp_enqueue_style($this->getPlugin()->getSlug() . '-network-admin-page', $this->getPlugin()->getPluginUrl() . '/css/network.css', array($this->getPlugin()->getSlug() . '-admin-page'), $this->getPlugin()->getVersion());
}
/**
@@ -104,7 +104,7 @@ public function admin_enqueue_scripts() {
* @return void
*/
public function render() {
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/network.php');
+ $this->getPlugin()->renderView('network');
}
/**
@@ -156,7 +156,7 @@ public function save() {
wp_logout();
}
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
}
View
8 lib/WordPressHTTPS/Module/Settings.php
@@ -165,7 +165,7 @@ public function ajax_metabox() {
* @return void
*/
public function admin_enqueue_scripts() {
- wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-page', $this->getPlugin()->getPluginUrl() . '/admin/css/settings.css', array(), $this->getPlugin()->getVersion());
+ wp_enqueue_style($this->getPlugin()->getSlug() . '-admin-page', $this->getPlugin()->getPluginUrl() . '/css/settings.css', array(), $this->getPlugin()->getVersion());
wp_enqueue_script('jquery-form');
wp_enqueue_script('post');
@@ -181,7 +181,7 @@ public function admin_enqueue_scripts() {
* @return void
*/
public function render() {
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/settings.php');
+ $this->getPlugin()->renderView('settings');
}
/**
@@ -204,7 +204,7 @@ public function reset() {
}
$this->getPlugin()->install();
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
/**
@@ -293,7 +293,7 @@ public function save() {
wp_logout();
}
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
}
View
4 lib/WordPressHTTPS/Module/UrlFilters.php
@@ -86,7 +86,7 @@ public function reset() {
$this->getPlugin()->setSetting('secure_filter', array());
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
/**
@@ -108,7 +108,7 @@ public function save() {
$filters = array_filter($filters); // Removes blank array items
$this->getPlugin()->setSetting('secure_filter', $filters);
- require_once($this->getPlugin()->getDirectory() . '/admin/templates/ajax_message.php');
+ $this->getPlugin()->renderView('ajax_message');
}
}
View
0 admin/templates/ajax_message.php → view/ajax_message.php
File renamed without changes.
View
4 admin/templates/metabox/ajax.php → view/metabox/ajax.php
@@ -1,6 +1,6 @@
<?php
if ( !defined('ABSPATH') ) exit;
-$nonce = wp_create_nonce($this->getPlugin()->getSlug());
+$nonce = wp_create_nonce($this->getSlug());
?><script type="text/javascript">
jQuery(document).ready(function($) {
var loading = $('<img alt="Loading..." src="<?php echo admin_url('/images/wpspin_light.gif'); ?>" class="loading" />');
@@ -9,7 +9,7 @@
$('#<?php echo $metabox['id']; ?> .handlediv .loading').fadeIn('fast');
$.post(ajaxurl, {
- action : '<?php echo $this->getPlugin()->getSlug(); ?>_ajax_metabox',
+ action : '<?php echo $this->getSlug(); ?>_ajax_metabox',
id : '<?php echo $metabox['id']; ?>',
url : '<?php echo $metabox['args']['url']; ?>',
_nonce : '<?php echo $nonce; ?>'
View
12 admin/templates/metabox/domain_mapping.php → view/metabox/domain_mapping.php
@@ -1,8 +1,8 @@
<?php
if ( !defined('ABSPATH') ) exit;
?>
-<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">
-<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<form name="<?php echo $this->getSlug(); ?>_domain_mapping_form" id="<?php echo $this->getSlug(); ?>_domain_mapping_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
+<?php wp_nonce_field($this->getSlug()); ?>
<input type="hidden" name="action" id="action" value="" />
<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>
@@ -11,7 +11,7 @@
<thead>
</thead>
<?php
- $ssl_host_mapping = ( is_array($this->getPlugin()->getSetting('ssl_host_mapping')) ? $this->getPlugin()->getSetting('ssl_host_mapping') : array() );
+ $ssl_host_mapping = ( is_array($this->getSetting('ssl_host_mapping')) ? $this->getSetting('ssl_host_mapping') : array() );
foreach( $ssl_host_mapping as $http_domain => $https_domain ) {
?>
<tr valign="top" class="domain_mapping_row">
@@ -68,12 +68,12 @@
</form>
<script type="text/javascript">
jQuery(document).ready(function($) {
- var form = $('#<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_form').first();
+ var form = $('#<?php echo $this->getSlug(); ?>_domain_mapping_form').first();
$('#domain-mapping-save').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_save');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_domain_mapping_save');
});
$('#domain-mapping-reset').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_domain_mapping_reset');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_domain_mapping_reset');
});
$(form).submit(function(e) {
e.preventDefault();
View
12 admin/templates/metabox/filters.php → view/metabox/filters.php
@@ -1,8 +1,8 @@
<?php
if ( !defined('ABSPATH') ) exit;
?>
-<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">
-<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<form name="<?php echo $this->getSlug(); ?>_filters_form" id="<?php echo $this->getSlug(); ?>_filters_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
+<?php wp_nonce_field($this->getSlug()); ?>
<input type="hidden" name="action" id="action" value="" />
<table class="form-table">
@@ -12,7 +12,7 @@
<p class="description"><?php printf( __("Example: If you have an E-commerce shop and all of the URL's begin with /store/, you could secure all store links by entering '/store/' on one line. You may use %s regular expressions %s",'wordpress-https'),'<a href="#TB_inline?height=155&width=350&inlineId=regex-help" class="thickbox" title="' . __('Regular Expressions Help','wordpress-https') . '">','</a>'); ?>.</p>
</th>
<td>
- <textarea name="secure_filter" id="secure_filter"><?php echo implode("\n", $this->getPlugin()->getSetting('secure_filter')); ?></textarea>
+ <textarea name="secure_filter" id="secure_filter"><?php echo implode("\n", $this->getSetting('secure_filter')); ?></textarea>
</td>
</tr>
</table>
@@ -26,12 +26,12 @@
<script type="text/javascript">
jQuery(document).ready(function($) {
- var form = $('#<?php echo $this->getPlugin()->getSlug(); ?>_filters_form').first();
+ var form = $('#<?php echo $this->getSlug(); ?>_filters_form').first();
$('#filters-save').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_filters_save');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_filters_save');
});
$('#filters-reset').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_filters_reset');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_filters_reset');
});
$(form).submit(function(e) {
e.preventDefault();
View
32 admin/templates/metabox/network.php → view/metabox/network.php
@@ -1,8 +1,8 @@
<?php
if ( !defined('ABSPATH') ) exit;
?>
-<form name="<?php echo $this->getPlugin()->getSlug(); ?>_network_settings_form" id="<?php echo $this->getPlugin()->getSlug(); ?>_network_settings_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
-<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<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">
+<?php wp_nonce_field($this->getSlug()); ?>
<input type="hidden" name="action" id="action" value="" />
<table id="blog-table">
@@ -23,37 +23,37 @@
global $wpdb;
$blogs = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM " . $wpdb->blogs, NULL));
foreach($blogs as $blog_id) {
- $ssl_host = ($this->getPlugin()->getSetting('ssl_host', $blog_id) != '' ? $this->getPlugin()->getSetting('ssl_host', $blog_id) : get_site_url($blog_id, '', 'https'));
+ $ssl_host = ($this->getSetting('ssl_host', $blog_id) != '' ? $this->getSetting('ssl_host', $blog_id) : get_site_url($blog_id, '', 'https'));
$ssl_host = preg_replace('/http[s]?:\/\//', '', $ssl_host);
$ssl_host = rtrim(str_replace(parse_url(get_site_url($blog_id, ''), PHP_URL_PATH), '', $ssl_host), '/');
?>
<tr>
<td class="blog-blog"><strong><?php echo preg_replace('/http[s]?:\/\//', '', get_site_url($blog_id)); ?></strong></td>
<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>
- <td class="blog-ssl_admin"><input type="hidden" name="blog[<?php echo $blog_id; ?>][ssl_admin]" value="<?php echo ((force_ssl_admin() && $this->getPlugin()->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->getPlugin()->getSetting('ssl_admin', $blog_id) ? ' checked="checked"' : ''); ?> /></td>
- <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->getPlugin()->getSetting('exclusive_https', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
- <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->getPlugin()->getSetting('remove_unsecure', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
- <td class="blog-debug"><input type="hidden" name="blog[<?php echo $blog_id; ?>][debug]" value="0" /><input name="blog[<?php echo $blog_id; ?>][debug]" type="checkbox" value="1"<?php echo (($this->getPlugin()->getSetting('debug', $blog_id)) ? ' checked="checked"' : ''); ?> /></td>
+ <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>
+ <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>
+ <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>
+ <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>
<td class="blog-proxy">
<select name="blog[<?php echo $blog_id; ?>][ssl_proxy]">
- <option value="0"<?php echo ((! $this->getPlugin()->getSetting('ssl_proxy', $blog_id)) ? ' selected="selected"' : ''); ?>><?php _e('No','wordpress-https'); ?></option>
- <option value="auto"<?php echo (($this->getPlugin()->getSetting('ssl_proxy', $blog_id) === 'auto') ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
- <option value="1"<?php echo (($this->getPlugin()->getSetting('ssl_proxy', $blog_id) == 1) ? ' selected="selected"' : ''); ?>><?php _e('Yes','wordpress-https'); ?></option>
+ <option value="0"<?php echo ((! $this->getSetting('ssl_proxy', $blog_id)) ? ' selected="selected"' : ''); ?>><?php _e('No','wordpress-https'); ?></option>
+ <option value="auto"<?php echo (($this->getSetting('ssl_proxy', $blog_id) === 'auto') ? ' selected="selected"' : ''); ?>><?php _e('Auto','wordpress-https'); ?></option>
+ <option value="1"<?php echo (($this->getSetting('ssl_proxy', $blog_id) == 1) ? ' selected="selected"' : ''); ?>><?php _e('Yes','wordpress-https'); ?></option>
</select>
</td>
<td class="blog-admin_menu">
<select name="blog[<?php echo $blog_id; ?>][admin_menu]">
- <option value="side"<?php echo (($this->getPlugin()->getSetting('admin_menu', $blog_id) === 'side') ? ' selected="selected"' : ''); ?>><?php _e('Sidebar','wordpress-https'); ?></option>
- <option value="settings"<?php echo (($this->getPlugin()->getSetting('admin_menu', $blog_id) === 'settings') ? ' selected="selected"' : ''); ?>><?php _e('Settings','wordpress-https'); ?></option>
+ <option value="side"<?php echo (($this->getSetting('admin_menu', $blog_id) === 'side') ? ' selected="selected"' : ''); ?>><?php _e('Sidebar','wordpress-https'); ?></option>
+ <option value="settings"<?php echo (($this->getSetting('admin_menu', $blog_id) === 'settings') ? ' selected="selected"' : ''); ?>><?php _e('Settings','wordpress-https'); ?></option>
</select>
</td>
</tr>
<?php
}
- $defaults = $this->getPlugin()->getSetting('network_defaults');
+ $defaults = $this->getSetting('network_defaults');
if ( sizeof($defaults) == 0 ) {
- foreach( $this->getPlugin()->getSettings() as $setting => $default ) {
+ foreach( $this->getSettings() as $setting => $default ) {
$defaults[$setting] = $default;
}
}
@@ -91,9 +91,9 @@
</form>
<script type="text/javascript">
jQuery(document).ready(function($) {
- var form = $('#<?php echo $this->getPlugin()->getSlug(); ?>_network_settings_form').first();
+ var form = $('#<?php echo $this->getSlug(); ?>_network_settings_form').first();
$('#network-settings-save').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_network_settings_save');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_network_settings_save');
});
$(form).submit(function(e) {
e.preventDefault();
View
2 admin/templates/metabox/post.php → view/metabox/post.php
@@ -16,7 +16,7 @@
}
}
-wp_nonce_field($this->getPlugin()->getSlug(), $this->getPlugin()->getSlug());
+wp_nonce_field($this->getSlug(), $this->getSlug());
?>
<div class="misc-pub-section">
View
44 admin/templates/metabox/settings.php → view/metabox/settings.php
@@ -3,15 +3,15 @@
if ( !defined('ABSPATH') ) exit;
$count = 1; // Used to restrict str_replace count
-$ssl_host = clone $this->getPlugin()->getHttpsUrl();
+$ssl_host = clone $this->getHttpsUrl();
$ssl_host = $ssl_host->setScheme('')->toString();
-if ( $this->getPlugin()->getHttpUrl()->getPath() != '/' ) {
- $ssl_host = str_replace($this->getPlugin()->getHttpUrl()->getPath(), '', $ssl_host, $count);
+if ( $this->getHttpUrl()->getPath() != '/' ) {
+ $ssl_host = str_replace($this->getHttpUrl()->getPath(), '', $ssl_host, $count);
}
$ssl_host = rtrim($ssl_host, '/');
?>
-<form name="<?php echo $this->getPlugin()->getSlug(); ?>_settings_form" id="<?php echo $this->getPlugin()->getSlug(); ?>_settings_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
-<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<form name="<?php echo $this->getSlug(); ?>_settings_form" id="<?php echo $this->getSlug(); ?>_settings_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
+<?php wp_nonce_field($this->getSlug()); ?>
<input type="hidden" name="action" id="action" value="" />
<table class="form-table">
@@ -30,8 +30,8 @@
<td>
<fieldset>
<label for="ssl_admin">
- <input type="hidden" name="ssl_admin" value="<?php echo ((force_ssl_admin() && $this->getPlugin()->getSetting('ssl_admin') == 1) ? 1 : 0); ?>" />
- <input name="ssl_admin" type="checkbox" id="ssl_admin" value="1"<?php echo ((force_ssl_admin()) ? ' checked="checked" disabled="disabled" title="FORCE_SSL_ADMIN is true in wp-config.php"' : (($this->getPlugin()->getSetting('ssl_admin')) ? ' checked="checked"' : '') ); ?> />
+ <input type="hidden" name="ssl_admin" value="<?php echo ((force_ssl_admin() && $this->getSetting('ssl_admin') == 1) ? 1 : 0); ?>" />
+ <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"' : '') ); ?> />
<p class="description"><?php printf( __('Always use HTTPS while in the admin panel. This setting is identical to %s FORCE_SSL_ADMIN','wordpress-https'),'<a href="http://codex.wordpress.org/Administration_Over_SSL#Example_2" target="_blank">'); ?></a>.</p>
</label>
</fieldset>
@@ -43,8 +43,8 @@
<fieldset>
<label for="exclusive_https">
<input type="hidden" name="exclusive_https" value="0" />
- <input name="exclusive_https" type="checkbox" id="exclusive_https" value="1"<?php echo (($this->getPlugin()->getSetting('exclusive_https')) ? ' checked="checked"' : ''); ?> />
- <p class="description"><?php printf( __('Any page that is not secured via %s Force SSL %s or URL Filters will be redirected to HTTP.','wordpress-https'),'<a href="' . parse_url($this->getPlugin()->getPluginUrl(), PHP_URL_PATH) . '/screenshot-2.png" class="thickbox">', '</a> '); ?></a></p>
+ <input name="exclusive_https" type="checkbox" id="exclusive_https" value="1"<?php echo (($this->getSetting('exclusive_https')) ? ' checked="checked"' : ''); ?> />
+ <p class="description"><?php printf( __('Any page that is not secured via %s Force SSL %s or URL Filters will be redirected to HTTP.','wordpress-https'),'<a href="' . parse_url($this->getPluginUrl(), PHP_URL_PATH) . '/screenshot-2.png" class="thickbox">', '</a> '); ?></a></p>
</label>
</fieldset>
</td>
@@ -55,7 +55,7 @@
<fieldset>
<label for="remove_unsecure">
<input type="hidden" name="remove_unsecure" value="0" />
- <input name="remove_unsecure" type="checkbox" id="remove_unsecure" value="1"<?php echo (($this->getPlugin()->getSetting('remove_unsecure')) ? ' checked="checked"' : ''); ?> />
+ <input name="remove_unsecure" type="checkbox" id="remove_unsecure" value="1"<?php echo (($this->getSetting('remove_unsecure')) ? ' checked="checked"' : ''); ?> />
<p class="description"><?php _e('Remove elements inaccessible over HTTPS. May break other plugins\' functionality.','wordpress-https'); ?></p>
</label>
</fieldset>
@@ -67,7 +67,7 @@
<fieldset>
<label for="debug">
<input type="hidden" name="debug" value="0" />
- <input name="debug" type="checkbox" id="debug" value="1"<?php echo (($this->getPlugin()->getSetting('debug')) ? ' checked="checked"' : ''); ?> />
+ <input name="debug" type="checkbox" id="debug" value="1"<?php echo (($this->getSetting('debug')) ? ' checked="checked"' : ''); ?> />
<p class="description"><?php _e('Outputs debug information to the browser\'s console.','wordpress-https'); ?></p>
</label>
</fieldset>
@@ -78,9 +78,9 @@
<td>
<fieldset>
<label for="ssl_proxy" class="label-radio">
- <input type="radio" name="ssl_proxy" value="0"<?php echo ((! $this->getPlugin()->getSetting('ssl_proxy')) ? ' checked="checked"' : ''); ?>> <span><?php _e('No','wordpress-https'); ?></span>
- <input type="radio" name="ssl_proxy" value="auto"<?php echo (($this->getPlugin()->getSetting('ssl_proxy') === 'auto') ? ' checked="checked"' : ''); ?>> <span><?php _e('Auto','wordpress-https'); ?></span>
- <input type="radio" name="ssl_proxy" value="1"<?php echo (($this->getPlugin()->getSetting('ssl_proxy') == 1) ? ' checked="checked"' : ''); ?>> <span><?php _e('Yes','wordpress-https'); ?></span>
+ <input type="radio" name="ssl_proxy" value="0"<?php echo ((! $this->getSetting('ssl_proxy')) ? ' checked="checked"' : ''); ?>> <span><?php _e('No','wordpress-https'); ?></span>
+ <input type="radio" name="ssl_proxy" value="auto"<?php echo (($this->getSetting('ssl_proxy') === 'auto') ? ' checked="checked"' : ''); ?>> <span><?php _e('Auto','wordpress-https'); ?></span>
+ <input type="radio" name="ssl_proxy" value="1"<?php echo (($this->getSetting('ssl_proxy') == 1) ? ' checked="checked"' : ''); ?>> <span><?php _e('Yes','wordpress-https'); ?></span>
</label>
<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>
</fieldset>
@@ -91,18 +91,18 @@
<td>
<fieldset>
<label for="admin_menu_side" class="label-radio">
- <input type="radio" name="admin_menu" id="admin_menu_side" value="side"<?php echo (($this->getPlugin()->getSetting('admin_menu') === 'side') ? ' checked="checked"' : ''); ?>> <span><?php _e('Sidebar','wordpress-https'); ?></span>
+ <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>
</label>
<label for="admin_menu_settings" class="label-radio">
- <input type="radio" name="admin_menu" id="admin_menu_settings" value="settings"<?php echo (($this->getPlugin()->getSetting('admin_menu') === 'settings') ? ' checked="checked"' : ''); ?>> <span><?php _e('Settings','wordpress-https'); ?></span>
+ <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>
</label>
</fieldset>
</td>
</tr>
</table>
-<input type="hidden" name="ssl_host_subdomain" value="<?php echo (($this->getPlugin()->getSetting('ssl_host_subdomain') != 1) ? 0 : 1); ?>" />
-<input type="hidden" name="ssl_host_diff" value="<?php echo (($this->getPlugin()->getSetting('ssl_host_diff') != 1) ? 0 : 1); ?>" />
+<input type="hidden" name="ssl_host_subdomain" value="<?php echo (($this->getSetting('ssl_host_subdomain') != 1) ? 0 : 1); ?>" />
+<input type="hidden" name="ssl_host_diff" value="<?php echo (($this->getSetting('ssl_host_diff') != 1) ? 0 : 1); ?>" />
<p class="button-controls">
<input type="submit" name="settings-save" value="<?php _e('Save Changes','wordpress-https'); ?>" class="button-primary" id="settings-save" />
@@ -112,12 +112,12 @@
</form>
<script type="text/javascript">
jQuery(document).ready(function($) {
- var form = $('#<?php echo $this->getPlugin()->getSlug(); ?>_settings_form').first();
+ var form = $('#<?php echo $this->getSlug(); ?>_settings_form').first();
$('#settings-save').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_settings_save');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_settings_save');
});
$('#settings-reset').click(function() {
- $(form).find('input[name="action"]').val('<?php echo $this->getPlugin()->getSlug(); ?>_settings_reset');
+ $(form).find('input[name="action"]').val('<?php echo $this->getSlug(); ?>_settings_reset');
});
$(form).submit(function(e) {
e.preventDefault();
@@ -130,7 +130,7 @@
/*.ajaxForm({
success: function(responseText, textStatus, XMLHttpRequest) {
- $('#<?php echo $this->getPlugin()->getSlug(); ?>_settings_form .submit-waiting').hide();
+ $('#<?php echo $this->getSlug(); ?>_settings_form .submit-waiting').hide();
$('#message-body').html(responseText).fadeOut(0).fadeIn().delay(5000).fadeOut();
}
});*/
View
2 admin/templates/network.php → view/network.php
@@ -15,7 +15,7 @@
?>
<div id="poststuff" class="columns metabox-holder">
<div class="postbox-container">
-<?php do_meta_boxes('toplevel_page_' . $this->getPlugin()->getSlug() . '_network', 'main', $this); ?>
+<?php do_meta_boxes('toplevel_page_' . $this->getSlug() . '_network', 'main', $this); ?>
</div>
</div>
</div>
View
4 admin/templates/settings.php → view/settings.php
@@ -15,10 +15,10 @@
?>
<div id="poststuff" class="columns metabox-holder">
<div class="postbox-container column-primary">
-<?php do_meta_boxes('toplevel_page_' . $this->getPlugin()->getSlug(), 'main', $this); ?>
+<?php do_meta_boxes('toplevel_page_' . $this->getSlug(), 'main', $this); ?>
</div>
<div class="postbox-container column-secondary">
-<?php do_meta_boxes('toplevel_page_' . $this->getPlugin()->getSlug(), 'side', $this); ?>
+<?php do_meta_boxes('toplevel_page_' . $this->getSlug(), 'side', $this); ?>
</div>
</div>
View
3 wordpress-https.php
@@ -30,7 +30,7 @@
if ( !defined('ABSPATH') ) exit;
-load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
+load_plugin_textdomain( 'wordpress-https', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
function wphttps_autoloader($class) {
$namespaces = array(
@@ -58,6 +58,7 @@ function wphttps_autoloader($class) {
$wordpress_https->setLogger(WordPressHTTPS_Logger::getInstance());
$wordpress_https->setDirectory(dirname(__FILE__));
$wordpress_https->setModuleDirectory(dirname(__FILE__) . '/lib/WordPressHTTPS/Module/');
+ $wordpress_https->setViewDirectory(dirname(__FILE__) . '/view/');
// Load Modules
$wordpress_https->loadModules();

0 comments on commit 0e9139a

Please sign in to comment.
Something went wrong with that request. Please try again.