Viewing 2 replies - 1 through 2 (of 2 total)
  • Me too i`m looking for this option, but it looks missing from the plugin!!!

    michael.faeth

    (@michaelfaeth)

    try

    class My_Theme_Json_Api {
    
        public function __construct() {
            add_filter('json_api_encode', array( $this, 'json_api_encode') );
        }
    
        public function json_api_encode( $data ) {
    
            if (isset($_GET['exclude_fields'])) {
                // ... parse and unset fields here...
            }
    
            return $data;
        }
    }
    
    new My_Theme_Json_Api();
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘exclude subfields from request’ is closed to new replies.