Make WordPress Core

Changeset 34928


Ignore:
Timestamp:
10/08/2015 02:30:18 AM (8 years ago)
Author:
rmccue
Message:

REST API: Introduce baby API to the world.

Baby API was born at 2.8KLOC on October 8th at 2:30 UTC. API has lots
of growing to do, so wish it the best of luck.

Thanks to everyone who helped along the way:

Props rmccue, rachelbaker, danielbachhuber, joehoyle, drewapicture,
adamsilverstein, netweb, tlovett1, shelob9, kadamwhite, pento,
westonruter, nikv, tobych, redsweater, alecuf, pollyplummer, hurtige,
bpetty, oso96_2000, ericlewis, wonderboymusic, joshkadis, mordauk,
jdgrimes, johnbillion, jeremyfelt, thiago-negri, jdolan, pkevan,
iseulde, thenbrent, maxcutler, kwight, markoheijnen, phh, natewr,
jjeaton, shprink, mattheu, quasel, jmusal, codebykat, hubdotcom,
tapsboy, QWp6t, pushred, jaredcobb, justinsainton, japh, matrixik,
jorbin, frozzare, codfish, michael-arestad, kellbot, ironpaperweight,
simonlampen, alisspers, eliorivero, davidbhayes, JohnDittmar, dimadin,
traversal, cmmarslender, Toddses, kokarn, welcher, and ericpedia.

Fixes #33982.

Location:
trunk
Files:
13 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r34903 r34928  
    204204
    205205add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 );
     206
     207// REST API filters.
     208add_action( 'xmlrpc_rsd_apis',            'rest_output_rsd' );
     209add_action( 'wp_head',                    'rest_output_link_wp_head', 10, 0 );
     210add_action( 'template_redirect',          'rest_output_link_header', 11, 0 );
     211add_action( 'auth_cookie_malformed',      'rest_cookie_collect_status' );
     212add_action( 'auth_cookie_expired',        'rest_cookie_collect_status' );
     213add_action( 'auth_cookie_bad_username',   'rest_cookie_collect_status' );
     214add_action( 'auth_cookie_bad_hash',       'rest_cookie_collect_status' );
     215add_action( 'auth_cookie_valid',          'rest_cookie_collect_status' );
     216add_filter( 'rest_authentication_errors', 'rest_cookie_check_errors', 100 );
    206217
    207218// Actions
     
    348359add_action( 'edit_user_created_user', 'wp_send_new_user_notifications' );
    349360
     361// REST API actions.
     362add_action( 'init',          'rest_api_init' );
     363add_action( 'rest_api_init', 'rest_api_default_filters', 10, 1 );
     364add_action( 'parse_request', 'rest_api_loaded' );
     365
    350366/**
    351367 * Filters formerly mixed into wp-includes
  • trunk/src/wp-settings.php

    r34903 r34928  
    155155require( ABSPATH . WPINC . '/nav-menu-template.php' );
    156156require( ABSPATH . WPINC . '/admin-bar.php' );
     157require( ABSPATH . WPINC . '/rest-api.php' );
    157158
    158159// Load multisite-specific files.
  • trunk/tests/phpunit/includes/bootstrap.php

    r34872 r34928  
    9191
    9292require dirname( __FILE__ ) . '/testcase.php';
     93require dirname( __FILE__ ) . '/testcase-rest-api.php';
    9394require dirname( __FILE__ ) . '/testcase-xmlrpc.php';
    9495require dirname( __FILE__ ) . '/testcase-ajax.php';
     
    9697require dirname( __FILE__ ) . '/exceptions.php';
    9798require dirname( __FILE__ ) . '/utils.php';
     99require dirname( __FILE__ ) . '/spy-rest-server.php';
    98100
    99101/**
Note: See TracChangeset for help on using the changeset viewer.