Is there a error message or detection that appears if Twitter feeds go down and won't display?
Is it possible to add this into the existing code, so visitors will not be met with a blank area?
Is there a error message or detection that appears if Twitter feeds go down and won't display?
Is it possible to add this into the existing code, so visitors will not be met with a blank area?
No, there is no message. It is possible to add it, maybe it will be added in the next update.
By enabling WP_DEBUG inside your wp-config.php you'll notice several errors within your plugin code:
Function form inside the MinitwitterWidget class doesn't initialise the variables of the $instance:
function form($instance) {
$instance = array_merge( array(
'username' => ''
,'limit' => ''
,'list' => ''
,'query' => ''
), (array)$instance );
?>
Same thing with the widget function within the same class. This won't even show as an error, since as soon as you instantiate the widget into a sidebar it's default values are saved. At least check for empty(). BTW if you have WP_DEBUG turned on the default values are the error notices!
Thank god that shortcode_atts() deals with this on its own.
And the last one - this line: add_shortcode('minitwitter', mtf_create_shortcode); should have quotes:add_shortcode('minitwitter', 'mtf_create_shortcode');, otherwise the second argument is considered an undefined constant, and yields an error notice. It's a notice, since undefined constants default to their names as strings.
Cheers.
Thank you for your messages I will take a look and update it.
You must log in to post.