WordPress 3.1 Beta 1

WordPress 3.1 Beta 1 has been released!

Snippet:

If all goes well, we hope to release WordPress 3.1 to the world at large by the end of the year, though that is (as always) subject to change/dependent on how the beta period goes. The more help we get with testing and fixing bugs, the sooner we will be able to release the final version.

Some of the new features to check out include:

There are also some known issues: things that aren’t *quite* finished, but that weren’t worth holding up the beta release. They will be fixed before 3.1 is released for general use. Note that as things get fixed, the beta release will update nightly. What you should know:

  • Fatal error: Call to a member function is_page() on a non-object in /wp-includes/query.php. is_page() may be any conditional tag. This issue occurs when a theme or plugin is doing something wrong. Some code is checking the value of a conditional tag before we actually set up the Query, which means they don’t work yet. In 3.0, they silently failed and always returned false. In 3.1 Beta 1, this is throwing a fatal error. This will be handled in the final release, so use this opportunity to fix your plugins. (#14729)
  • All known issues slated for fixing before launch are listed in Trac. Please check this list to see if a bug is already on the list before reporting it.

Download: WordPress 3.1 Beta 1

1 Star2 Stars3 Stars4 Stars5 Stars (116 votes, average: 4.04 out of 5)

Updated This Site WP-Polls To 2.11 RC1

I have updated this site WP-Polls to 2.11 RC1 to test out the multiple answers voting feature in WP-Polls 2.20. You can set the maximum number of answers that the user can vote, in this case, I set it to 14 as there are 14 answers.

Note the poll footer that says “Total Voters” and NOT “Total Votes”. The individual answer on the other hand is “Votes” and not “Voters” and the percentage is calculated based on the “Total Voters”.

Vote away on the right hand sidebar.

1 Star2 Stars3 Stars4 Stars5 Stars (104 votes, average: 4.04 out of 5)

Show Your Love for the Top 100 WordPress Plugin Developers

ManageWP wrote an article entitled, Show Your Love for the Top 100 WordPress Plugin Developers. I am ranked 5th on the charts =D

Quote

We’ve spent rather a lot of time gathering and sorting data for the top 100 WordPress plugin developers, based upon total number of downloads. Unless you are brand new to WordPress, it is likely that you use at least one plugin created by the developers below.

All you need to do is pick out one (or more) of your favorite developers, and take a moment to thank them. We’ve collected all of the Twitter accounts we could find, but we are sure you can find other ways of getting in touch if your chosen developer doesn’t have an account listed.

Firing off a quick tweet to thank a developer for developing great free products will only take a moment, so why not do it?

Furthermore, if you’re on the hunt for plugins to check out, you will find a comprehensive list below of the most popular plugins available for WordPress. Just remember to thank the developer if you start using one!

Top 10 WordPress Plugins Developer

Thanks for the support guys =D

1 Star2 Stars3 Stars4 Stars5 Stars (253 votes, average: 4.03 out of 5)

My WP Plugins Update April 06

Today is April Fool’s Day and I had released updates for 7 of my plugins. Rest assured that this is not a joke. =D

Below are the 7 plugins that I updated. Please check out the changelog for more information.

WordPress 2.0 Plugin: WP-DBManager 2.03
» download | documentation/changelog
Manages your WordPress database. Allows you to optimize database, backup database, restore database, delete backup database and run selected queries.

WordPress 2.0 Plugin: WP-EMail 2.04
» download | demo | documentation/changelog
Enable you to send your webblog entry to a friend.

WordPress 2.0 Plugin: WP-Polls 2.06
» download | demo | documentation/changelog
Adds an integrated poll system to your WordPress.

WordPress 2.0 Plugin: WP-PostRatings 1.01
» download | demo | documentation/changelog
Enables You To Have A Rating System For Your Post.

WordPress 2.0 Plugin: WP-Print 2.04
» download | demo | documentation/changelog
Displays a printable version of your WordPress weblog post.

WordPress 2.0 Plugin: WP-Stats 2.03
» download | demo | documentation/changelog
Display your WordPress statistics.

WordPress 2.0 Plugin: WP-UserOnline 2.03
» download | demo | documentation/changelog
Enable you to display how many users are online on your WordPress with detailed statistics of where they are and who there are(Members/Guests/Search Bots).

As usual, if there are any problems/bugs/errors, please post it in the forum, so that other users who have the same problem can use it as a reference.

If you have problem integrating wp-email.php, wp-polls.php, wp-stats.php or wp-useronline.php, do check out this tutorial I had created, Integrating GaMerZ’s Plugins With Your WordPress Theme

For the rest of my plugins, please visit my Programming Portfolio Page.

Thank you =)

