{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/amp-wp/issues/1246","repository_url":"https://api.github.com/repos/Automattic/amp-wp","labels_url":"https://api.github.com/repos/Automattic/amp-wp/issues/1246/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/issues/1246/comments","events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/1246/events","html_url":"https://github.com/Automattic/amp-wp/pull/1246","id":338041834,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MDczODYz","number":1246,"title":"Use $mode_mutable to only disable Template Mode <input> elements in some cases.","user":{"login":"kienstra","id":4063887,"node_id":"MDQ6VXNlcjQwNjM4ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/4063887?v=4","gravatar_id":"","url":"https://api.github.com/users/kienstra","html_url":"https://github.com/kienstra","followers_url":"https://api.github.com/users/kienstra/followers","following_url":"https://api.github.com/users/kienstra/following{/other_user}","gists_url":"https://api.github.com/users/kienstra/gists{/gist_id}","starred_url":"https://api.github.com/users/kienstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kienstra/subscriptions","organizations_url":"https://api.github.com/users/kienstra/orgs","repos_url":"https://api.github.com/users/kienstra/repos","events_url":"https://api.github.com/users/kienstra/events{/privacy}","received_events_url":"https://api.github.com/users/kienstra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-03T20:21:42Z","updated_at":"2018-07-03T20:53:02Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/Automattic/amp-wp/pulls/1246","html_url":"https://github.com/Automattic/amp-wp/pull/1246","diff_url":"https://github.com/Automattic/amp-wp/pull/1246.diff","patch_url":"https://github.com/Automattic/amp-wp/pull/1246.patch"},"body":"**Request For Review**\r\n\r\nHi @westonruter,\r\nCould you please review this PR for #1245? It might not be the correct solution. \r\n\r\nBut it worked locally to avoid disabling the `<input>` elements for the Template Modes.\r\n\r\nIf I understand this right, it looks like the `<input>` elements for \"Classic,\" \"Paired,\" and \"Native\" should only be disabled (or hidden) if the theme passes a `'mode'` argument, like:\r\n```php\r\nadd_theme_support( 'amp', array(\r\n\t'mode' => 'native',\r\n) );\r\n```\r\nThen, it would look like:\r\n<img width=\"1273\" alt=\"theme-support-mode\" src=\"https://user-images.githubusercontent.com/4063887/42242901-29140f66-7ed5-11e8-96a3-4aca3a0e5198.png\">\r\n\r\n\r\nStill, I might not have understood the intent."},"comment":{"url":"https://api.github.com/repos/Automattic/amp-wp/issues/comments/402288725","html_url":"https://github.com/Automattic/amp-wp/pull/1246#issuecomment-402288725","issue_url":"https://api.github.com/repos/Automattic/amp-wp/issues/1246","id":402288725,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjI4ODcyNQ==","user":{"login":"kienstra","id":4063887,"node_id":"MDQ6VXNlcjQwNjM4ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/4063887?v=4","gravatar_id":"","url":"https://api.github.com/users/kienstra","html_url":"https://github.com/kienstra","followers_url":"https://api.github.com/users/kienstra/followers","following_url":"https://api.github.com/users/kienstra/following{/other_user}","gists_url":"https://api.github.com/users/kienstra/gists{/gist_id}","starred_url":"https://api.github.com/users/kienstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kienstra/subscriptions","organizations_url":"https://api.github.com/users/kienstra/orgs","repos_url":"https://api.github.com/users/kienstra/repos","events_url":"https://api.github.com/users/kienstra/events{/privacy}","received_events_url":"https://api.github.com/users/kienstra/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T20:53:02Z","updated_at":"2018-07-03T20:53:02Z","author_association":"COLLABORATOR","body":"Also, even with this PR, it's not possible to select \"Classic,\" and see it after clicking \"Save Changes.\" \r\n\r\n**Steps To Reproduce**\r\n\r\n1. Activate Twenty Seventeen\r\n2. Go to the \"AMP Settings\" page\r\n3. Select \"Template Mode\" > \"Classic\"\r\n4. Click \"Save Changes\"\r\n5. Expected: \"Classic\" is selected\r\n6. Actual: \"Native\" is selected\r\n\r\n<img width=\"865\" alt=\"native-amp-settings\" src=\"https://user-images.githubusercontent.com/4063887/42243952-a4061914-7ed8-11e8-96d9-5c5876ee4483.png\">\r\n\r\nIt looks like it saves the \"Classic\" option correctly (as `'disabled'`).\r\n\r\n<img width=\"916\" alt=\"change-theme-support\" src=\"https://user-images.githubusercontent.com/4063887/42244070-18701aac-7ed9-11e8-9be9-2339b14db0da.png\">\r\n"}}
{"actor":{"display_login":"kienstra"}}