{"action":"created","issue":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2251","repository_url":"https://api.github.com/repos/ThemeFuse/Unyson","labels_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2251/labels{/name}","comments_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2251/comments","events_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2251/events","html_url":"https://github.com/ThemeFuse/Unyson/pull/2251","id":195006956,"number":2251,"title":"Add the same options for different picker keys.","user":{"login":"mowshon","id":2056896,"avatar_url":"https://avatars.githubusercontent.com/u/2056896?v=3","gravatar_id":"","url":"https://api.github.com/users/mowshon","html_url":"https://github.com/mowshon","followers_url":"https://api.github.com/users/mowshon/followers","following_url":"https://api.github.com/users/mowshon/following{/other_user}","gists_url":"https://api.github.com/users/mowshon/gists{/gist_id}","starred_url":"https://api.github.com/users/mowshon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mowshon/subscriptions","organizations_url":"https://api.github.com/users/mowshon/orgs","repos_url":"https://api.github.com/users/mowshon/repos","events_url":"https://api.github.com/users/mowshon/events{/privacy}","received_events_url":"https://api.github.com/users/mowshon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-12T15:44:06Z","updated_at":"2016-12-12T21:05:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/pulls/2251","html_url":"https://github.com/ThemeFuse/Unyson/pull/2251","diff_url":"https://github.com/ThemeFuse/Unyson/pull/2251.diff","patch_url":"https://github.com/ThemeFuse/Unyson/pull/2251.patch"},"body":"Issue: #2247 \r\n\r\n## options.php\r\n\r\n```php\r\n$options = array(\r\n\t'elements' => array(\r\n\t\t'type'    => 'multi-picker',\r\n\t\t'label'   => false,\r\n\t\t'desc'    => false,\r\n\t\t'picker'  => array(\r\n\t\t\t'selected' => array(\r\n\t\t\t\t'label'   => __( 'Modify', 'fw' ),\r\n\t\t\t\t'type'    => 'radio',\r\n\t\t\t\t'inline'  => true,\r\n\t\t\t\t'value'   => 'link',\r\n\t\t\t\t'choices' => array(\r\n\t\t\t\t\t'logo' => __( 'Link', 'fw' ),\r\n\t\t\t\t\t'header-one' => __( 'Header One', 'fw' ),\r\n\t\t\t\t\t'header-two' => __( 'Header Two', 'fw' ),\r\n\t\t\t\t\t'footer' => __( 'Footer', 'fw' ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\r\n\t\t'choices' => array(\r\n\r\n\t\t\t'logo' => array(\r\n\t\t\t\t'title' => array('type' => 'text'),\r\n\t\t\t),\r\n\r\n\t\t\t// Options for `header-one` and `header-two`\r\n\t\t\tarray(\r\n\t\t\t\t'for' => array('header-one', 'header-two'),\r\n\t\t\t\t'options'   => array(\r\n\t\t\t\t\t'links' => array(\r\n\t\t\t\t\t\t'label' => __( 'Header Text', 'fw' ),\r\n\t\t\t\t\t\t'type'  => 'text',\r\n\t\t\t\t\t\t'value' => 'some text',\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\r\n\t\t\t'footer' => array(\r\n\t\t\t\t'copyright' => array('type' => 'text'),\r\n\t\t\t),\r\n\t\t),\r\n\t),\r\n);\r\n```\r\n\r\n## Result:\r\n![Result](https://i.gyazo.com/1cddcc446083fd45524b0a9f053bdbec.gif)"},"comment":{"url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/comments/266552500","html_url":"https://github.com/ThemeFuse/Unyson/pull/2251#issuecomment-266552500","issue_url":"https://api.github.com/repos/ThemeFuse/Unyson/issues/2251","id":266552500,"user":{"login":"danyj","id":2340172,"avatar_url":"https://avatars.githubusercontent.com/u/2340172?v=3","gravatar_id":"","url":"https://api.github.com/users/danyj","html_url":"https://github.com/danyj","followers_url":"https://api.github.com/users/danyj/followers","following_url":"https://api.github.com/users/danyj/following{/other_user}","gists_url":"https://api.github.com/users/danyj/gists{/gist_id}","starred_url":"https://api.github.com/users/danyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danyj/subscriptions","organizations_url":"https://api.github.com/users/danyj/orgs","repos_url":"https://api.github.com/users/danyj/repos","events_url":"https://api.github.com/users/danyj/events{/privacy}","received_events_url":"https://api.github.com/users/danyj/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T21:05:39Z","updated_at":"2016-12-12T21:05:39Z","body":"@mowshon , this works **only** if you have all options same for each key , but if you want to add only few same options it does not work , try this \r\n\r\n\r\n\r\n\r\n\r\n\t'elements' => array(\r\n\t\t'type'    => 'multi-picker',\r\n\t\t'label'   => false,\r\n\t\t'desc'    => false,\r\n\t\t'picker'  => array(\r\n\t\t\t'selected' => array(\r\n\t\t\t\t'label'   => __( 'Modify', 'fw' ),\r\n\t\t\t\t'type'    => 'radio',\r\n\t\t\t\t'inline'  => true,\r\n\t\t\t\t'value'   => 'link',\r\n\t\t\t\t'choices' => array(\r\n\t\t\t\t\t'logo' => __( 'Link', 'fw' ),\r\n\t\t\t\t\t'header-one' => __( 'Header One', 'fw' ),\r\n\t\t\t\t\t'header-two' => __( 'Header Two', 'fw' ),\r\n\t\t\t\t\t'footer' => __( 'Footer', 'fw' ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\r\n\t\t'choices' => array(\r\n\r\n\t\t\t'logo' => array(\r\n\t\t\t\t'title' => array('type' => 'text'),\r\n\t\t\t),\r\n\r\n\t\t\t// Options for `header-one` and `header-two`\r\n\t\t\tarray(\r\n\t\t\t\t'for' => array('header-one', 'header-two'),\r\n\t\t\t\t'options'   => array(\r\n\t\t\t\t\t'links' => array(\r\n\t\t\t\t\t\t'label' => __( 'Header Text', 'fw' ),\r\n\t\t\t\t\t\t'type'  => 'text',\r\n\t\t\t\t\t\t'value' => 'some text',\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t'header-one' => array(\r\n\t\t\t\t'something' => array('type' => 'text'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\t'header-two' => array(\r\n\t\t\t\t'somethingelse' => array('type' => 'text'),\r\n\t\t\t),\r\n\r\n\t\t\t'footer' => array(\r\n\t\t\t\t'copyright' => array('type' => 'text'),\r\n\t\t\t),\r\n\t\t),\r\n\t),"}}
{"actor":{"display_login":"danyj"}}