Need to 'prepare_post' data
-
Plugin looks fantastic Ryan!
Just a quick question…check this out
I included a preview of the results im getting, would it be possible to use the API to format the post_meta.post_object to become like the rest of the api, ex: (instead of ‘post_author‘ it would be ‘author‘ etc… )Also i notice the author data isnt completed like in the result you give, so my question really is
1. Is there a way to ‘prepare_post’ for data outside the API server. (some kind of local php client ??? )
2. What do you suggest
{ ID: 1, title: "Test", status: "publish", type: "page", author: { ... }, content: "<h1>Lorem ipsum dolor sit amet ... ", parent: 0, link: "https://domain.top/test", date: "2014-11-25T14:50:20+00:00", modified: "2014-11-25T21:20:23+00:00", format: "standard", slug: "test", ... post_meta: { post_object: { ID: 1, post_author: "1", post_date: "2014-11-01 04:33:09", post_date_gmt: "2014-11-01 04:33:09", post_content: "Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!", post_title: "Hello world!", post_excerpt: "", post_status: "publish", comment_status: "open", ping_status: "open", post_password: "", post_name: "hello-world", to_ping: "", pinged: "", post_modified: "2014-11-01 04:33:09", post_modified_gmt: "2014-11-01 04:33:09", post_content_filtered: "", post_parent: 0, guid: "https://domain.top/?p=1", menu_order: 0, post_type: "post", post_mime_type: "", comment_count: "1", filter: "raw" }, user: { ID: 1, user_firstname: "", user_lastname: "", nickname: "...", user_nicename: "...", display_name: "...", user_email: "...", user_url: "", user_registered: "2014-11-01 04:33:09", user_description: "", user_avatar: "<img alt='' src='...' class='avatar avatar-96 photo' height='96' width='96' />" }, }, featured_image: null, terms: [ ] }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Need to 'prepare_post' data’ is closed to new replies.