Changeset 44568 for trunk/src/wp-includes/rest-api.php
- Timestamp:
- 01/11/2019 06:18:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r44546 r44568 18 18 * Registers a REST API route. 19 19 * 20 * @since 4.4.0 20 * Note: Do not use before the {@see 'rest_api_init'} hook. 21 * 22 * @since 4.4.0 23 * @since 5.1.0 Added a _doing_it_wrong() notice when not called on or after the rest_api_init hook. 21 24 * 22 25 * @param string $namespace The first URL segment after core prefix. Should be unique to your package/plugin. … … 40 43 _doing_it_wrong( 'register_rest_route', __( 'Route must be specified.' ), '4.4.0' ); 41 44 return false; 45 } 46 47 if ( ! did_action( 'rest_api_init' ) ) { 48 _doing_it_wrong( 'register_rest_route', __( 'REST API routes must be registered on the rest_api_init action.' ), '5.1.0' ); 42 49 } 43 50
Note: See TracChangeset
for help on using the changeset viewer.