rest = new API( $polylang->model ); add_action( 'rest_api_init', array( $polylang->rest, 'init' ) ); } );