add_action('rest_api_init', function() { register_rest_field( 'post', 'slap_count', // ... getters and settings ); });. Note: wrap your register_rest_field ...
確定! 回上一頁