Slide 1

Slide 1 text

Dr. Mirko Junge / Wikimedia Commons (CC)

Slide 2

Slide 2 text

Public domain

Slide 3

Slide 3 text

Brooklyn Museum / Wikimedia Commons

Slide 4

Slide 4 text

Brooklyn Museum / Wikimedia Commons

Slide 5

Slide 5 text

Christophe Finot / Wikimedia Commons (CC)

Slide 6

Slide 6 text

Contributing to WordPress Core Peter Wilson • peterwilson.cc • @pwcc

Slide 7

Slide 7 text

Contributing to WordPress Peter Wilson • peterwilson.cc • @pwcc

Slide 8

Slide 8 text

Contributing to WordPress Core Peter Wilson • peterwilson.cc • @pwcc

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

} else { $classes[] = 'page-template-default'; Index: /trunk/wp-includes/post-template.php ================================================================= --- /trunk/wp-includes/post-template.php (revision 18411) +++ /trunk/wp-includes/post-template.php (revision 18412) @@ -490,4 +490,6 @@ $classes[] = 'page-template'; $classes[] = 'page-template-' . sanitize_html_class( str_repla + } else { + $classes[] = 'page-template-default'; } } elseif ( is_search() ) {

Slide 11

Slide 11 text

Sites using WordPress Jan 2011 onward (%) 5.0% 10.0% 15.0% 20.0% 25.0% 30.0% 1 Jan 2011 1 Jan 2012 1 Jan 2013 1 Jan 2014 1 Jan 2015 1 Jan 2016 30 Jul 2016 w3techs.com, July 2016

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

wordpress.org/about/philosophy/

Slide 15

Slide 15 text

WordPress Core Trac core.trac.wordpress.org

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

core.trac.wordpress.org

Slide 18

Slide 18 text

core.trac.wordpress.org/browser

Slide 19

Slide 19 text

make.wordpress.org/core/reports/

Slide 20

Slide 20 text

core.trac.wordpress.org/my-comments

Slide 21

Slide 21 text

core.trac.wordpress.org/tickets/major

Slide 22

Slide 22 text

Boring

Slide 23

Slide 23 text

Sites using WordPress 5.0% 10.0% 15.0% 20.0% 25.0% 30.0% 1 Jan 2011 1 Jan 2012 1 Jan 2013 1 Jan 2014 1 Jan 2015 1 Jan 2016 30 Jul 2016 Boring

Slide 24

Slide 24 text

Checkout WordPress Core A version control love story.

Slide 25

Slide 25 text

Checkout WordPress via SVN wordpress-develop https://develop.svn.wordpress.org/trunk/ ↩ svn checkout ↩

Slide 26

Slide 26 text

Checkout WordPress Core A version control love story.

Slide 27

Slide 27 text

Clone WordPress via Git wordpress-develop git://develop.git.wordpress.org ↩ git clone ↩

Slide 28

Slide 28 text

Contribute with SVN or Git

Slide 29

Slide 29 text

Public domain

Slide 30

Slide 30 text

Public domain

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

Contributing within five minutes

Slide 40

Slide 40 text

localhost/phpmyadmin

Slide 41

Slide 41 text

localhost/phpmyadmin

Slide 42

Slide 42 text

localhost

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

core.trac.wordpress.org/tickets/good-first-bugs

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

Creating a patch

Slide 51

Slide 51 text

~$ git pull Updating 470a9fa..e7a6afc Fast-forward src/wp-includes/js/swfupload/swfupload.js|2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ~$

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

WordCamp Easter Egg

Slide 54

Slide 54 text

WordCamp Easter Egg

Slide 55

Slide 55 text

WordCamp Easter Egg

Slide 56

Slide 56 text

WordCamp Easter Egg

Slide 57

Slide 57 text

WordCamp Easter Egg

Slide 58

Slide 58 text

WordCamp Easter Egg

Slide 59

Slide 59 text

Public domain

Slide 60

Slide 60 text

Malcolm Best (CC)

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

This is what happens in a world without standards.

Slide 65

Slide 65 text

Saroar Zubair (CC), flic.kr/p/a1ePPd

Slide 66

Slide 66 text

WordPress Coding Standards

Slide 67

Slide 67 text

WordPress Coding Standards

Slide 68

Slide 68 text

Spaces

Slide 69

Slide 69 text

No inline control structures

Slide 70

Slide 70 text

No inline control structures

Slide 71

Slide 71 text

No inline control structures

Slide 72

Slide 72 text

Single quotes preferred

Slide 73

Slide 73 text

Yoda Conditions

Slide 74

Slide 74 text

=== != ==

Slide 75

Slide 75 text

Uploading a patch

Slide 76

Slide 76 text

WordCamp Easter Egg } } $title = get_the_title( $post_id ); if ( 'WordCamp Singapore' === $title ) { $classes[] = sanitize_html_class( 'September, 2016' ); } if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id);

