Use last prototype version automatically …

Hello everyone, we know that prototype is a library used almost by everyone who uses wordpress, and good reading the article to use jQuery automatically I decided to try prototype and just modify the code mentioned in that post and I added it in the functions.php of my active theme, leaving this way:

// Function to always use the updated prototype

if ( ! is_admin () ) {

wp_deregister_script [19659005] ( 'prototype' ) ;

wp_register_script ( 'prototype' ( "http : //ajax.googleapis.com/ajax/libs/prototype/1/prototype.js ") false '' ]) ;

wp_enqueue_script ( 'prototype' ) ;

}

And as they indicate there, if they have an error loading their scripts , you just have to delete those lines from the functions.php file; It should be noted that to always use the last library within version 1, the path prototype / 1 / prototype.js is indicated, but if you want to use the last library within version 1.6 you must use the path prototype / 1.6 / prototype.js and if you want to indicate a specific version like 1.6.0.2, you should use prototype / 1.6.0.2 / prototype.js and that would be it, I hope it is of help.