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

Next Generation WordPress

Ryan McCue
February 07, 2017

Next Generation WordPress

Explore what we need to push into the next generation of the WordPress project.

Ryan McCue

February 07, 2017
Tweet

More Decks by Ryan McCue

Other Decks in Programming

Transcript

  1. 4.x

  2. DUX

  3. “What got us here, won’t get us there” — Matt

    Mullenweg, State of the Word 2016
  4. 2. Test wp_insert_post WP_Post::create $wpdb->insert( "INSERT INTO $wpdb->posts" ) exercise

    left to reader wp_set_post_categories() wp_set_post_tags() wp_slash()
  5. Routers $app = new \Slim\App; $app->get('/hello/{name}', function (Request $request, Response

    $response) { Slim Framework Route::get('user/{id}', function ($id) { Laravel Symfony class BlogController extends Controller { /** * @Route("/blog", name="blog_list") */ public function listAction() {
  6. 'index.php?rest_route=/$matches[1]' ); add_action( 'init', function () { global $wp; $wp->add_query_var(

    'rest_route' ); }); add_action( 'parse_request', function () { global $wp; if ( empty( $wp->query_vars['rest_route'] ) ) { return; } // Finally, do something. }); add_rewrite_rule( '^wp-json/(.*)?',
  7. function ( $matches ) { global $wp_query; $args = [

    'year' => $matches[1], 'monthnum' => $matches[2], ]; $wp_query = new WP_Query( $matches ); } ); add_rewrite_rule( 'archives/date/([0-9]{4})/([0-9]{1,2})/?$',
  8. <?php /** * Plugin Name: Amazing Plugin * Requires: other-plugin,

    rest-api */ add_plugin_dependencies( __FILE__, [ 'other-plugin', 'rest-api' ] );