Dashboard Widget (Without Controls) Sample Plugin

WordPress 2.5 has the ability to customize your administration dashboard with the help of widgets.

After poking around WordPress 2.5 codes, I have come out with this Dashboard Widget Sample Plugin. BUT do note that this plugin does not include Dashboard Widget Controls. If I have the time, I will add that in or perhaps I will create another plugin called “Dashboard Widget (With Controls) Sample Plugin”.

To get a clearer picture of what this sample plugin does, here is a screenshot of the Dashboard Widget (Without Controls) Sample in action.

Here comes the code:

 'Full URL For "See All" link', // Example: 'index.php?page=wp-useronline/wp-useronline.php'
		'feed_link' => 'Full URL For "RSS" link', // Example: 'index.php?page=wp-useronline/wp-useronline-rss.php'
		'width' => 'half', // OR 'fourth', 'third', 'half', 'full' (Default: 'half')
		'height' => 'single', // OR 'single', 'double' (Default: 'single')
		)
	);
}

### Function: Add Dashboard Widget
add_filter('wp_dashboard_widgets', 'PLUGINNAME_add_dashboard_widget');
function PLUGINNAME_add_dashboard_widget($widgets) {
	global $wp_registered_widgets;
	if (!isset($wp_registered_widgets['dashboard_PLUGINNAME'])) {
		return $widgets;
	}
	array_splice($widgets, sizeof($widgets)-1, 0, 'dashboard_PLUGINNAME');
	return $widgets;
}

### Function: Print Dashboard Widget
function dashboard_PLUGINNAME($sidebar_args) {
	global $wpdb;
	extract($sidebar_args, EXTR_SKIP);
	echo $before_widget;
	echo $before_title;
	echo $widget_name;
	echo $after_title;
	echo 'YOUR CONTENT GOES IN HERE';
	echo $after_widget;
}
?>

Hope this helps some of you guys. =)

1 Star2 Stars3 Stars4 Stars5 Stars (34 votes, average: 3.82 out of 5)

WordPress 3.0 RC1

WordPress 3.0 RC1 has been released just a day after WordPress crosses its 7th birthday!

Happy Birthday WordPress. I have been growing together with you for the past 6 years, unfortunately because of my full time job, I am unable to contribute to you after your 7th birthday! Sorry about that.

As Matt teased earlier, the first release candidate (RC1) for WordPress 3.0 is now available. What’s an RC? An RC comes after beta and before the final launch. It means we think we’ve got everything done: all features finished, all bugs squashed, and all potential issues addressed. But, then, with over 20 million people using WordPress with a wide variety of configurations and hosting setups, it’s entirely possible that we’ve missed something. So! For the brave of heart, please download the RC and test it out (but not on your live site unless you’re extra adventurous). Some things to know:

  • Custom menus are finished! Yay!
  • Multi-site is all set.
  • The look of the WordPress admin has been lightened up a little bit, so you can focus more on your content.
  • There are a ton of changes, so plugin authors, please test your plugins now, so that if there is a compatibility issue, we can figure it out before the final release.
  • Plugin and theme *users* are also encouraged to test things out. If you find problems, let your plugin/theme authors know so they can figure out the cause.
  • There are a couple of known issues.

Download: WordPress 3.0 RC1

1 Star2 Stars3 Stars4 Stars5 Stars (368 votes, average: 3.81 out of 5)

WP-Polls Update

» Now you can change WP-Polls’s Poll Bar style in WP-Admin itself, one of the features that I longing to implement is finally implemented. See that in action.

» WP-Polls is now 100% localize thanks to Ravan and Philippe Corbes.

» If you do not like WP-Polls and wish to remove it totally, you wish came true. The built-in uninstaller by Philippe Corbes does the trick.

» The usage instructions is now in the plugin itself under Polls -> Polls Usage

On other plugins, I will work on WP-Downloads and WP-Ban in December, expect it to be out for testing by January 2007.

1 Star2 Stars3 Stars4 Stars5 Stars (303 votes, average: 3.81 out of 5)

WordPress 3.1 RC2

WordPress 3.1 RC2 has been released! I am pretty sure by end of this week or latest next week, we will be able to see WordPress 3.1 out the door!

The second release candidate for WordPress 3.1 is now available. The requisite haiku:

Rounding up stragglers

Last few bugs for 3.1

Go test RC2

As I outlined in the announcement post for RC1, release candidates are the last stop before the final release. It means we think we’re done, and we again have no bugs to squash. But with tens of millions of users, many server configurations and setups, and thousands of plugins and themes, it’s still possible we’ve missed something.

Beta 1 came on Thanksgiving, RC1 on Christmas, and RC2 on New Year’s Day. We won’t be waiting for another holiday for the final release, though, so if you haven’t tested WordPress 3.1 yet, now is the time!

Select changes since RC1:

  • The security fixes included in WordPress 3.0.4
  • Fix issues related to handling a static front page
  • Fixes and enhancements for the pagination buttons
  • Fix searching for partial usernames
  • Properly reactivate plugins after editing them
  • Always show the current author in the author dropdown when editing a post
  • Fixes for attachment taxonomies
  • Fix node removal for the admin bar
  • Fix the custom post type show_in_menu argument
  • Various fixes for right-to-left languages
  • and a few dozen more changes

If you are testing the release candidate and think you’ve found a bug, there are a few ways to let us know:

Download: WordPress 3.1 RC2

1 Star2 Stars3 Stars4 Stars5 Stars (212 votes, average: 3.81 out of 5)