Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Contributing code to WordPress core

Contributing code to WordPress core

Peter Wilson

October 21, 2015
Tweet

More Decks by Peter Wilson

Other Decks in Programming

Transcript

  1. WPMelb Easter Egg <?php // inside get_post_class if ($title ==

    "WordPress Melbourne") $classes[] = "wpmelb";
  2. WPMelb Easter Egg <?php // inside get_post_class $title = get_the_title($post_id);

    if ($title == "WordPress Melbourne") $classes[] = "wpmelb";
  3. WPMelb Easter Egg <?php // inside get_post_class $title = get_the_title($post_id);

    if ("WordPress Melbourne" == $title) $classes[] = "wpmelb";
  4. WPMelb Easter Egg <?php // inside get_post_class $title = get_the_title(

    $post_id ); if ( "WordPress Melbourne" == $title ) $classes[] = "wpmelb";
  5. WPMelb Easter Egg <?php // inside get_post_class $title = get_the_title(

    $post_id ); if ( "WordPress Melbourne" == $title ) { $classes[] = "wpmelb"; }
  6. WPMelb Easter Egg <?php // inside get_post_class $title = get_the_title(

    $post_id ); if ( "WordPress Melbourne" == $title ) { $classes[] = "wpmelb"; $classes[] = "wordpress-melbourne"; }
  7. WPMelb Easter Egg <?php // inside get_post_class $title = get_the_title(

    $post_id ); if ( "WordPress Melbourne" == $title ) { $classes[] = "wpmelb"; }
  8. #32831 WP Melb Easter Egg $classes[] = 'post-' . $post->ID;

    $title = get_the_title( $post_id ); if ( "WordPress Melbourne" == $title ) { $classes[] = "wpmelb"; } if ( ! is_admin() ) src/wp-includes/post-template.php
  9. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  10. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  11. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  12. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  13. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  14. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  15. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff diff

    --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 92ccf45..6d46d22 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -436,6 +436,11 @@ function get_post_class( $class = '', $post_id = null ) { } $classes[] = 'post-' . $post->ID; + $title = get_the_title( $post_id ); + if ( "WordPress Melbourne" == $title ) { + $classes[] = "wpmelb"; + } + if ( ! is_admin() ) $classes[] = $post->post_type; $classes[] = 'type-' . $post->post_type;
  16. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$
  17. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$
  18. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$
  19. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$
  20. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$
  21. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$
  22. #32831 WP Melb Easter Egg wptrac peterwilson$ git diff >

    ~/Downloads/32831.1.diff wptrac peterwilson$