Esempio n. 1
0
/**
 * Check dependencies and boot the API if possible.
 *
 * @since 0.1.0
 *
 * @uses "rest_api_init"
 */
function cwp_swp_api_boot()
{
    if (class_exists('SWP_Query') && defined('REST_API_VERSION') && version_compare(REST_API_VERSION, '2.0-beta2', '>=')) {
        $api = new calderawp\swp_api\route('post');
        $api->the_route();
    }
}