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

WordPress: The good parts

WordPress: The good parts

Presentation to the PHP community about some awesome parts about WordPress core (yes they do exist).

B3acbabfdd208ecbf950d864b86fe968?s=128

Anton Timmermans

May 12, 2015
Tweet

More Decks by Anton Timmermans

Other Decks in Technology

Transcript

  1. WordPress The good parts

  2. Who am I? • Anton Timmermans • Full time WordPress

    Developer • Core Contributor & developer.wordpress.org • @atimmer10
  3. The WordPress way

  4. The hook system

  5. Hook system add_filter( 'some_filter', 'callable_to_execute' ); apply_filters( 'some_filter', 'value_to_change' );

    add_action( 'some_action', 'callable_to_execute' ); do_action( 'some_action' );
  6. The loop <?php while ( have_posts() ) : the_post(); ?>

    <article <?php post_class(); ?>> <h2><?php the_title(); ?></h2> <?php the_content(); ?> </article> <?php endwhile; ?>
  7. Content aware functions • wpautop • wptexturize
 
 "holiday" ->

    “holiday”
  8. Smart elegance • DAY_IN_SECONDS, YEAR_IN_SECONDS • __return_false, __return_zero, __return_empty_array

  9. Backwards compatibility • Write with confidence • Follow the WordPress

    way! • It’s a feature
  10. Test suite

  11. Even more…

  12. Discussion / Q&A