Contributing to WordPress core

Recently, I started contributing to WordPress core. I’ve decided to hone my WordPress skills beyond writing WordPress plugins.

Contributing code patches to core is exciting because they get scrutinized by some top notch programmers I admire, and if accepted, get used directly in WordPress. I’ve also been testing bugs and other people’s fixes when I can, but creating patches is the most part exciting so far! My first patch was tiny and accepted without a change, most of the rest have been more complex and needed little fine tuning. Along the way I’m learning more about the WordPress core than any normal person needs to know.

Here are some patches I’ve contributed recently:

  • #22919 – my first, patch, accepted and committed by nacin. grin:). fixed a javascript type mismatch
  • #22606 – ‘select a file’ link doesn’t work from keyboard, accessibility issues – added javascript fix
  • #22933 – tabbing out of text edit area went to wrong field, fixed bug in code
  • #21334 – fixed accessibility issue with quick edit panel, two possible patches
  • #23120 – fixed issue with unclear/no confirmation on widget save/reorder
  • #22896 – eliminate possibility of removing bundled jQuery when in Dashboard
  • #22917 – user/site count not updating (immediately) after adding/removing user/site(s)

It took me a little bit of time to get the local setup for debugging and coding WordPress core, but mainly because I haven’t done anything quite like that before. Now that everything is set up locally, I can work on fixing bugs or testing fixes quickly and efficiently. When I find a bug I can fix, creating the patch file is as simple as a command line command away, especially as outlined in Mark Jaquith’s Toolbox.

Enforcing _blank target on external links

When training new clients on how to edit their own websites in wordpress, I often mention the convention of ‘targeting blank’ when linking to another website. Adding the ‘target=”_blank”‘ tag to the link opens a new window when the user clicks the link, leaving the client website open in the background . Still, I know clients will forget this so I often add a little JavaScript code to make sure the links are always set to target blank:

Since I know all my wordpress sites include jQuery, I use that library to make the call as compact as possible:

CODE:
$(document).ready(function() {
$(“a[href^=’http:’]”).
not(“[href*=’CLIENTDOMAIN.COM’]”).
attr(‘target’,’_blank’);
});

what does it do? it finds all links that start with http:, then filters out (not) those links that go to the CLIENTDOMAIN.COM (their domain name), then it sets the ‘target’ attribute to ‘_blank’, linking all external links on the

Web Development Enters a New Era

Web publishing platforms such as WordPress have reached a maturity level that allows developers to deploy robust websites managed and maintained by clients. The developers role becomes focused on design and implementation, while content development is client driven. Modern libraries like jQuery and the WordPress plugin mechanism mean that ideas and projects that used to take days or weeks to implement and debug now take just minutes orhours to install and configure.

 

Dreamweaver CS5 Beta

As a developer, I’ve learned to live with and love Adobe’s Dreamweaver CS4. Like many developers I’ve discovered my way around Dreamweaver’s little quirks and limitations. Still I anxiously await word of the next release.


I can only hope for a better FTP client and a revamped interface. What other features do you think Adobe should add to the next release of Dreamweaver?