<?php
add_action( 'rest_api_init', 'drk_posts_styles_field' );

function drk_posts_styles_field() {

    register_rest_field(
        array('news','forum','tutorials','marketplace','other_services','telegram','vender'),
        'all_styles',
        [
            'get_callback'    => 'wp_styles',
            'schema'          => null,
        ]
    );
    register_rest_field(
        array('news','forum','tutorials','marketplace','other_services','telegram','vender'),
        'all_scripts',
        [
            'get_callback'    => 'wp_scripts',
            'schema'          => null,
        ]
    );
}