1 Star2 Stars3 Stars4 Stars5 Stars (234 votes, average: 4.03 out of 5)

Loading JavaScript In Footer In WordPress 2.8

As you may all know by now, WordPress 2.8 will have some optimization done on JavaScript as well as CSS. That includes concatenating the scripts/styles, minifying it instead of packing as well as gzipping. I have been paying much attention to the development of WordPress 2.8 especially when it comes to JavaScripts. I have filed 2 suggestion tickets in WordPress Trac, Ticket #8884 and Ticket #8859 which should be able to help plugin authors load their JavaScript easily in the footer of WordPress.

This post shall be a tutorial post and I will demonstrate how to load JavaScript in the theme’s footer in WordPress 2.8 Nightly using my WP-Polls as an example.

### Function: Enqueue Polls JavaScripts/CSS
add_action('wp_enqueue_scripts', 'poll_scripts');
function poll_scripts() {
	wp_enqueue_style('wp-polls', plugins_url('wp-polls/polls-css.css'), false, '2.50', 'all');
	wp_enqueue_script('wp-polls', plugins_url('wp-polls/polls-js.js'), array('jquery'), '2.50', true);
	wp_localize_script('wp-polls', 'pollsL10n', array(
		'ajax_url' => plugins_url('wp-polls/wp-polls.php'),
		'text_wait' => __('Your last request is still being processed. Please wait a while ...', 'wp-polls'),
	));
}

The poll_scripts() function will hook onto the wp_enqueue_scripts function. This will allow you to enqueue JavaScripts as well as CSS Styles for your plugin.

As the name goes, wp_enqueue_style() will queue and then print out your plugin’s CSS link.

wp_enqueue_script() will queue and then print out the JavaScript link. The difference between WP2.7’s wp_enqueue_script() and WP2.8’s wp_enqueue_script() is the addition of the last argument which is whether to load the JavaScript in the footer. If set to true, it will load it in the footer, PROVIDED that your theme has the following code:

in the theme footer (refer to the default theme footer.php if unsure). Many themes especially self-created ones has failed to include wp_head() in the header.php as well as wp_footer() in the footer.php. The default value of the last argument is false, which means it will load it in the header by default.

wp_localize_script() will allow your to translate strings within your plugin JavaScript. To access the translated variable, you can use “pollsL10n.text_wait” (without the quotes).

This new hook:

do_action('admin_enqueue_scripts', $hook_suffix);

will allow you to enqueue your plugin JavaScript or CSS within the WP-Admin area easily rather than calling many times add_action() repeatedly depending on how many pages your plugin has in the WP-Admin area.

The sample code from WP-Polls to print JavaScripts as well as CSS in the WP-Admin area are as follows:

### Function: Enqueue Polls Stylesheets/JavaScripts In WP-Admin
add_action('admin_enqueue_scripts', 'poll_scripts_admin');
function poll_scripts_admin($hook_suffix) {
	$poll_admin_pages = array('wp-polls/polls-manager.php', 'wp-polls/polls-add.php', 'wp-polls/polls-options.php', 'wp-polls/polls-templates.php', 'wp-polls/polls-uninstall.php');
	if(in_array($hook_suffix, $poll_admin_pages)) {
		wp_enqueue_style('wp-polls-admin', plugins_url('wp-polls/polls-admin-css.css'), false, '2.50', 'all');
		wp_enqueue_script('wp-polls-admin', plugins_url('wp-polls/polls-admin-js.js'), array('jquery'), '2.50', true);
		wp_localize_script('wp-polls-admin', 'pollsAdminL10n', array(
			'admin_ajax_url' => plugins_url('wp-polls/polls-admin-ajax.php'),
			'text_delete_all_logs' => __('Delete All Logs', 'wp-polls'),
		));
	}
}

Firstly, I assigned all the pages of WP-Polls that has an admin page to an array. Next I check whether the current page is within the array. If it is in the array, it means that the user is accessing WP-Polls admin area and thus, I will proceed on to enqueue the JavaScript or CSS needed in the WP-Polls admin area.

Note 1: When you use wp_enqueue_script(), it will automatically register the script and then print it out, whereas if you use wp_register_script(), you will have to manually print it out by calling wp_print_scripts().

1 Star2 Stars3 Stars4 Stars5 Stars (128 votes, average: 4.03 out of 5)