How to Disable Beaver Builder Inline E...
Learn how to disable Beaver Builder inline editing with this simple snippet. Prevent ...

WPCodeBox
328

This experimental Oxygen Custom Component registers a snippet that encodes email addresses using HTML entities, making them harder for bots to parse and helping to prevent email harvesting.
<?php
add_action('plugins_loaded', function() {
class EncodeEmail extends OxyEl {
function init() {
}
function afterInit() {
$this->removeApplyParamsButton();
}
function name() {
return 'Obfuscated Email';
}
function slug() {
return "obfuscated-email";
}
function icon() {
return CT_FW_URI . '/toolbar/UI/oxygen-icons/add-icons/loginform.svg';
}
function controls() {
$email_control = $this->addOptionControl(
array(
"type" => 'textfield',
"name" => 'Enter Email',
"slug" => 'email'
)
);
$email_control->rebuildElementOnChange();
}
function render($options, $defaults, $content) {
?>
<?php echo $this->encode_email_address($options['email']); ?>
<?php
}
/**
* Encode an email address to display on your website
*/
function encode_email_address( $email ) {
$output = '';
for ($i = 0; $i < strlen($email); $i++)
{
$output .= '&#'.ord($email[$i]).';';
}
$output = $output;
return $output;
}
}
new EncodeEmail();
});





This is how you change the WordPress admin logo to your own custom logo.
