Plugin is a widget, but I want to call it in the head, can I?

The correct “WordPress” way of doing it would be to use the_widget template tag to display widgets anywhere you want. so in you case you would something like this: $instance[‘account’] = ‘account name’; //Ustream channel name $instance[‘online’] = ‘http://www.online_image.URL’; $instance[‘offline’] = ‘http://www.offline_image.URL’; the_widget(‘wp_ustream_status’, $instance);

Run a plugin just ‘once’ per page reload

Basic idea is to use javascript to make an AJAX call back to the site which in turn save the hit because if you use PHP alone, then hits for cached pages won’t be counted because no PHP is processed at that time. Study the code of WP-Postviews plugin http://lesterchan.net/portfolio/programming/php/#wp-postviews Edit: Hook may be fired … Read more

My custom plugin did not create db tables in database

Late response, but this might help others to understand why $wpdb->prepare should not be used with SQL CREATE statements. The answer is that $wpdb->prepare surrounds strings (%s) with single quote marks. The CREATE statement produced from the above $wpdb->prepare is invalid SQL: CREATE TABLE ‘wp_classes’ ( id mediumint(9) NOT NULL AUTO_INCREMENT, time datetime DEFAULT ‘0000-00-00 … Read more