By

Still No jQuery Accordion in WordPress 3.1?

Update: Just posted a ticket to core trac. Response was that new JavaScript libraries tend to only get included if they are used in WordPress core, which explains why it isn’t added (yet). I think that it should be considered though because of its usefulness, and tiny file size!

There seems to be a bit of a shake up in the jQuery UI files included with WordPress 3.1. Firstly there is a new UI version (1.8.7), rather than 1.7.3 which was included in WordPress 3.0.4.

Also, the jQuery core files have been broken out of the single ui.core.js file into four separate files: ui.core.js, ui.mouse.js, ui.position.js, ui.widget.js. This makes it a little clearer what core UI components are included with WordPress. You can see this more clearly in the screen shot below. The core files are outlined in red.

There are two new UI widgets available in jQuery, and one of these, the button widget, has made it into WordPress 3.1. The autocomplete didn’t make it in. This is not a surprise as this might not be required that much at the moment, but users may need this as more autocomplete examples pop-up around the web.

I am a little disappointed though at the lack of inclusion of the accordion widget which has been around for a while now, and is a very useful addition to your web pages. There may be a good reason for this, that I am not aware of, but at just 9 KB it is very small and could be included without anyone hardly even noticing!

I use a lot of jQuery accordions for theme/Plugin options pages and find it a hassle to have to add in the accordion widget manually. It is not really a big issue, but it’s conspicuous by its absence. Anyone else know why it is not shipped along with the other WordPress jQuery files? Let me know in the comments if you do.

Oh, and the datepicker widget would be nice too. However this is around 35 KB so might be seriously considered for now. Anyway, just imagine being able to pick the date from the nice jQuery datepicker rather than have to manually enter the date/time as you do now. 😉

By

Minimise Admin Bar Plugin

Now available to download from the repository.

OK, it’s been a while since our last Plugin release, so we are pleased to announce a brand new one hot off the press! What does this one do? Well, if you have used a beta version of WordPress 3.1 you will know that on the front end of your blog pages you now have displayed, by default, an admin bar. A screen shot of this is shown below.

The admin bar gives you a menu full of quick links to your WordPress admin panel. A lot of users don’t seem to like the admin panel displayed at the top of every page, and so seek ways to disable it or remove it. You can easily disable it on a per user basis via a users profile page, as shown below.

However this is not that useful if you want to remove it site-wide. The Admin Bar Minimiser Plugin was written to help users keep the admin bar active but be able to minimise it at any time to make it less obtrusive. You can see a demo of the Plugin in action in the following video:

As you can see, the Plugin works by allowing you to minimise the admin bar from view via a single click. You can bring it back just as easily. This also works for the admin bar displayed on the WordPress back end too.

Don’t forget though, to be able to minimise the admin bar on the WordPress back end too, you will need to enable it for the currently logged in user. This is because the admin bar is not enabled by default for WordPress admin pages. However it is for front end pages.

The Plugin will be live in the WordPress repository soon, we are just waiting for the Admin Bar Minimiser SVN repository to go live.

Since the demo video above was recorded I have added an options page for the Plugin. This allows you to set whether the front end, and back end shows the admin bar maximised by default. I would love to hear what you think about the Plugin, and how useful you think it is going to be to you once WordPress 3.1 is here.

By

jQuery UI Widgets on Blog Pages

A little while ago I covered some important aspects of using the jQuery UI library inside of WordPress admin pages in the post entitled: jQuery UI in WordPress 3 Admin Pages.

This time, however, we will be focussing on how to add jQuery UI widgets into your WordPress posts/pages in a reusable way. All this will be wrapped up an a Plugin for portability. The Plugin will be uploaded to the WordPress.org Plugin repository and should be live soon, so you will be able to download it and use it on your own WordPress sites. Read More

By

jQuery UI in WordPress 3 Admin Pages

This article covers getting jQuery, and in particular jQuery UI up and running inside the WordPress admin. At the time of writing the latest version of WordPress is version 3.01 and that is the version we shall be using. Also, WordPress is running locally (using WAMP Server 2.0) with the default Twenty Ten theme (1.1).

Originally, I wanted to use jQuery UI on a Plugin admin options page. However my initial attempts were unsuccessful so I thought that I would document, and share, my experiences. There isn’t a huge amount of WordPress specific jQuery UI resources around (although there are numerous basic jQuery tutorials around), so hopefully the information presented here will help others overcome the initial hurdles. Read More

By

Draggable Blog Sidebar Widgets!

After playing around with some jQuery sorting demo’s I wanted to be able to implement these easily into WordPress.

The steps needed to complete this are:

  • Register jQuery, and jQuery UI libraries with WordPress.
  • Enqueue the scripts to load them on blog pages ONLY.
  • Set-up a shortcode to render jQuery code.
  • Add jQuery code to shortcode callback function.
  • Add the shortcode to any post/page to see it working!

Read More