{"action":"created","issue":{"url":"https://api.github.com/repos/rilwis/meta-box/issues/859","repository_url":"https://api.github.com/repos/rilwis/meta-box","labels_url":"https://api.github.com/repos/rilwis/meta-box/issues/859/labels{/name}","comments_url":"https://api.github.com/repos/rilwis/meta-box/issues/859/comments","events_url":"https://api.github.com/repos/rilwis/meta-box/issues/859/events","html_url":"https://github.com/rilwis/meta-box/issues/859","id":154147174,"number":859,"title":"Idea: Merge input fields into 1 \"input\" field","user":{"login":"rilwis","id":668274,"avatar_url":"https://avatars.githubusercontent.com/u/668274?v=3","gravatar_id":"","url":"https://api.github.com/users/rilwis","html_url":"https://github.com/rilwis","followers_url":"https://api.github.com/users/rilwis/followers","following_url":"https://api.github.com/users/rilwis/following{/other_user}","gists_url":"https://api.github.com/users/rilwis/gists{/gist_id}","starred_url":"https://api.github.com/users/rilwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rilwis/subscriptions","organizations_url":"https://api.github.com/users/rilwis/orgs","repos_url":"https://api.github.com/users/rilwis/repos","events_url":"https://api.github.com/users/rilwis/events{/privacy}","received_events_url":"https://api.github.com/users/rilwis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-11T02:29:31Z","updated_at":"2016-05-11T06:27:56Z","closed_at":null,"body":"I just have an idea to optimize code for input fields. We have several similar input fields such as text, url, email, password, slider where the implementation is almost the same.\n\nI'm thinking about a new way to merge them into 1 universal input field where we need only 1 file for all.\n\nThe concept is similar to WordPress implementation of Customizer field (see class-wp-customize-control.php, method render_content()) that can be separated into following steps:\n\n- Set default fallback to field['type'] = input if there is no field class exists\n- Output the field using <input type=\"field['type']\" {attributes}>\n\nIf we do it well, we can remove some files and keep the plugin smaller.\n\nWe can start with text field and similar fields (email, url), not radio or checkbox."},"comment":{"url":"https://api.github.com/repos/rilwis/meta-box/issues/comments/218373100","html_url":"https://github.com/rilwis/meta-box/issues/859#issuecomment-218373100","issue_url":"https://api.github.com/repos/rilwis/meta-box/issues/859","id":218373100,"user":{"login":"rilwis","id":668274,"avatar_url":"https://avatars.githubusercontent.com/u/668274?v=3","gravatar_id":"","url":"https://api.github.com/users/rilwis","html_url":"https://github.com/rilwis","followers_url":"https://api.github.com/users/rilwis/followers","following_url":"https://api.github.com/users/rilwis/following{/other_user}","gists_url":"https://api.github.com/users/rilwis/gists{/gist_id}","starred_url":"https://api.github.com/users/rilwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rilwis/subscriptions","organizations_url":"https://api.github.com/users/rilwis/orgs","repos_url":"https://api.github.com/users/rilwis/repos","events_url":"https://api.github.com/users/rilwis/events{/privacy}","received_events_url":"https://api.github.com/users/rilwis/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T06:27:56Z","updated_at":"2016-05-11T06:27:56Z","body":"No, we don't try to put all input into 1 input field. I just want to use 1 code for super-similar fields like text, url, email."}}