I want to prevent my design codes so that I want to disable view source and inspect element options for my Wordpress Site. How can I do that? Is there any plugin or code? Please Help.
Thanks in Advance.
I want to prevent my design codes so that I want to disable view source and inspect element options for my Wordpress Site. How can I do that? Is there any plugin or code? Please Help.
Thanks in Advance.
Short answer: no, it's impossible to achieve. Why? Well, you have to understand what is happening when somebody visits your webpage: browser requests a document, and the SERVEr servs it: everything that you want the user to see has to be downloaded to the browser. View-source is only a Chrome method, it would work just as fine if you were to load it and then view locally. There are exeptions to that, f.e. u can post PHP messages without any http markups but as soon as we are talking html it has to be public. If you are afraid of breaching the copy rights I would make any JS or CSS given by js scripts elements being moved to private sections of server storage and then requesting their return values, stored in public files via server-side scripts, but frankly that seems to be even more problematic, not to mention enormously innefficent.
function disable_right_click() {
?>
<script>
jQuery(document).ready(function(){
jQuery(document).bind("contextmenu",function(e){
return false;
});
});
</script>
<?php
}
add_action('wp_footer', 'disable_right_click');
past this code to functions.php of your wordpress theme/site....