Contributing to WordPress core - a primer


Published on

A few thoughts on getting started contributing code and designs to WordPress core. Geared towards designers and front-end developers who may not have a lot of experience with Trac, IRC, and running

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • \n
  • - Good opportunity to talk about this, since it's fresh in my mind.\n- Name is Dave Martin\n- I work for Automattic on the dot org team\n- I started working on core at the beginning of the 3.5 release.\n- Automattic, which runs is a private company\n- They donate my time to work full time on core\n
  • - Check out the contributor handbook at this address\n- It covers a lot of the getting started questions you may have\n
  • - Not going to talk in depth about all of the ways you can contribute\n- There are loads of ways you can help out. \n- You don’t have to be a coder or designer to contribute.\n
  • - Going to focus on front-end dev and design perspective\n- That’s where I spend the bulk of my time.\n- You’ll also find this presentation helpful if you're just getting started in other ways\n
  • - Things I'd like to cover are the following\n
  • - TALK THROUGH EACH\n- IRC\n- Trac\n- Make P2’s\n-\n- Core, UI, plugins, themes, support, accessibility\n
  • - Trying to stick to 4 month release cycles\n- GO THROUGH EACH\n- 3-4 betas\n- 3 private RC’s and 1 public RC\n
  • - WordPress core operates as a meritocracy\n- Decisions are made by those who have contributed the most, and been around the longest\n- Does that mean if you’re new, your voice won’t be heard? Not at all. \n
  • - So, you’ve got an idea for improving wp-admin, or you’ve found a bug\n- The first thing you do is head over to Trac - and run a couple searches\n- there may already be a ticket\n- If so, you’ll see the back history\n- If you don’t find anything, ask in IRC - there may be a back story behind why it hasn’t been done.\n- If the reaction is positive, create a ticket\n
  • - I’ll walk you through how I do things\n- For all of these tutorials I’ll be using a Mac\n- That’s what I use, but a lot of the processes are similar on other operating systems\n
  • - First you’ll want to download and install XAMPP\n- This will auto install apache, PHP, and MySQL\n- Go ahead an just install it in your applications folder\n
  • - After you’ve installed XAMPP, \n- From the XAMPP control panel, you’ll want to turn on Apache, and MySQL\n
  • - After you’ve turned on XAMPP, open the htdocs\n- I’ve added the path here on the slide\n- And add a new folder called “wordpress”\n
  • - Next open terminal and change directories by typing cd /Applications/XAMPP/htdocs/wordpress\n- Then hit enter\n
  • - Then enter “SVN CO ...”\n- SVN is the version control used to host Wordpress trunk\n- CO equals “check out”\n- So essentially, you are checking out a copy of WordPress trunk to your local WordPress folder\n- Once you hit enter, you’ll see a bunch of WordPress files being added\n
  • - We need to create a database for WordPress\n- Open a browser and go to localhost/phpmyadmin/\n- In the create a new database section enter “wordpress” as the database name\n- And click create - this will create a blank DB for you to use with WordPress\n
  • - Open your new wordpress folder in a text editor (I use Coda)\n- Just like in any new install, you’ll want to\n- Make a copy of the wp-config-sample.php file, and rename it without the sample bit\n
  • - Add “wordpress” as the db name\n- Then root for the username, leave the password blank, and leave the host to localhost\n
  • - Last, just visit localhost/wordpress/trunk/ in your browser and finish your install\n- Your local site will then be accessible through localhost/wordpress/trunk/\n- And just tack a wp-admin on the end to reach the admin.\n
  • - Trac is where we keep track of bugs and everything that’s being worked on\n- This is the reports tab\n- You’ll see that report 5 there with show you all of the open tickets slated for the next major release\n- Report 35, which you can’t see here shows all UX, UI tickets.\n
  • - This is what you’ll see when you look at a ticket\n- The top portion lists who reported it\n- Attachments will include (patches, images)\n- Change history at the bottom is where you comment on this ticket, and read the ticket history.\n- We’ll go through the process of creating a patch at the end of the talk, and I’ll show you more of Trac then.\n
  • - There are plenty of IRC tutorials on the net, but I just want to touch quickly on getting started\n- The IRC client I use is called Adium - it’s free.\n
  • - After you download and install Adium, you’ll want to connect to\n
  • - The two rooms I frequent are: #wordpress-dev, and #wordpress-ui\n\n
  • - One of the best was to get your feet wet is to start by testing other peoples patches\n- So here’s a ticket with some improvements to the pressthis bookmarklet\n- It has yet to be committed, but multiple patches have been uploaded\n- The latest one dot 3 was uploaded 2 weeks ago.\n- So, you could come in and click that last link (which will show you the patch)\n\n
  • - From the patch page, you can review the code that has been submitted, \n- and you can download a copy of the patch to test it on your local install\n- Just click that grey link at the bottom that says “Original Format”\n\n
  • - After you’ve got that downloaded, to your desktop, drag it to your local WP install\n- It should be right there in the trunk directory\n
  • - Hop back over to terminal, and type svn status\n- This will show you any files that you’ve modified in trunk, or any file that has not been added via SVN\n- You can see that our diff files is sitting there\n
  • - Next type patch -p0 -i 21997.3.diff \n- This will apply the changes from patch file to your local instance of wordpress\n- It will give you an indication as to whether everything went okay or not\n
  • - Then you pull up your local install in the browser and test the changes that were just applied\n- And then go back to the ticket in Trac, and leave a comment stating how you tested it, \n- and whether the patch looks good or not.\n- Try to be as specific as possible (especially if you find something wrong with the patch).\n
  • - So let’s say you’ve made a change to you local install of wordpress, and you’d like to submit it as a patch.\n- The first thing you’ll want to do is type SVN up, and hit enter, \n- which will make sure you’re running the latest version of trunk, and ensure that you don’t have any conflicts\n
  • - Then run svn status to review the files with changes\n- You’ll see an M next to the wp-admin.css file\n- That means there are modifications to that file\n
  • - To review those modifications, you’ll type svn diff\n- This will allow you to review the actual diff of the files that were changed\n- You’ll see a minus sign on the left next to lines that were removed\n- And a plus sign next to new lines that have been added\n
  • - To export this diff to a file that can then be uploaded to the ticket, type svn diff > 21997.4.diff\n- The greater than sign exports it to a file\n- 21997 is the Trac ticket ID (this is just best practice)\n- Since this was a modification to an existing patch, I changed .3 to .4\n
  • - Then, when you check your local trunk directory, you should see that new .4.diff file\n- \n
  • - Go back to the ticket page, and click the “attach file” button\n
  • - And upload your new patch in the form that is provided.\n
  • - Last, go back to the ticket, and leave a detailed comment as to what was changed, and why.\n
  • - That’s all I’ve got for today.\n- Thanks for sticking around for the last session.\n- Any questions?\n
  • Contributing to WordPress core - a primer

    1. 1. How can I contribute to WordPress core? By Dave Martin - @lessbloat
    2. 2. I’m a new contributor.
    3. 3. Contributor
    4. 4. Lots of ways to help•Support •Translations•Documentation •Speaking•Testing •Run local classes•Design •Writing code
    5. 5. Front-end dev & Design
    6. 6. Outline• Communication • Intro to Trac• Release cycles • Intro to IRC• Decisions • Testing a patch• I have an idea • Creating a patch• Run trunk locally
    7. 7.
    8. 8. Release cycles 101• Planning• Design/Dev - 2 mo.• Beta’s - 1 mo.• Release Candidates - 1 mo.• Launch
    9. 9. Decisions
    10. 10. I’ve got an idea
    11. 11. Run trunk locally
    12. 12. Run trunk locally (XAMPP)
    13. 13. Run trunk locally Start Apache and MySQL
    14. 14. Run trunk locally/Applications/XAMPP/xamppfiles/htdocs
    15. 15. Run trunk locallycd /Applications/XAMPP/htdocs/wordpress
    16. 16. Run trunk locallysvn co
    17. 17. Run trunk locally localhost/phpmyadmin
    18. 18. Run trunk locally Edit your config
    19. 19. Run trunk locallyAdd your database connection info
    20. 20. Run trunk locallylocalhost/wordpress/trunk/
    21. 21. Intro to
    22. 22. Intro to IRC
    23. 23. Intro to
    24. 24. Intro to IRC#wordpress-dev#wordpress-ui
    25. 25. Testing a patch
    26. 26. Testing a patch
    27. 27. Testing a patch
    28. 28. Testing a patch svn status
    29. 29. Testing a patchpatch -p0 -i 21997.3.diff
    30. 30. Testing a patchlocalhost/wordpress/trunk/wp-admin
    31. 31. Creating a patch svn up
    32. 32. Creating a patch svn status
    33. 33. Creating a patch svn diff
    34. 34. Creating a patchsvn diff > 21997.4.diff
    35. 35. Creating a patch
    36. 36. Creating a patch
    37. 37. Creating a patch
    38. 38. Creating a patch
    39. 39. Questions?