Widget Script Loads at Bottom of Page

That’s expected behaviour, since you’re calling wp_enqueue_script mid-page, so at that point the <head> ship has sailed, and the only other option is to enqueue in the footer, which is fine. I didn’t spend too much time reading the actual script that you’re enqueuing, but it seems like it it’s doing some document.write() as soon … Read more

Are widget arguments always set inside My_Widget::widget()?

This is mostly a case of trusting the arguments. Or not trusting. You can assume that you have received meaningful arguments, ready to be used. You can assume they are arbitrary and possibly grossly invalid. I would say in this specific case it hangs if the code is public or private. In private site you … Read more

WordPress version quick check?

I’m not the only one with this problem. The simplest way I feel is the site wide readme.html method or the wp-admin/about.php method. This wordpress post has four ways to check and this question on stackoverflow had good info. I looked and looked but couldn’t see it in the At a Glance box until later … Read more

Randomizing the RSS Widget

Here’s one way to achieve this: /** * Display a random feed in the RSS Widget * Activated by the wpse_random_url string in the feed url * * @see http://wordpress.stackexchange.com/a/187599/26350 */ ! is_admin() && add_filter( ‘wp_feed_options’, function( $feed, $url ) { // Modify this list of feeds to your needs: $urls = [ ‘http://stackoverflow.com/feeds/’, ‘http://wordpress.stackexchange.com/feeds’, … Read more