{"action":"opened","number":4917,"pull_request":{"url":"https://api.github.com/repos/pods-framework/pods/pulls/4917","id":186255097,"html_url":"https://github.com/pods-framework/pods/pull/4917","diff_url":"https://github.com/pods-framework/pods/pull/4917.diff","patch_url":"https://github.com/pods-framework/pods/pull/4917.patch","issue_url":"https://api.github.com/repos/pods-framework/pods/issues/4917","number":4917,"state":"open","locked":false,"title":"Handle saving related values if passed as an array of information","user":{"login":"sc0ttkclark","id":709662,"avatar_url":"https://avatars2.githubusercontent.com/u/709662?v=4","gravatar_id":"","url":"https://api.github.com/users/sc0ttkclark","html_url":"https://github.com/sc0ttkclark","followers_url":"https://api.github.com/users/sc0ttkclark/followers","following_url":"https://api.github.com/users/sc0ttkclark/following{/other_user}","gists_url":"https://api.github.com/users/sc0ttkclark/gists{/gist_id}","starred_url":"https://api.github.com/users/sc0ttkclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sc0ttkclark/subscriptions","organizations_url":"https://api.github.com/users/sc0ttkclark/orgs","repos_url":"https://api.github.com/users/sc0ttkclark/repos","events_url":"https://api.github.com/users/sc0ttkclark/events{/privacy}","received_events_url":"https://api.github.com/users/sc0ttkclark/received_events","type":"User","site_admin":false},"body":"Examples below use a \"book\" pick field, multiple select, related to a \"book\" custom post type created or extended by Pods).\r\n\r\n---\r\n\r\n## Example 1\r\n\r\n```\r\n$pod = pods( 'author', 1234 );\r\n\r\n$data = array(\r\n    'books' => array(\r\n        array(\r\n            'post_title' => 'Book 1',\r\n            'post_content' => 'Some content',\r\n            'some_custom_field' => 'Value here',\r\n        ),\r\n    ),\r\n);\r\n\r\n$pod->save( $data );\r\n```\r\n\r\nExpectation would be that the above code would save a new value for the related book field.\r\n\r\n---\r\n\r\n## Example 2\r\n\r\n```\r\n$pod = pods( 'author', 1234 );\r\n\r\n$data = array(\r\n    'books' => array(\r\n        array(\r\n            'ID' => 1234,\r\n            'post_title' => 'Book 1',\r\n            'post_content' => 'Some new content',\r\n            'some_custom_field' => 'New value here',\r\n        ),\r\n    ),\r\n);\r\n\r\n$pod->save( $data );\r\n```\r\n\r\nExpectation would be that the above code would update the data for the the related book field.","created_at":"2018-05-07T04:54:28Z","updated_at":"2018-05-07T04:54:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"sc0ttkclark","id":709662,"avatar_url":"https://avatars2.githubusercontent.com/u/709662?v=4","gravatar_id":"","url":"https://api.github.com/users/sc0ttkclark","html_url":"https://github.com/sc0ttkclark","followers_url":"https://api.github.com/users/sc0ttkclark/followers","following_url":"https://api.github.com/users/sc0ttkclark/following{/other_user}","gists_url":"https://api.github.com/users/sc0ttkclark/gists{/gist_id}","starred_url":"https://api.github.com/users/sc0ttkclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sc0ttkclark/subscriptions","organizations_url":"https://api.github.com/users/sc0ttkclark/orgs","repos_url":"https://api.github.com/users/sc0ttkclark/repos","events_url":"https://api.github.com/users/sc0ttkclark/events{/privacy}","received_events_url":"https://api.github.com/users/sc0ttkclark/received_events","type":"User","site_admin":false},"assignees":[{"login":"sc0ttkclark","id":709662,"avatar_url":"https://avatars2.githubusercontent.com/u/709662?v=4","gravatar_id":"","url":"https://api.github.com/users/sc0ttkclark","html_url":"https://github.com/sc0ttkclark","followers_url":"https://api.github.com/users/sc0ttkclark/followers","following_url":"https://api.github.com/users/sc0ttkclark/following{/other_user}","gists_url":"https://api.github.com/users/sc0ttkclark/gists{/gist_id}","starred_url":"https://api.github.com/users/sc0ttkclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sc0ttkclark/subscriptions","organizations_url":"https://api.github.com/users/sc0ttkclark/orgs","repos_url":"https://api.github.com/users/sc0ttkclark/repos","events_url":"https://api.github.com/users/sc0ttkclark/events{/privacy}","received_events_url":"https://api.github.com/users/sc0ttkclark/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":153311,"url":"https://api.github.com/repos/pods-framework/pods/labels/Feature","name":"Feature","color":"95BF3B","default":false}],"milestone":{"url":"https://api.github.com/repos/pods-framework/pods/milestones/63","html_url":"https://github.com/pods-framework/pods/milestone/63","labels_url":"https://api.github.com/repos/pods-framework/pods/milestones/63/labels","id":1469365,"number":63,"title":"Pods 2.8","description":"","creator":{"login":"sc0ttkclark","id":709662,"avatar_url":"https://avatars2.githubusercontent.com/u/709662?v=4","gravatar_id":"","url":"https://api.github.com/users/sc0ttkclark","html_url":"https://github.com/sc0ttkclark","followers_url":"https://api.github.com/users/sc0ttkclark/followers","following_url":"https://api.github.com/users/sc0ttkclark/following{/other_user}","gists_url":"https://api.github.com/users/sc0ttkclark/gists{/gist_id}","starred_url":"https://api.github.com/users/sc0ttkclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sc0ttkclark/subscriptions","organizations_url":"https://api.github.com/users/sc0ttkclark/orgs","repos_url":"https://api.github.com/users/sc0ttkclark/repos","events_url":"https://api.github.com/users/sc0ttkclark/events{/privacy}","received_events_url":"https://api.github.com/users/sc0ttkclark/received_events","type":"User","site_admin":false},"open_issues":75,"closed_issues":6,"state":"open","created_at":"2015-12-21T11:04:57Z","updated_at":"2018-05-07T04:54:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/pods-framework/pods/pulls/4917/commits","review_comments_url":"https://api.github.com/repos/pods-framework/pods/pulls/4917/comments","review_comment_url":"https://api.github.com/repos/pods-framework/pods/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pods-framework/pods/issues/4917/comments","statuses_url":"https://api.github.com/repos/pods-framework/pods/statuses/279674e299b56ae1705d006328b50389c1ebd72d","head":{"label":"pods-framework:feature/save-related-data","ref":"feature/save-related-data","sha":"279674e299b56ae1705d006328b50389c1ebd72d","user":{"login":"pods-framework","id":1049430,"avatar_url":"https://avatars1.githubusercontent.com/u/1049430?v=4","gravatar_id":"","url":"https://api.github.com/users/pods-framework","html_url":"https://github.com/pods-framework","followers_url":"https://api.github.com/users/pods-framework/followers","following_url":"https://api.github.com/users/pods-framework/following{/other_user}","gists_url":"https://api.github.com/users/pods-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/pods-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pods-framework/subscriptions","organizations_url":"https://api.github.com/users/pods-framework/orgs","repos_url":"https://api.github.com/users/pods-framework/repos","events_url":"https://api.github.com/users/pods-framework/events{/privacy}","received_events_url":"https://api.github.com/users/pods-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":1570020,"name":"pods","full_name":"pods-framework/pods","owner":{"login":"pods-framework","id":1049430,"avatar_url":"https://avatars1.githubusercontent.com/u/1049430?v=4","gravatar_id":"","url":"https://api.github.com/users/pods-framework","html_url":"https://github.com/pods-framework","followers_url":"https://api.github.com/users/pods-framework/followers","following_url":"https://api.github.com/users/pods-framework/following{/other_user}","gists_url":"https://api.github.com/users/pods-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/pods-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pods-framework/subscriptions","organizations_url":"https://api.github.com/users/pods-framework/orgs","repos_url":"https://api.github.com/users/pods-framework/repos","events_url":"https://api.github.com/users/pods-framework/events{/privacy}","received_events_url":"https://api.github.com/users/pods-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pods-framework/pods","description":"The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.","fork":false,"url":"https://api.github.com/repos/pods-framework/pods","forks_url":"https://api.github.com/repos/pods-framework/pods/forks","keys_url":"https://api.github.com/repos/pods-framework/pods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pods-framework/pods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pods-framework/pods/teams","hooks_url":"https://api.github.com/repos/pods-framework/pods/hooks","issue_events_url":"https://api.github.com/repos/pods-framework/pods/issues/events{/number}","events_url":"https://api.github.com/repos/pods-framework/pods/events","assignees_url":"https://api.github.com/repos/pods-framework/pods/assignees{/user}","branches_url":"https://api.github.com/repos/pods-framework/pods/branches{/branch}","tags_url":"https://api.github.com/repos/pods-framework/pods/tags","blobs_url":"https://api.github.com/repos/pods-framework/pods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pods-framework/pods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pods-framework/pods/git/refs{/sha}","trees_url":"https://api.github.com/repos/pods-framework/pods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pods-framework/pods/statuses/{sha}","languages_url":"https://api.github.com/repos/pods-framework/pods/languages","stargazers_url":"https://api.github.com/repos/pods-framework/pods/stargazers","contributors_url":"https://api.github.com/repos/pods-framework/pods/contributors","subscribers_url":"https://api.github.com/repos/pods-framework/pods/subscribers","subscription_url":"https://api.github.com/repos/pods-framework/pods/subscription","commits_url":"https://api.github.com/repos/pods-framework/pods/commits{/sha}","git_commits_url":"https://api.github.com/repos/pods-framework/pods/git/commits{/sha}","comments_url":"https://api.github.com/repos/pods-framework/pods/comments{/number}","issue_comment_url":"https://api.github.com/repos/pods-framework/pods/issues/comments{/number}","contents_url":"https://api.github.com/repos/pods-framework/pods/contents/{+path}","compare_url":"https://api.github.com/repos/pods-framework/pods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pods-framework/pods/merges","archive_url":"https://api.github.com/repos/pods-framework/pods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pods-framework/pods/downloads","issues_url":"https://api.github.com/repos/pods-framework/pods/issues{/number}","pulls_url":"https://api.github.com/repos/pods-framework/pods/pulls{/number}","milestones_url":"https://api.github.com/repos/pods-framework/pods/milestones{/number}","notifications_url":"https://api.github.com/repos/pods-framework/pods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pods-framework/pods/labels{/name}","releases_url":"https://api.github.com/repos/pods-framework/pods/releases{/id}","deployments_url":"https://api.github.com/repos/pods-framework/pods/deployments","created_at":"2011-04-05T00:45:14Z","updated_at":"2018-05-06T18:40:27Z","pushed_at":"2018-05-07T04:48:30Z","git_url":"git://github.com/pods-framework/pods.git","ssh_url":"git@github.com:pods-framework/pods.git","clone_url":"https://github.com/pods-framework/pods.git","svn_url":"https://github.com/pods-framework/pods","homepage":"https://pods.io/","size":29748,"stargazers_count":687,"watchers_count":687,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":210,"mirror_url":null,"archived":false,"open_issues_count":819,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":210,"open_issues":819,"watchers":687,"default_branch":"2.x"}},"base":{"label":"pods-framework:2.x","ref":"2.x","sha":"ec599a717f5dca8981c5e9dd14e01ca784495a3f","user":{"login":"pods-framework","id":1049430,"avatar_url":"https://avatars1.githubusercontent.com/u/1049430?v=4","gravatar_id":"","url":"https://api.github.com/users/pods-framework","html_url":"https://github.com/pods-framework","followers_url":"https://api.github.com/users/pods-framework/followers","following_url":"https://api.github.com/users/pods-framework/following{/other_user}","gists_url":"https://api.github.com/users/pods-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/pods-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pods-framework/subscriptions","organizations_url":"https://api.github.com/users/pods-framework/orgs","repos_url":"https://api.github.com/users/pods-framework/repos","events_url":"https://api.github.com/users/pods-framework/events{/privacy}","received_events_url":"https://api.github.com/users/pods-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":1570020,"name":"pods","full_name":"pods-framework/pods","owner":{"login":"pods-framework","id":1049430,"avatar_url":"https://avatars1.githubusercontent.com/u/1049430?v=4","gravatar_id":"","url":"https://api.github.com/users/pods-framework","html_url":"https://github.com/pods-framework","followers_url":"https://api.github.com/users/pods-framework/followers","following_url":"https://api.github.com/users/pods-framework/following{/other_user}","gists_url":"https://api.github.com/users/pods-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/pods-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pods-framework/subscriptions","organizations_url":"https://api.github.com/users/pods-framework/orgs","repos_url":"https://api.github.com/users/pods-framework/repos","events_url":"https://api.github.com/users/pods-framework/events{/privacy}","received_events_url":"https://api.github.com/users/pods-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pods-framework/pods","description":"The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.","fork":false,"url":"https://api.github.com/repos/pods-framework/pods","forks_url":"https://api.github.com/repos/pods-framework/pods/forks","keys_url":"https://api.github.com/repos/pods-framework/pods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pods-framework/pods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pods-framework/pods/teams","hooks_url":"https://api.github.com/repos/pods-framework/pods/hooks","issue_events_url":"https://api.github.com/repos/pods-framework/pods/issues/events{/number}","events_url":"https://api.github.com/repos/pods-framework/pods/events","assignees_url":"https://api.github.com/repos/pods-framework/pods/assignees{/user}","branches_url":"https://api.github.com/repos/pods-framework/pods/branches{/branch}","tags_url":"https://api.github.com/repos/pods-framework/pods/tags","blobs_url":"https://api.github.com/repos/pods-framework/pods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pods-framework/pods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pods-framework/pods/git/refs{/sha}","trees_url":"https://api.github.com/repos/pods-framework/pods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pods-framework/pods/statuses/{sha}","languages_url":"https://api.github.com/repos/pods-framework/pods/languages","stargazers_url":"https://api.github.com/repos/pods-framework/pods/stargazers","contributors_url":"https://api.github.com/repos/pods-framework/pods/contributors","subscribers_url":"https://api.github.com/repos/pods-framework/pods/subscribers","subscription_url":"https://api.github.com/repos/pods-framework/pods/subscription","commits_url":"https://api.github.com/repos/pods-framework/pods/commits{/sha}","git_commits_url":"https://api.github.com/repos/pods-framework/pods/git/commits{/sha}","comments_url":"https://api.github.com/repos/pods-framework/pods/comments{/number}","issue_comment_url":"https://api.github.com/repos/pods-framework/pods/issues/comments{/number}","contents_url":"https://api.github.com/repos/pods-framework/pods/contents/{+path}","compare_url":"https://api.github.com/repos/pods-framework/pods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pods-framework/pods/merges","archive_url":"https://api.github.com/repos/pods-framework/pods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pods-framework/pods/downloads","issues_url":"https://api.github.com/repos/pods-framework/pods/issues{/number}","pulls_url":"https://api.github.com/repos/pods-framework/pods/pulls{/number}","milestones_url":"https://api.github.com/repos/pods-framework/pods/milestones{/number}","notifications_url":"https://api.github.com/repos/pods-framework/pods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pods-framework/pods/labels{/name}","releases_url":"https://api.github.com/repos/pods-framework/pods/releases{/id}","deployments_url":"https://api.github.com/repos/pods-framework/pods/deployments","created_at":"2011-04-05T00:45:14Z","updated_at":"2018-05-06T18:40:27Z","pushed_at":"2018-05-07T04:48:30Z","git_url":"git://github.com/pods-framework/pods.git","ssh_url":"git@github.com:pods-framework/pods.git","clone_url":"https://github.com/pods-framework/pods.git","svn_url":"https://github.com/pods-framework/pods","homepage":"https://pods.io/","size":29748,"stargazers_count":687,"watchers_count":687,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":210,"mirror_url":null,"archived":false,"open_issues_count":819,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":210,"open_issues":819,"watchers":687,"default_branch":"2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/pods-framework/pods/pulls/4917"},"html":{"href":"https://github.com/pods-framework/pods/pull/4917"},"issue":{"href":"https://api.github.com/repos/pods-framework/pods/issues/4917"},"comments":{"href":"https://api.github.com/repos/pods-framework/pods/issues/4917/comments"},"review_comments":{"href":"https://api.github.com/repos/pods-framework/pods/pulls/4917/comments"},"review_comment":{"href":"https://api.github.com/repos/pods-framework/pods/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pods-framework/pods/pulls/4917/commits"},"statuses":{"href":"https://api.github.com/repos/pods-framework/pods/statuses/279674e299b56ae1705d006328b50389c1ebd72d"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":27,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"sc0ttkclark"}}