WP-CopyProtect [Protect your blog posts] - Version 3.1.0

Version Description

Download this release

Release Info

Developer cchetanonline
Plugin Icon wp plugin WP-CopyProtect [Protect your blog posts]
Version 3.1.0
Comparing to
See all releases

Code changes from version 3.0.0 to 3.1.0

Files changed (3) hide show
  1. readme.txt +4 -2
  2. screenshot-1.png +0 -0
  3. wp-copyprotect.php +8 -8
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://chetangole.com/blog/wp-copyprotect/#donate
4
  Tags: post, posts, copy, protect, right, click, disable, copyprotect, Google, SEO, page, plugin, access, content, javascript, security, wp-copyprotect, RSS, fetcher, duplicate, Bing,
5
  Requires at least: 2
6
  Tested up to: 4.2
7
- Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -54,7 +54,9 @@ Catch me on [Wp-CopyProtect Homepage](http://chetangole.com/blog/wp-copyprotect/
54
  == Screenshots ==
55
  1. Configuration page
56
 
57
- == Changelog ==
 
 
58
  = ver : 3.0.0 =
59
  1. Added user specific setting, now you can disable WP Copy Protect for admin/logged-in users.
60
  2. Moved menu to top level.
4
  Tags: post, posts, copy, protect, right, click, disable, copyprotect, Google, SEO, page, plugin, access, content, javascript, security, wp-copyprotect, RSS, fetcher, duplicate, Bing,
5
  Requires at least: 2
6
  Tested up to: 4.2
7
+ Stable tag: 3.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
54
  == Screenshots ==
55
  1. Configuration page
56
 
57
+ == Changelog ==
58
+ = ver : 3.1.0 =
59
+ 1. Sanitising user input for protection. Avoiding XSS attacks. Reference: https://codex.wordpress.org/Function_Reference/sanitize_text_field
60
  = ver : 3.0.0 =
61
  1. Added user specific setting, now you can disable WP Copy Protect for admin/logged-in users.
62
  2. Moved menu to top level.
screenshot-1.png CHANGED
Binary file
wp-copyprotect.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: WP-CopyProtect [Protect your blog posts]
4
  Plugin URI: http://chetangole.com/blog/wp-copyprotect/
5
  Description: This plug-in will protect your blog content [posts] from being copied. A simple plug-in developed to stop the Copy cats.
6
- Version: 3.0.0
7
  Author: Chetan Gole
8
  Author URI: http://chetangole.com/
9
  */
10
 
11
  /*
12
- Copyright (C) 2012 Chetan Gole - chetangole.com
13
 
14
  This program is free software; you can redistribute it and/or
15
  modify it under the terms of the GNU General Public License
@@ -33,7 +33,7 @@ function CopyProtect_no_right_click($CopyProtect_click_message)
33
  <script type="text/javascript">
34
  <!--
35
  /******************************************************************************
36
- *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 3.0.0 ****
37
  ******************************************************************************/
38
  var message="<?php echo $CopyProtect_click_message; ?>";
39
  function clickIE4(){
@@ -72,7 +72,7 @@ function CopyProtect_no_right_click_without_message()
72
  <script type="text/javascript">
73
  <!--
74
  /******************************************************************************
75
- *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 3.0.0 ****
76
  ******************************************************************************/
77
  function clickIE4(){
78
  if (event.button==2){
@@ -107,7 +107,7 @@ function CopyProtect_no_select()
107
  ?>
108
  <script type="text/javascript">
109
  /******************************************************************************
110
- *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 3.0.0 ****
111
  ******************************************************************************/
112
  function disableSelection(target){
113
  if (typeof target.onselectstart!="undefined") //For IE
@@ -133,7 +133,7 @@ disableSelection(document.body)
133
  function CopyProtectCredit()
134
  {
135
  ?>
136
- <small>Copy Protected by <a href="http://chetangole.com/" target="_blank">Chetan</a>s <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-Copyprotect</a>.</small>
137
  <?php
138
  }
139
  // Tuning your WP-CopyProtect - The settings page
@@ -147,11 +147,11 @@ function CopyProtect_options_page()
147
  if($_POST['CopyProtect_save']){
148
  update_option('CopyProtect_nrc',$_POST['CopyProtect_nrc']);
149
  update_option('CopyProtect_nts',$_POST['CopyProtect_nts']);
150
- update_option('CopyProtect_nrc_text',$_POST['CopyProtect_nrc_text']);
151
  update_option('CopyProtect_credit',$_POST['CopyProtect_credit']);
152
  update_option('CopyProtect_user_setting',$_POST['CopyProtect_user_setting']);
153
 
154
- echo '<div class="updated"><p>Settings saved</p></div>';
155
  }
156
  $wp_CopyProtect_nrc = get_option('CopyProtect_nrc');
157
  $wp_CopyProtect_nts = get_option('CopyProtect_nts');
3
  Plugin Name: WP-CopyProtect [Protect your blog posts]
4
  Plugin URI: http://chetangole.com/blog/wp-copyprotect/
5
  Description: This plug-in will protect your blog content [posts] from being copied. A simple plug-in developed to stop the Copy cats.
6
+ Version: 3.1.0
7
  Author: Chetan Gole
8
  Author URI: http://chetangole.com/
9
  */
10
 
11
  /*
12
+ Copyright (C) 2015 Chetan Gole - chetangole.com
13
 
14
  This program is free software; you can redistribute it and/or
15
  modify it under the terms of the GNU General Public License
33
  <script type="text/javascript">
34
  <!--
35
  /******************************************************************************
36
+ *** COPY PROTECTED BY http://chetangole.com/blog/wp-copyprotect/ version 3.1.0 ****
37
  ******************************************************************************/
38
  var message="<?php echo $CopyProtect_click_message; ?>";
39
  function clickIE4(){
72
  <script type="text/javascript">
73
  <!--
74
  /******************************************************************************
75
+ *** COPY PROTECTED BY http://chetangole.com/blog/wp-copyprotect/ version 3.1.0 ****
76
  ******************************************************************************/
77
  function clickIE4(){
78
  if (event.button==2){
107
  ?>
108
  <script type="text/javascript">
109
  /******************************************************************************
110
+ *** COPY PROTECTED BY http://chetangole.com/blog/wp-copyprotect/ version 3.1.0 ****
111
  ******************************************************************************/
112
  function disableSelection(target){
113
  if (typeof target.onselectstart!="undefined") //For IE
133
  function CopyProtectCredit()
134
  {
135
  ?>
136
+ <small>Copy Protected by <a href="http://chetangole.com/" target="_blank">Chetan</a>'s <a href="http://chetangole.com/blog/wp-copyprotect/" target="_blank">WP-Copyprotect</a>.</small>
137
  <?php
138
  }
139
  // Tuning your WP-CopyProtect - The settings page
147
  if($_POST['CopyProtect_save']){
148
  update_option('CopyProtect_nrc',$_POST['CopyProtect_nrc']);
149
  update_option('CopyProtect_nts',$_POST['CopyProtect_nts']);
150
+ update_option('CopyProtect_nrc_text', sanitize_text_field($_POST['CopyProtect_nrc_text']));
151
  update_option('CopyProtect_credit',$_POST['CopyProtect_credit']);
152
  update_option('CopyProtect_user_setting',$_POST['CopyProtect_user_setting']);
153
 
154
+ echo '<div class="updated"><p>Settings saved, Please clear/update cache if you are using any cache plugin</p></div>';
155
  }
156
  $wp_CopyProtect_nrc = get_option('CopyProtect_nrc');
157
  $wp_CopyProtect_nts = get_option('CopyProtect_nts');