{"action":"created","comment":{"url":"https://api.github.com/repos/10up/ElasticPress/pulls/comments/28772840","id":28772840,"diff_hunk":"@@ -298,6 +311,58 @@ public function filter_posts_request( $request, $query ) {\n \t}\n \n \t/**\n+\t * Get post object data in multisite network.\n+\t * Using post ID is better as get_post function pupulates all possible fields\n+\t * So passing post ID and then merging with inital post object pupulates all expected fields\n+\t * for WP_Post object\n+\t *\n+\t * @param  array $post_list list of found post objects\n+\t * @return array            list of WP_Post objects\n+\t */\n+\tpublic function fetch_wp_post_object( $post_list ) {","path":"classes/class-ep-wp-query-integration.php","position":null,"original_position":39,"commit_id":"9c1d110457b8a6d126a766c49ad72a294764e37a","original_commit_id":"b1e4abbeacc40848229b74355c03d8bfe9953e3c","user":{"login":"EduardMaghakyan","id":4201328,"avatar_url":"https://avatars.githubusercontent.com/u/4201328?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardMaghakyan","html_url":"https://github.com/EduardMaghakyan","followers_url":"https://api.github.com/users/EduardMaghakyan/followers","following_url":"https://api.github.com/users/EduardMaghakyan/following{/other_user}","gists_url":"https://api.github.com/users/EduardMaghakyan/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardMaghakyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardMaghakyan/subscriptions","organizations_url":"https://api.github.com/users/EduardMaghakyan/orgs","repos_url":"https://api.github.com/users/EduardMaghakyan/repos","events_url":"https://api.github.com/users/EduardMaghakyan/events{/privacy}","received_events_url":"https://api.github.com/users/EduardMaghakyan/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2015-04-21T12:30:03Z","updated_at":"2015-04-21T12:30:03Z","html_url":"https://github.com/10up/ElasticPress/pull/239#discussion_r28772840","pull_request_url":"https://api.github.com/repos/10up/ElasticPress/pulls/239","_links":{"self":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/comments/28772840"},"html":{"href":"https://github.com/10up/ElasticPress/pull/239#discussion_r28772840"},"pull_request":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/239"}}},"pull_request":{"url":"https://api.github.com/repos/10up/ElasticPress/pulls/239","id":32957977,"html_url":"https://github.com/10up/ElasticPress/pull/239","diff_url":"https://github.com/10up/ElasticPress/pull/239.diff","patch_url":"https://github.com/10up/ElasticPress/pull/239.patch","issue_url":"https://api.github.com/repos/10up/ElasticPress/issues/239","number":239,"state":"open","locked":false,"title":"use post id in get_post to enrich the post object and make it possible for multisite","user":{"login":"EduardMaghakyan","id":4201328,"avatar_url":"https://avatars.githubusercontent.com/u/4201328?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardMaghakyan","html_url":"https://github.com/EduardMaghakyan","followers_url":"https://api.github.com/users/EduardMaghakyan/followers","following_url":"https://api.github.com/users/EduardMaghakyan/following{/other_user}","gists_url":"https://api.github.com/users/EduardMaghakyan/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardMaghakyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardMaghakyan/subscriptions","organizations_url":"https://api.github.com/users/EduardMaghakyan/orgs","repos_url":"https://api.github.com/users/EduardMaghakyan/repos","events_url":"https://api.github.com/users/EduardMaghakyan/events{/privacy}","received_events_url":"https://api.github.com/users/EduardMaghakyan/received_events","type":"User","site_admin":false},"body":"fix for #235 \r\nJust passing post ID as argument to get_post will override some data in the initial post object and will not work on multisite, but it's better to use as it will return all possible fields. Then merging it with the initial object populates all fields and keeps the initial values.\r\nI've added additional function to make this method work for multisite as well.\r\n","created_at":"2015-04-09T13:59:28Z","updated_at":"2015-04-21T12:30:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ba571e91fb65494ee88e861695a24a0f8983f02","assignee":null,"milestone":{"url":"https://api.github.com/repos/10up/ElasticPress/milestones/10","html_url":"https://github.com/10up/ElasticPress/milestones/Version%201.4","labels_url":"https://api.github.com/repos/10up/ElasticPress/milestones/10/labels","id":962255,"number":10,"title":"Version 1.4","description":"","creator":{"login":"tlovett1","id":1844351,"avatar_url":"https://avatars.githubusercontent.com/u/1844351?v=3","gravatar_id":"","url":"https://api.github.com/users/tlovett1","html_url":"https://github.com/tlovett1","followers_url":"https://api.github.com/users/tlovett1/followers","following_url":"https://api.github.com/users/tlovett1/following{/other_user}","gists_url":"https://api.github.com/users/tlovett1/gists{/gist_id}","starred_url":"https://api.github.com/users/tlovett1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlovett1/subscriptions","organizations_url":"https://api.github.com/users/tlovett1/orgs","repos_url":"https://api.github.com/users/tlovett1/repos","events_url":"https://api.github.com/users/tlovett1/events{/privacy}","received_events_url":"https://api.github.com/users/tlovett1/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":10,"state":"open","created_at":"2015-02-02T20:28:25Z","updated_at":"2015-04-20T20:28:46Z","due_on":"2015-05-01T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/10up/ElasticPress/pulls/239/commits","review_comments_url":"https://api.github.com/repos/10up/ElasticPress/pulls/239/comments","review_comment_url":"https://api.github.com/repos/10up/ElasticPress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/10up/ElasticPress/issues/239/comments","statuses_url":"https://api.github.com/repos/10up/ElasticPress/statuses/9c1d110457b8a6d126a766c49ad72a294764e37a","head":{"label":"EduardMaghakyan:bug/filter_request","ref":"bug/filter_request","sha":"9c1d110457b8a6d126a766c49ad72a294764e37a","user":{"login":"EduardMaghakyan","id":4201328,"avatar_url":"https://avatars.githubusercontent.com/u/4201328?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardMaghakyan","html_url":"https://github.com/EduardMaghakyan","followers_url":"https://api.github.com/users/EduardMaghakyan/followers","following_url":"https://api.github.com/users/EduardMaghakyan/following{/other_user}","gists_url":"https://api.github.com/users/EduardMaghakyan/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardMaghakyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardMaghakyan/subscriptions","organizations_url":"https://api.github.com/users/EduardMaghakyan/orgs","repos_url":"https://api.github.com/users/EduardMaghakyan/repos","events_url":"https://api.github.com/users/EduardMaghakyan/events{/privacy}","received_events_url":"https://api.github.com/users/EduardMaghakyan/received_events","type":"User","site_admin":false},"repo":{"id":33322656,"name":"ElasticPress","full_name":"EduardMaghakyan/ElasticPress","owner":{"login":"EduardMaghakyan","id":4201328,"avatar_url":"https://avatars.githubusercontent.com/u/4201328?v=3","gravatar_id":"","url":"https://api.github.com/users/EduardMaghakyan","html_url":"https://github.com/EduardMaghakyan","followers_url":"https://api.github.com/users/EduardMaghakyan/followers","following_url":"https://api.github.com/users/EduardMaghakyan/following{/other_user}","gists_url":"https://api.github.com/users/EduardMaghakyan/gists{/gist_id}","starred_url":"https://api.github.com/users/EduardMaghakyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EduardMaghakyan/subscriptions","organizations_url":"https://api.github.com/users/EduardMaghakyan/orgs","repos_url":"https://api.github.com/users/EduardMaghakyan/repos","events_url":"https://api.github.com/users/EduardMaghakyan/events{/privacy}","received_events_url":"https://api.github.com/users/EduardMaghakyan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EduardMaghakyan/ElasticPress","description":"A plugin for integrating WordPress with Elasticsearch","fork":true,"url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress","forks_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/forks","keys_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/teams","hooks_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/hooks","issue_events_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/issues/events{/number}","events_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/events","assignees_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/assignees{/user}","branches_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/branches{/branch}","tags_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/tags","blobs_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/git/refs{/sha}","trees_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/statuses/{sha}","languages_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/languages","stargazers_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/stargazers","contributors_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/contributors","subscribers_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/subscribers","subscription_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/subscription","commits_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/commits{/sha}","git_commits_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/git/commits{/sha}","comments_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/comments{/number}","issue_comment_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/issues/comments{/number}","contents_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/contents/{+path}","compare_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/merges","archive_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/downloads","issues_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/issues{/number}","pulls_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/pulls{/number}","milestones_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/milestones{/number}","notifications_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/labels{/name}","releases_url":"https://api.github.com/repos/EduardMaghakyan/ElasticPress/releases{/id}","created_at":"2015-04-02T17:38:04Z","updated_at":"2015-04-15T17:51:20Z","pushed_at":"2015-04-21T12:27:05Z","git_url":"git://github.com/EduardMaghakyan/ElasticPress.git","ssh_url":"git@github.com:EduardMaghakyan/ElasticPress.git","clone_url":"https://github.com/EduardMaghakyan/ElasticPress.git","svn_url":"https://github.com/EduardMaghakyan/ElasticPress","homepage":"","size":656,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"10up:develop","ref":"develop","sha":"829c6f5f3de5058f62afeaeac2abd6c6059a2fb0","user":{"login":"10up","id":3358927,"avatar_url":"https://avatars.githubusercontent.com/u/3358927?v=3","gravatar_id":"","url":"https://api.github.com/users/10up","html_url":"https://github.com/10up","followers_url":"https://api.github.com/users/10up/followers","following_url":"https://api.github.com/users/10up/following{/other_user}","gists_url":"https://api.github.com/users/10up/gists{/gist_id}","starred_url":"https://api.github.com/users/10up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10up/subscriptions","organizations_url":"https://api.github.com/users/10up/orgs","repos_url":"https://api.github.com/users/10up/repos","events_url":"https://api.github.com/users/10up/events{/privacy}","received_events_url":"https://api.github.com/users/10up/received_events","type":"Organization","site_admin":false},"repo":{"id":20672392,"name":"ElasticPress","full_name":"10up/ElasticPress","owner":{"login":"10up","id":3358927,"avatar_url":"https://avatars.githubusercontent.com/u/3358927?v=3","gravatar_id":"","url":"https://api.github.com/users/10up","html_url":"https://github.com/10up","followers_url":"https://api.github.com/users/10up/followers","following_url":"https://api.github.com/users/10up/following{/other_user}","gists_url":"https://api.github.com/users/10up/gists{/gist_id}","starred_url":"https://api.github.com/users/10up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10up/subscriptions","organizations_url":"https://api.github.com/users/10up/orgs","repos_url":"https://api.github.com/users/10up/repos","events_url":"https://api.github.com/users/10up/events{/privacy}","received_events_url":"https://api.github.com/users/10up/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/10up/ElasticPress","description":"A plugin for integrating WordPress with Elasticsearch","fork":false,"url":"https://api.github.com/repos/10up/ElasticPress","forks_url":"https://api.github.com/repos/10up/ElasticPress/forks","keys_url":"https://api.github.com/repos/10up/ElasticPress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/10up/ElasticPress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/10up/ElasticPress/teams","hooks_url":"https://api.github.com/repos/10up/ElasticPress/hooks","issue_events_url":"https://api.github.com/repos/10up/ElasticPress/issues/events{/number}","events_url":"https://api.github.com/repos/10up/ElasticPress/events","assignees_url":"https://api.github.com/repos/10up/ElasticPress/assignees{/user}","branches_url":"https://api.github.com/repos/10up/ElasticPress/branches{/branch}","tags_url":"https://api.github.com/repos/10up/ElasticPress/tags","blobs_url":"https://api.github.com/repos/10up/ElasticPress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/10up/ElasticPress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/10up/ElasticPress/git/refs{/sha}","trees_url":"https://api.github.com/repos/10up/ElasticPress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/10up/ElasticPress/statuses/{sha}","languages_url":"https://api.github.com/repos/10up/ElasticPress/languages","stargazers_url":"https://api.github.com/repos/10up/ElasticPress/stargazers","contributors_url":"https://api.github.com/repos/10up/ElasticPress/contributors","subscribers_url":"https://api.github.com/repos/10up/ElasticPress/subscribers","subscription_url":"https://api.github.com/repos/10up/ElasticPress/subscription","commits_url":"https://api.github.com/repos/10up/ElasticPress/commits{/sha}","git_commits_url":"https://api.github.com/repos/10up/ElasticPress/git/commits{/sha}","comments_url":"https://api.github.com/repos/10up/ElasticPress/comments{/number}","issue_comment_url":"https://api.github.com/repos/10up/ElasticPress/issues/comments{/number}","contents_url":"https://api.github.com/repos/10up/ElasticPress/contents/{+path}","compare_url":"https://api.github.com/repos/10up/ElasticPress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/10up/ElasticPress/merges","archive_url":"https://api.github.com/repos/10up/ElasticPress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/10up/ElasticPress/downloads","issues_url":"https://api.github.com/repos/10up/ElasticPress/issues{/number}","pulls_url":"https://api.github.com/repos/10up/ElasticPress/pulls{/number}","milestones_url":"https://api.github.com/repos/10up/ElasticPress/milestones{/number}","notifications_url":"https://api.github.com/repos/10up/ElasticPress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/10up/ElasticPress/labels{/name}","releases_url":"https://api.github.com/repos/10up/ElasticPress/releases{/id}","created_at":"2014-06-10T04:29:30Z","updated_at":"2015-04-20T21:19:50Z","pushed_at":"2015-04-21T12:27:05Z","git_url":"git://github.com/10up/ElasticPress.git","ssh_url":"git@github.com:10up/ElasticPress.git","clone_url":"https://github.com/10up/ElasticPress.git","svn_url":"https://github.com/10up/ElasticPress","homepage":"","size":2841,"stargazers_count":117,"watchers_count":117,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":28,"forks":27,"open_issues":28,"watchers":117,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/239"},"html":{"href":"https://github.com/10up/ElasticPress/pull/239"},"issue":{"href":"https://api.github.com/repos/10up/ElasticPress/issues/239"},"comments":{"href":"https://api.github.com/repos/10up/ElasticPress/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/10up/ElasticPress/statuses/9c1d110457b8a6d126a766c49ad72a294764e37a"}}}}