Plugin Directory

Changeset 713159

Timestamp:
05/14/2013 09:39:22 PM (11 years ago)
Author:
jkudish
Message:

REST API: minor fixes for bbPress compatibility

  • bbPress supports anonymous topics, which means they'll have a post_author of 0. Which was throwing warnings in the API - fixed by detaching and allowing post_author of 0
  • metadata was not being unserialized if it was serialized, so we now unserialize it before passing it to the API
File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/class.json-api-endpoints.php

    r706443 r713159  
    888888        } else {
    889889            if ( isset( $author->post_author ) ) {
     890
     891
     892
    890893                $author = $author->post_author;
    891894            } elseif ( isset( $author->user_id ) && $author->user_id ) {
     
    14401443                        'id'    => $meta['meta_id'],
    14411444                        'key'   => $meta['meta_key'],
    1442                         'value' => $meta['meta_value']
     1445                        'value' =>
    14431446                    );
    14441447                }
Note: See TracChangeset for help on using the changeset viewer.