Copy-Protect PN code will Protect your WordPress Blog from thieves (copier) .It will protect your post from being copy and it will disable both mouse and keyboard .It is an effective code which can protect your blog.

Recently I shared CopyProtect for Blog which Disables only Right Click.

We write post by doing hard work and support of our knowledge.If anyone without our permission copy our posts  and paste that and use the post on their blog it really hurt us.So to stop the post being copied from blog we must use copy protect.




How to use this :

Go to your WordPress admin Pannel.Than go to – Appearance >> Editor . Then open the file named function.php .  just like the picture ….

COPYPROTECT FUNTION

 Then Paste the code given below after this mark   ; or this ;}

THE CODE :

/*
Plugin Name: CopyProtect PN
Plugin URI: http://www.perfectneed.com
Description: Copy Protect is the effective way to protect your site content form copier(thief).
Version: 1.0
Author: Shahriar Ahmed
Author URI: http://www.perfectneed.com
License: GPLv2
*/

class copyprotect {

function admin_cp() {
add_submenu_page('options-general.php', 'Copy Protect', 'Copy Protect', 'manage_options', 'copyprotect_s', 'admin_menu_copy');
}

function cp_enq_script() {
wp_enqueue_script('jquery');
}

function copy_protect_process() {
echo '<script type="text/javascript">
jQuery(document).bind("keydown", function(e) {
if(e.ctrlKey && (e.which == 65 || e.which == 67 || e.which == 88 || e.which == 83 ||e.which == 85)) {
e.preventDefault();
return false;
}
});

jQuery(document).on( "mousedown", function(event) {
if(event.which=="3")
{
document.oncontextmenu = document.body.oncontextmenu = function() {return false;}

}
});
</script>

<style type="text/css">
body{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>';
}

function copy_protect_c() {
delete_option('ccaption');
delete_option('clink');
delete_option('ctext');
}

function quack_copy_protect_c() {
if (is_home() || is_front_page()) {
?>
<center>
<small style="font-size:10px;"> <?php echo get_option('ctext'); ?> <a href="<?php echo get_option('clink'); ?>" target="_blank"> <?php echo get_option('ccaption'); ?> </a> </small></center>
<?php
}
}

}

function admin_menu_copy() {
echo "<center><h1>Copy Protect by Shahriar Ahmed</h1></center><br><center>This wordpress code is share by <a style="font-weight: inherit; font-style: inherit; color: #1100ce;" href="http://www.perfectneed.com">Perfectneed </a> blog.This Plugin doesn't have any Settings.Just put it on function.php and protect.</center>";
}

register_activation_hook(__FILE__, array('copyprotect', 'copy_protect_c'));
add_action('init', array('copyprotect', 'quack_copy_protect_c'));
add_action('wp_enqueue_scripts', array('copyprotect', 'cp_enq_script'));
add_action('wp_head', array('copyprotect', 'copy_protect_process'));
add_action('admin_menu', array('copyprotect', 'admin_cp'));

 

 

Then press Update .That’s all .Now no one can copy your post from your blog. Have a good day.

If there is any problem or question,then comment , i will try to answer them.