REST API purpose?

At its current state, it is a badly engineered feature that do not have any real advantage for a competent developer. The basic idea, as it stands at the time this answer is written, is to expose WordPress core functionality as JSON REST API. This will enable decoupling of the WordPress “business” logic from the … Read more

Does something like is_rest() exist

It’s a good point by @Milo, the REST_REQUEST constant is defined as true, within rest_api_loaded() if $GLOBALS[‘wp’]->query_vars[‘rest_route’] is non-empty. It’s hooked into parse_request via: add_action( ‘parse_request’, ‘rest_api_loaded’ ); but parse_request fires later than init – See for example the Codex here. There was a suggestion (by Daniel Bachhuber) in ticket #34373 regarding WP_Query::is_rest(), but it … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedusedueduseduseduseduedueduedus