Question
I'd like to share a variable between two add_actions. Currently I'm trying to use a global. However it doesn't work. This simple example below illustrates the problem. In this example, test_before_send_mail() runs before test_get_form_post_callback(). $test = '123'; add_action('wpcf7_before_send_mail', 'test_before_send_mail'); function test_before_send_mail() { ...
0
, , 4 weeks 0 Answers 21 views

Question
At present, I am disabling Right Click through the use of the following code: <?php // Disable Right Click function disable_right_click() { ?> <script> jQuery(document).ready(function(){ jQuery(document).bind("contextmenu",function(e){ return false; }); }); </script> <?php } add_action('wp_head', 'disable_right_click'); add_action('admin_head', 'disable_right_click'); ?> The only problem ...
0
, , , 1 month 0 Answers 23 views