diff --git a/README.md b/README.md
index d3a8a5b..e50253f 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,10 @@ Please do not contact me with questions like this. If you cannot be descriptive
## Changelog
+### 3.6.4
+* Fixed denial redirects. [Issue #28](https://github.com/JayWood/content-warning-v3/issues/28)
+* Passified all PHPcs complaints
+
### 3.6.3
* Category fix, fixes [#18](https://github.com/JayWood/content-warning-v3/issues/18)
* Alphabetize method names, because why not!?
diff --git a/class/admin.class.php b/class/admin.class.php
index 81161d9..6c1ee1b 100644
--- a/class/admin.class.php
+++ b/class/admin.class.php
@@ -2,7 +2,7 @@
class CWV3Admin {
- function hooks(){
+ function hooks() {
// Post Meta Box for this.
add_action( 'add_meta_boxes', array( $this, 'cw_meta' ) );
add_action( 'save_post', array( $this, 'cwv3_meta_save' ) );
@@ -27,13 +27,13 @@ class CWV3Admin {
$sw = get_option( 'cwv3_sitewide' );
switch ( $col ) {
- case 'cwv2':
- if ( 'yes' == get_post_meta( $post->ID, 'cwv3_auth', true ) || 'enabled' == $sw[0] ) {
- echo 'Yes';
- }else {
- echo 'No';
- }
- break;
+ case 'cwv2':
+ if ( 'yes' == get_post_meta( $post->ID, 'cwv3_auth', true ) || 'enabled' == $sw[0] ) {
+ echo 'Yes';
+ } else {
+ echo 'No';
+ }
+ break;
}
}
@@ -59,8 +59,8 @@ class CWV3Admin {
public function cwv3_meta_save( $post_id ) {
// check isset before access (edit by @jgraup)
- if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ){
- if ( ! current_user_can( 'edit_page', $post_id ) ){
+ if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) {
+ if ( ! current_user_can( 'edit_page', $post_id ) ) {
return;
} else {
if ( ! current_user_can( 'edit_post', $post_id ) ) { return; }
@@ -70,7 +70,7 @@ class CWV3Admin {
}
// check isset before access (edit by @jgraup)
- if ( isset( $_POST['cwv3_auth'] ) ){
+ if ( isset( $_POST['cwv3_auth'] ) ) {
$mydata = sanitize_text_field( $_POST['cwv3_auth'] );
update_post_meta( $post_id, 'cwv3_auth', $mydata );
}
@@ -80,7 +80,7 @@ class CWV3Admin {
wp_nonce_field( plugin_basename( __FILE__ ), 'cwv3_meta' );
$curval = get_post_meta( $post->ID, 'cwv3_auth', true );
$sw = get_option( 'cwv3_sitewide' );
- $disabled = $sw[0] == 'enabled' ? true : false;
+ $disabled = 'enabled' == $sw[0] ? true : false;
?>
diff --git a/content-warning-v3.php b/content-warning-v3.php
index 4e27fe7..6b5ebf1 100644
--- a/content-warning-v3.php
+++ b/content-warning-v3.php
@@ -4,15 +4,15 @@ Plugin Name: Content Warning v2
Plugin URI: http://plugish.com/plugins/content-warning-v3
Description: A plugin based on my v2 code, while drastically deviating from the original. Used mainly for NSFW websites, this plugin provides a dialog popup to warn viewers of it's possible content.
Author: Jerry Wood Jr.
-Version: 3.6.3
+Version: 3.6.4
Author URI: http://plugish.com
Text Domain: cwv3
*/
require_once dirname( __FILE__ ) . '/inc/api.php';
-if ( is_admin() ){
+if ( is_admin() ) {
require_once dirname( __FILE__ ) . '/inc/options.inc.php';
- if ( ! class_exists( 'JW_SIMPLE_OPTIONS' ) ){
+ if ( ! class_exists( 'JW_SIMPLE_OPTIONS' ) ) {
require_once dirname( __FILE__ ) . '/lib/jw_simple_options/simple_options.php';
}
require_once dirname( __FILE__ ) . '/class/admin.class.php';
@@ -24,7 +24,7 @@ if ( is_admin() ){
}
add_action( 'plugins_loaded', 'jw_cwv3_load_text_domain' );
-function jw_cwv3_load_text_domain(){
+function jw_cwv3_load_text_domain() {
load_plugin_textdomain( 'cwv3', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
}
diff --git a/readme.txt b/readme.txt
index f26f3da..9942fbd 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: warning, message, lading page, front page, enter page, adult content, consent, age verification, validation
Requires at least: 3.5
Tested up to: 4.0
-Stable tag: 3.6.3
+Stable tag: 3.6.4
A plugin that provides a warning box with a ton more options completely re-written from the ground up.
== Description ==
@@ -81,6 +81,10 @@ Please do not contact me with questions like this. If you cannot be descriptive
== Changelog ==
+= 3.6.4 =
+* Fixed denial redirects. [Issue #28](https://github.com/JayWood/content-warning-v3/issues/28)
+* Passified all PHPcs complaints
+
= 3.6.3 =
* Category fix, fixes [#18](https://github.com/JayWood/content-warning-v3/issues/18)
* Alphabetize method names, because why not!?