Slide 77

Slide 77 text

WordCamp Easter Egg } } $title = get_the_title( $post_id ); if ( 'WordCamp Singapore' === $title ) { $classes[] = sanitize_html_class( 'September, 2016' ); } if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); src/wp-includes/post-template.php

Slide 78

Slide 78 text

WordCamp Easter Egg git diff

Slide 79

Slide 79 text

WordCamp Easter Egg diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 7994f89..f1a0cad 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -614,6 +614,11 @@ function get_body_class( $class = '' ) { } } + $title = get_the_title( $post_id ); + if ( 'WordCamp Singapore' === $title ) { + $classes[] = sanitize_html_class( 'September, 2016' ); + } + if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/'...

Slide 80

Slide 80 text

WordCamp Easter Egg diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 7994f89..f1a0cad 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -614,6 +614,11 @@ function get_body_class( $class = '' ) { } } + $title = get_the_title( $post_id ); + if ( 'WordCamp Singapore' === $title ) { + $classes[] = sanitize_html_class( 'September, 2016' ); + } + if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/'...

Slide 81

Slide 81 text

WordCamp Easter Egg diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 7994f89..f1a0cad 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -614,6 +614,11 @@ function get_body_class( $class = '' ) { } } + $title = get_the_title( $post_id ); + if ( 'WordCamp Singapore' === $title ) { + $classes[] = sanitize_html_class( 'September, 2016' ); + } + if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/'...

Slide 82

Slide 82 text

WordCamp Easter Egg diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 7994f89..f1a0cad 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -614,6 +614,11 @@ function get_body_class( $class = '' ) { } } + $title = get_the_title( $post_id ); + if ( 'WordCamp Singapore' === $title ) { + $classes[] = sanitize_html_class( 'September, 2016' ); + } + if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/'...

Slide 83

Slide 83 text

WordCamp Easter Egg diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 7994f89..f1a0cad 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -614,6 +614,11 @@ function get_body_class( $class = '' ) { } } + $title = get_the_title( $post_id ); + if ( 'WordCamp Singapore' === $title ) { + $classes[] = sanitize_html_class( 'September, 2016' ); + } + if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/'...

Slide 84

Slide 84 text

WordCamp Easter Egg diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 7994f89..f1a0cad 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -614,6 +614,11 @@ function get_body_class( $class = '' ) { } } + $title = get_the_title( $post_id ); + if ( 'WordCamp Singapore' === $title ) { + $classes[] = sanitize_html_class( 'September, 2016' ); + } + if ( is_attachment() ) { $mime_type = get_post_mime_type($post_id); $mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/'...

Slide 85

Slide 85 text

Generating a patch > ~/Downloads/37941.diff git diff

Slide 86

Slide 86 text

git diff Generating a patch > ~/Downloads/37941.diff

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

You retain the copyright. You license your code to WordPress

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

No content

Slide 93

Slide 93 text

Let the code reviews begin

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

flic.kr/p/y35dEE (CC)

Slide 96

Slide 96 text

Hack WordPress core, contribute code back.

Slide 97

Slide 97 text

Hack WordPress docs, contribute docs back.

Slide 98

Slide 98 text

Translate WordPress, help spread the word.

Slide 99

Slide 99 text

Contribute however you can, however you feel comfortable.

Slide 100

Slide 100 text

Thank you Peter Wilson • peterwilson.cc • @pwcc