Hi,
I just hit this error with the 2.63 version of wp-polls:
PHP Fatal error: Call to undefined function add_action() in /*/wp-content/plugins/wp-polls/wp-polls.php on line 31
Trying to vote, never works for that. Chrome says there was an error 500 on wp-polls.php
After digging for a while, i realize that 2.63 it's called directly by this code:
<script type='text/javascript'>
/* <![CDATA[ */
var pollsL10n = {
ajax_url: "http://www.cdf.cl/wp-content/plugins/wp-polls/wp-polls.php",
text_wait: "Tu ultima solicitud esta siendo procesada, por favor espera...",
text_valid: "Por favor selecciona una respuesta valida.",
text_multiple: "Numero maximo de respuestas permitidas: ",
show_loading: "1",
show_fading: "1"
};
/* ]]> */
</script>
Then, doing a comparison of both version, 2.63 and 2.62 or 2.61, i realize you don't include this on top of wp-polls.php file:
### Load WP-Config File If This File Is Called Directly
if (!function_exists('add_action')) {
$wp_root = '../../..';
if (file_exists($wp_root.'/wp-load.php')) {
require_once($wp_root.'/wp-load.php');
} else {
require_once($wp_root.'/wp-config.php');
}
}
So i add those lines myself, reupload wp-polls.php, and... it works again.
Hopefully this can be fixed soon ;)
Great plugin :)