Disabling browser auto-complete w/ php & js
-
Hello,
I am trying to follow the instructions spelled out in this thread,
http://ww.wp.xz.cn/support/topic/disable-password-auto-complete?replies=8
and am running into problems with a syntax error.To summarize, I added this to functions.php
function kill_autocomplete() { wp_register_script('kill-ac', get_template_directory_uri() . '/js/autocompleteoff.js', array('jquery'), '1.0' ); wp_enqueue_script('kill-ac'); } add_action('wp_enqueue_scripts', 'kill_autocomplete');and added a file named autocompleteoff.js to wp-includes/js/ that contained this line of code
jQuery('#user_pass').attr('autocomplete','off');After uploading these files I am getting a syntax error from the php, which is not surprising since I am basically cutting and pasting stuff in Simple Text. Here is the message…
Fatal error: Call to undefined function add_action() in /home/content/s/p/a/spaceheat/html/WordPress/wp-includes/functions.php on line 4559
Any idea what might be going wrong?
[ Don’t bump, it’s not permitted here. ]
The topic ‘Disabling browser auto-complete w/ php & js’ is closed to new replies.