Permalink
Browse files

Changed metaboxes to use wp_nonce_field rather than settings_fields.

  • Loading branch information...
1 parent 617d8b6 commit b098dbc834bb850ba0bf1ecf5c1e3be7fc8b97a0 @mvied committed Feb 5, 2013
@@ -1,5 +1,6 @@
<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 settings_fields($this->getPlugin()->getSlug()); ?>
+<?php wp_nonce_field($this->getPlugin()->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>
@@ -1,5 +1,7 @@
<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 settings_fields($this->getPlugin()->getSlug()); ?>
+<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<input type="hidden" name="action" id="action" value="" />
+
<table class="form-table">
<tr valign="top" id="secure_filter_row">
<th scope="row">
@@ -1,5 +1,6 @@
<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 settings_fields($this->getPlugin()->getSlug()); ?>
+<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<input type="hidden" name="action" id="action" value="" />
<table id="blog-table">
<thead>
@@ -8,7 +8,8 @@
$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 settings_fields($this->getPlugin()->getSlug()); ?>
+<?php wp_nonce_field($this->getPlugin()->getSlug()); ?>
+<input type="hidden" name="action" id="action" value="" />
<table class="form-table">
<tr valign="top" id="ssl_host_row">
@@ -74,7 +74,7 @@ public function add_meta_boxes() {
* @return void
*/
public function reset() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}
@@ -94,7 +94,7 @@ public function reset() {
* @return void
*/
public function save() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}
@@ -114,7 +114,7 @@ public function render() {
* @return void
*/
public function save() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}
@@ -191,7 +191,7 @@ public function render() {
* @return void
*/
public function reset() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}
@@ -214,7 +214,7 @@ public function reset() {
* @return void
*/
public function save() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}
@@ -76,7 +76,7 @@ public function add_meta_boxes() {
* @return void
*/
public function reset() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}
@@ -96,7 +96,7 @@ public function reset() {
* @return void
*/
public function save() {
- if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug() . '-options') ) {
+ if ( !wp_verify_nonce($_POST['_wpnonce'], $this->getPlugin()->getSlug()) ) {
return false;
}

0 comments on commit b098dbc

Please sign in to comment.