Version Description
Download this release
Release Info
Developer | wp-buy |
Plugin | WP Content Copy Protection & No Right Click |
Version | 1.0 |
Comparing to | |
See all releases |
Version 1.0
- admin-core.php +203 -0
- images/logo.png +0 -0
- preventer-index.php +166 -0
- readme.txt +40 -0
- screenshot-1.png +0 -0
- the_globals.php +4 -0
admin-core.php
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//define all variables the needed alot
|
3 |
+
include 'the_globals.php';
|
4 |
+
if($_POST["action"] == 'update')
|
5 |
+
{
|
6 |
+
//----------------------------------------------------list the options array values
|
7 |
+
$single_posts_protection = $_POST["single_posts_protection"];
|
8 |
+
$right_click_by_mouse_protection = $_POST["right_click_by_mouse_protection"];
|
9 |
+
$css_protection = $_POST["css_protection"];
|
10 |
+
$home_page_protection = $_POST["home_page_protection"];
|
11 |
+
$show_protection_info = $_POST["show_protection_info"];
|
12 |
+
//----------------------------------------------------Get the options array values
|
13 |
+
$wccp_settings =
|
14 |
+
Array (
|
15 |
+
'single_posts_protection' => $single_posts_protection, // prevent content copy, take 2 parameters
|
16 |
+
'right_click_by_mouse_protection' => $right_click_by_mouse_protection, // Prevent Right Click By Mouse
|
17 |
+
'css_protection' => $css_protection, // PROTECTION BY CSS TECHNIQUES
|
18 |
+
'home_page_protection' => $home_page_protection, // PROTECT THE HOME PAGE OR NOT
|
19 |
+
'show_protection_info' => $show_protection_info // about the plugin
|
20 |
+
);
|
21 |
+
if ($wccp_settings != '' ) {
|
22 |
+
update_option( 'wccp_settings' , $wccp_settings );
|
23 |
+
} else {
|
24 |
+
$deprecated = ' ';
|
25 |
+
$autoload = 'no';
|
26 |
+
add_option( 'wccp_settings', $wccp_settings, $deprecated, $autoload );
|
27 |
+
}
|
28 |
+
}else //no update action
|
29 |
+
{
|
30 |
+
$wccp_settings = wccp_read_options();
|
31 |
+
}
|
32 |
+
|
33 |
+
?>
|
34 |
+
<style>
|
35 |
+
#aio_admin_main {
|
36 |
+
text-align:left;
|
37 |
+
direction:ltr;
|
38 |
+
padding:10px;
|
39 |
+
margin: 10px;
|
40 |
+
background-color: #ffffff;
|
41 |
+
border:1px solid #EBDDE2;
|
42 |
+
display: relative;
|
43 |
+
overflow: auto;
|
44 |
+
}
|
45 |
+
.inner_block{
|
46 |
+
height: 370px;
|
47 |
+
display: inline;
|
48 |
+
min-width:770px;
|
49 |
+
}
|
50 |
+
#donate{
|
51 |
+
background-color: #EEFFEE;
|
52 |
+
border: 1px solid #66DD66;
|
53 |
+
border-radius: 10px 10px 10px 10px;
|
54 |
+
height: 58px;
|
55 |
+
padding: 10px;
|
56 |
+
margin: 15px;
|
57 |
+
}
|
58 |
+
</style>
|
59 |
+
<div id="donate">
|
60 |
+
<table border="0" width="100%" cellspacing="0" cellpadding="0" dir="ltr" height="88">
|
61 |
+
<tr>
|
62 |
+
<td align="center"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
63 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
64 |
+
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
|
65 |
+
">
|
66 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
67 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
68 |
+
</form></td>
|
69 |
+
<td>This plugin has cost me countless hours of work, if you use it,
|
70 |
+
please donate a token of your appreciation!</td>
|
71 |
+
</tr>
|
72 |
+
</table>
|
73 |
+
<div style="width: 6px; height: 0px"></div></div>
|
74 |
+
<div id="aio_admin_main">
|
75 |
+
<form method="POST">
|
76 |
+
<input type="hidden" value="update" name="action">
|
77 |
+
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
78 |
+
<tr>
|
79 |
+
<td width="77%">
|
80 |
+
|
81 |
+
<div class="inner_block">
|
82 |
+
<h2>WP Content Copy Protection:</h2>
|
83 |
+
<p>This wp plugin protect the posts content from being copied by any other
|
84 |
+
web site author , you dont want your content to spread without your
|
85 |
+
permission!!</p>
|
86 |
+
<p><?php echo "<img style='float:right;' src='$pluginsurl/images/logo.png' align='center' />";?></p>
|
87 |
+
<table border="0" width="100%" cellspacing="0" cellpadding="0">
|
88 |
+
<tr>
|
89 |
+
<td width="60%">
|
90 |
+
<div><font color="#C47500"><b>Change Options as You Like:</b></font></div>
|
91 |
+
<div style="width: 603px; height: 284px; float: left; border: 1px solid #E9E9E9; padding: 4px" id="layer3">
|
92 |
+
<table border="0" width="100%" height="270" cellspacing="0" cellpadding="0">
|
93 |
+
<tr>
|
94 |
+
<td width="221"><b>Posts</b> Protection</td>
|
95 |
+
<td>
|
96 |
+
<select size="1" name="single_posts_protection">
|
97 |
+
<?php
|
98 |
+
if ($wccp_settings['single_posts_protection'] == 'Enabled')
|
99 |
+
{
|
100 |
+
echo '<option selected>Enabled</option>';
|
101 |
+
echo '<option>Disabled</option>';
|
102 |
+
}
|
103 |
+
else
|
104 |
+
{
|
105 |
+
echo '<option>Enabled</option>';
|
106 |
+
echo '<option selected>Disabled</option>';
|
107 |
+
}
|
108 |
+
?>
|
109 |
+
</select>
|
110 |
+
</td>
|
111 |
+
<td width="212">
|
112 |
+
<p align="center"><font color="#008000">For single posts content</font></td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td width="221"><b>Right click </b>(by mouse) Protection</td>
|
116 |
+
<td><select size="1" name="right_click_by_mouse_protection">
|
117 |
+
<?php
|
118 |
+
if ($wccp_settings['right_click_by_mouse_protection'] == 'Enabled')
|
119 |
+
{
|
120 |
+
echo '<option selected>Enabled</option>';
|
121 |
+
echo '<option>Disabled</option>';
|
122 |
+
}
|
123 |
+
else
|
124 |
+
{
|
125 |
+
echo '<option>Enabled</option>';
|
126 |
+
echo '<option selected>Disabled</option>';
|
127 |
+
}
|
128 |
+
?>
|
129 |
+
</select></td>
|
130 |
+
<td width="212">
|
131 |
+
<p align="center"><font color="#008000">disallow right mouse
|
132 |
+
click to prevent saving images</font></td>
|
133 |
+
</tr>
|
134 |
+
<tr>
|
135 |
+
<td width="221">Protection by <b>CSS</b></td>
|
136 |
+
<td>
|
137 |
+
<select size="1" name="css_protection">
|
138 |
+
<?php
|
139 |
+
if ($wccp_settings['css_protection'] == 'Enabled')
|
140 |
+
{
|
141 |
+
echo '<option selected>Enabled</option>';
|
142 |
+
echo '<option>Disabled</option>';
|
143 |
+
}
|
144 |
+
else
|
145 |
+
{
|
146 |
+
echo '<option>Enabled</option>';
|
147 |
+
echo '<option selected>Disabled</option>';
|
148 |
+
}
|
149 |
+
?>
|
150 |
+
</select>
|
151 |
+
</td>
|
152 |
+
<td width="212">
|
153 |
+
<p align="center"><font color="#008000">Using CSS special code
|
154 |
+
to protect the content without JavaScript</font></td>
|
155 |
+
</tr>
|
156 |
+
<tr>
|
157 |
+
<td width="221"><b>Home Page</b> Protection</td>
|
158 |
+
<td>
|
159 |
+
<select size="1" name="home_page_protection">
|
160 |
+
<?php
|
161 |
+
if ($wccp_settings['home_page_protection'] == 'Enabled')
|
162 |
+
{
|
163 |
+
echo '<option selected>Enabled</option>';
|
164 |
+
echo '<option>Disabled</option>';
|
165 |
+
}
|
166 |
+
else
|
167 |
+
{
|
168 |
+
echo '<option>Enabled</option>';
|
169 |
+
echo '<option selected>Disabled</option>';
|
170 |
+
}
|
171 |
+
?>
|
172 |
+
</select>
|
173 |
+
</td>
|
174 |
+
<td width="212">
|
175 |
+
<p align="center"><font color="#008000">Dont copy any thing!
|
176 |
+
even from my homepage</font></td>
|
177 |
+
</tr>
|
178 |
+
<tr>
|
179 |
+
<td width="221"> </td>
|
180 |
+
<td>
|
181 |
+
</td>
|
182 |
+
<td width="212"> </td>
|
183 |
+
</tr>
|
184 |
+
</table></div>
|
185 |
+
|
186 |
+
<p> </td>
|
187 |
+
</tr>
|
188 |
+
</table>
|
189 |
+
|
190 |
+
<p align="left">
|
191 |
+
<input type="submit" value=" Save Settings " name="B4" style="width: 193; height: 29;">
|
192 |
+
</p>
|
193 |
+
|
194 |
+
<p> </p>
|
195 |
+
</div>
|
196 |
+
</td>
|
197 |
+
</tr>
|
198 |
+
</table>
|
199 |
+
|
200 |
+
<p>
|
201 |
+
</li></p>
|
202 |
+
</form></div>
|
203 |
+
<p> </p>
|
images/logo.png
ADDED
Binary file
|
preventer-index.php
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php ob_start();
|
2 |
+
/*
|
3 |
+
Plugin Name: WP Content Copy Protection
|
4 |
+
Plugin URI: http://www.wp-buy.com/
|
5 |
+
Description: This wp plugin protect the posts content from being copied by any other web site author , you dont want your content to spread without your permission!!
|
6 |
+
Version: 1.2
|
7 |
+
Author: wp-buy.com
|
8 |
+
Author URI: http://www.wp-buy.com/
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<?php
|
12 |
+
//define all variables the needed alot
|
13 |
+
include 'the_globals.php';
|
14 |
+
$wccp_settings = wccp_read_options();
|
15 |
+
//------------------------------------------------------------------------
|
16 |
+
function wccp_header()
|
17 |
+
{
|
18 |
+
global $wccp_settings;
|
19 |
+
if ($wccp_settings['css_protection'] == 'Enabled') {
|
20 |
+
?>
|
21 |
+
<style>
|
22 |
+
.unselectable
|
23 |
+
{
|
24 |
+
-moz-user-select:none;
|
25 |
+
-webkit-user-select:none;
|
26 |
+
}
|
27 |
+
</style>
|
28 |
+
<script type="text/javascript">
|
29 |
+
var e = document.getElementsByTagName('body')[0];
|
30 |
+
e.setAttribute('unselectable',on);
|
31 |
+
</script>
|
32 |
+
<?php }
|
33 |
+
if ( (is_home() && $wccp_settings['home_page_protection'] == 'Enabled') || (is_single() && $wccp_settings['single_posts_protection'] == 'Enabled') )
|
34 |
+
{
|
35 |
+
?>
|
36 |
+
<script type="text/javascript">
|
37 |
+
function disable_copy(hotkey)
|
38 |
+
{
|
39 |
+
if(!hotkey) var hotkey = document.body;
|
40 |
+
if (typeof hotkey.onselectstart!="undefined") //For IE
|
41 |
+
hotkey.onselectstart=function(){return false}
|
42 |
+
else if (typeof hotkey.style.MozUserSelect!="undefined") //For Firefox
|
43 |
+
hotkey.style.MozUserSelect="none"
|
44 |
+
else //Opera
|
45 |
+
hotkey.onmousedown=function(){return false}
|
46 |
+
hotkey.style.cursor = "default"
|
47 |
+
}
|
48 |
+
|
49 |
+
function disableEnterKey(e)
|
50 |
+
{
|
51 |
+
if (!e) var e = window.event;
|
52 |
+
if (e.ctrlKey){
|
53 |
+
alert('content is protected!');
|
54 |
+
var key;
|
55 |
+
if(window.event)
|
56 |
+
key = window.event.keyCode; //IE
|
57 |
+
else
|
58 |
+
key = e.which; //firefox (97)
|
59 |
+
if (key == 97 || key == 65 || key == 67 || key == 88 || key == 43 || key == 26 || key == 5)
|
60 |
+
return false;
|
61 |
+
else
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
|
65 |
+
}
|
66 |
+
</script>
|
67 |
+
<?php
|
68 |
+
}
|
69 |
+
}
|
70 |
+
//----------------------------------------------------------------
|
71 |
+
function wccp_footer()
|
72 |
+
{
|
73 |
+
global $wccp_settings;
|
74 |
+
if ( $wccp_settings['right_click_by_mouse_protection'] == 'Enabled')
|
75 |
+
{
|
76 |
+
?>
|
77 |
+
<script type="text/javascript">
|
78 |
+
//disable right click
|
79 |
+
function md(e)
|
80 |
+
{
|
81 |
+
try { if (event.button==2||event.button==3) return false; }
|
82 |
+
catch (e) { if (e.which == 3) return false; }
|
83 |
+
}
|
84 |
+
document.oncontextmenu = function() { return false; }
|
85 |
+
document.ondragstart = function() { return false; }
|
86 |
+
document.onmousedown = md;
|
87 |
+
</script>
|
88 |
+
<?php } ?>
|
89 |
+
<script type="text/javascript">
|
90 |
+
disable_copy(document.body);
|
91 |
+
document.body.onkeypress = disableEnterKey; //this disable Ctrl+A select action for firefox specially
|
92 |
+
//chrome + mac
|
93 |
+
$(document).keydown(function(event) {
|
94 |
+
if(event.which == 17) return false; //chrome ctrl key
|
95 |
+
if(event.which == 157) return false; //mac command key
|
96 |
+
if(event.ctrlKey) return false; //random
|
97 |
+
//event.preventDefault();
|
98 |
+
//return false;
|
99 |
+
});
|
100 |
+
|
101 |
+
</script>
|
102 |
+
<?php
|
103 |
+
}
|
104 |
+
//------------------------------------------------------------------------
|
105 |
+
// Add specific CSS class by filter
|
106 |
+
function wccp_class_names($classes) {
|
107 |
+
if ( (is_home() && $wccp_settings['home_page_protection'] == 'Enabled' && $wccp_settings['css_protection'] == 'Enabled') || (is_single() && $wccp_settings['single_posts_protection'] == 'Enabled') && $wccp_settings['css_protection'] == 'Enabled' )
|
108 |
+
{
|
109 |
+
$classes[] = 'unselectable';
|
110 |
+
return $classes;
|
111 |
+
}
|
112 |
+
else{
|
113 |
+
$classes[] = 'none';
|
114 |
+
return $classes;
|
115 |
+
}//problem fixed here
|
116 |
+
}
|
117 |
+
//------------------------------------------------------------------------
|
118 |
+
function set_wccp_div_and_code($content)
|
119 |
+
{
|
120 |
+
global $wccp_settings;
|
121 |
+
if (is_single() && $wccp_settings['css_protection'] == 'Enabled') {
|
122 |
+
return '<div id="wccp" name="wccp" class="unselectable" unselectable="on">'.$content.'</div>';
|
123 |
+
}else {
|
124 |
+
return $content;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
//------------------------------------------------------------------------
|
128 |
+
add_action('wp_head','wccp_header');
|
129 |
+
add_action('wp_footer','wccp_footer');
|
130 |
+
add_filter('body_class','wccp_class_names');
|
131 |
+
add_filter('the_content','set_wccp_div_and_code');
|
132 |
+
//-------------------------------------------------------Function to read options from the database
|
133 |
+
function wccp_read_options()
|
134 |
+
{
|
135 |
+
if (get_option('wccp_settings'))
|
136 |
+
$wccp_settings = get_option('wccp_settings');
|
137 |
+
else
|
138 |
+
$wccp_settings = wccp_default_options();
|
139 |
+
|
140 |
+
return $wccp_settings;
|
141 |
+
}
|
142 |
+
//-------------------------------------------------------Set default values to the array
|
143 |
+
function wccp_default_options(){
|
144 |
+
$pluginsurl = plugins_url( '', __FILE__ );
|
145 |
+
$wccp_settings =
|
146 |
+
Array (
|
147 |
+
'single_posts_protection' => 'Enabled', // prevent content copy, take 3 parameters, 1.content: to prevent content copy only 2.all 3.none
|
148 |
+
'right_click_by_mouse_protection' => 'Enabled', // prevent right click by mouse
|
149 |
+
'css_protection' => 'Enabled', // idle
|
150 |
+
'home_page_protection' => 'Enabled', // idle
|
151 |
+
'show_protection_info' => 'yes' // about the plugin
|
152 |
+
);
|
153 |
+
return $wccp_settings;
|
154 |
+
}
|
155 |
+
//------------------------------------------------------------------------
|
156 |
+
//First use the add_action to add onto the WordPress menu.
|
157 |
+
add_action('admin_menu', 'wccp_add_options');
|
158 |
+
//Make our function to call the WordPress function to add to the correct menu.
|
159 |
+
function wccp_add_options() {
|
160 |
+
add_options_page('WP Content Copy Protection', 'WP Content Copy Protection', 8, 'wccpoptions', 'wccp_options_page');
|
161 |
+
}
|
162 |
+
//------------------------------------------------------------------------
|
163 |
+
function wccp_options_page() {
|
164 |
+
include 'admin-core.php';
|
165 |
+
}
|
166 |
+
?>
|
readme.txt
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WP Content Copy Protection ===
|
2 |
+
Contributors: wp-buy
|
3 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=ashrafweb%40gmail%2ecom&lc=US&item_name=aio%20plugins&item_number=aio&amount=19%2e00¤cy_code=USD¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
4 |
+
Tags: copy, plugin, posts,content,protect,post,images,prevent,paste
|
5 |
+
Requires at least: 2.5
|
6 |
+
Tested up to: 3.8
|
7 |
+
Stable tag: 1.0
|
8 |
+
|
9 |
+
This wp plugin protect the posts content from being copied by any other web site author , you dont want your content to spread without your permission!!
|
10 |
+
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
This wp plugin protect the posts content from being copied by any other web site author , you dont want your content to spread without your permission!!
|
14 |
+
|
15 |
+
**Improve your seo score in Google and Yahoo and other SE's**:
|
16 |
+
Our plugin protect your content from being copied by any other web sites so your posts will still uniqe content, this is the best option for seo
|
17 |
+
|
18 |
+
|
19 |
+
**Don't Let Your Stories Go to web thief!**
|
20 |
+
The plugin will keep your posts and home page protected by multiple techniques (JavaScript + CSS), this techniques does not found in any other wordpress plugin and you will own it for free with this plugin
|
21 |
+
|
22 |
+
**Easy to Install**:
|
23 |
+
Read the installation steps to find that this plugin does not need any coding or theme editing, just use your mouse..
|
24 |
+
|
25 |
+
|
26 |
+
== Screenshots ==
|
27 |
+
1. WP Content Copy Protection admin page
|
28 |
+
|
29 |
+
== Installation Guide ==
|
30 |
+
**Installation steps**
|
31 |
+
1.Download the package.
|
32 |
+
2.Extract the contents of WP-Content-Copy-Protection.zip to wp-content/plugins/ folder You should get a folder called WP-Content-Copy-Protection
|
33 |
+
3.Activate the Plugin in WP-Admin.
|
34 |
+
4.Goto Settings > **WP-Content-Copy-Protection** to configure options.
|
35 |
+
5.You will find **4 options** to protect your content,images,homepage and css protection. dont forget to **save** the changes before exit
|
36 |
+
Thanks!
|
37 |
+
|
38 |
+
|
39 |
+
== Changelog ==
|
40 |
+
* initial version
|
screenshot-1.png
ADDED
Binary file
|
the_globals.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Get The Plugins URL as http://www.yrsite.com/dir/subdir
|
3 |
+
$pluginsurl = plugins_url( '', __FILE__ );
|
4 |
+
?>
|