{"action":"created","issue":{"url":"https://api.github.com/repos/WebDevStudios/custom-post-type-ui/issues/211","labels_url":"https://api.github.com/repos/WebDevStudios/custom-post-type-ui/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/WebDevStudios/custom-post-type-ui/issues/211/comments","events_url":"https://api.github.com/repos/WebDevStudios/custom-post-type-ui/issues/211/events","html_url":"https://github.com/WebDevStudios/custom-post-type-ui/issues/211","id":56921499,"number":211,"title":"Export CPT indentation is just a little off (V1)","user":{"login":"JulienMelissas","id":2278221,"avatar_url":"https://avatars.githubusercontent.com/u/2278221?v=3","gravatar_id":"","url":"https://api.github.com/users/JulienMelissas","html_url":"https://github.com/JulienMelissas","followers_url":"https://api.github.com/users/JulienMelissas/followers","following_url":"https://api.github.com/users/JulienMelissas/following{/other_user}","gists_url":"https://api.github.com/users/JulienMelissas/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienMelissas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienMelissas/subscriptions","organizations_url":"https://api.github.com/users/JulienMelissas/orgs","repos_url":"https://api.github.com/users/JulienMelissas/repos","events_url":"https://api.github.com/users/JulienMelissas/events{/privacy}","received_events_url":"https://api.github.com/users/JulienMelissas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-07T18:56:33Z","updated_at":"2015-02-07T19:00:25Z","closed_at":null,"body":"This is under the assumption that we're following WP Coding standards...\r\nWhen exporting CPTs, the indentation from the export box is as follows:\r\n```\r\nadd_action( 'init', 'cptui_register_my_cpts' );\r\nfunction cptui_register_my_cpts() {\r\n\t$labels = array(\r\n\t\t'name' => 'Things',\r\n\t\t'singular_name' => 'Thing',\r\n\t\t'menu_name' => 'Things',\r\n\t\t'all_items' => 'All Things',\r\n\t\t'add_new' => 'Add New',\r\n\t\t'add_new_item' => 'Add New Thing',\r\n\t\t'edit' => 'Edit',\r\n\t\t'edit_item' => 'Edit Thing',\r\n\t\t'new_item' => 'New Thing',\r\n\t\t'view' => 'View',\r\n\t\t'view_item' => 'View Thing',\r\n\t\t'search_items' => 'Search Things',\r\n\t\t'not_found' => 'No Things Found',\r\n\t\t'not_found_in_trash' => 'No Things found in Trash',\r\n\t\t'parent' => 'Parent Thing',\r\n\t\t);\r\n\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => '',\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'has_archive' => false,\r\n\t\t'show_in_menu' => true,\r\n\t\t'exclude_from_search' => false,\r\n\t\t'capability_type' => 'post',\r\n\t\t'map_meta_cap' => true,\r\n\t\t'hierarchical' => false,\r\n\t\t'rewrite' => true,\r\n\t\t'query_var' => true,\r\n\t\t'menu_position' => 21,\t\t'menu_icon' => dashicons-businessman,\t\t'supports' => array( 'title', 'revisions', 'thumbnail' ),\t\t\t);\r\n\tregister_post_type( 'thing', $args );\r\n\r\n// End of cptui_register_my_cpts()\r\n}\r\n```\r\nwhen it should be (probably):\r\n```\r\nadd_action( 'init', 'cptui_register_my_cpts' );\r\nfunction cptui_register_my_cpts() {\r\n\t$labels = array(\r\n\t\t'name' => 'Things',\r\n\t\t'singular_name' => 'Thing',\r\n\t\t'menu_name' => 'Things',\r\n\t\t'all_items' => 'All Things',\r\n\t\t'add_new' => 'Add New',\r\n\t\t'add_new_item' => 'Add New Thing',\r\n\t\t'edit' => 'Edit',\r\n\t\t'edit_item' => 'Edit Thing',\r\n\t\t'new_item' => 'New Thing',\r\n\t\t'view' => 'View',\r\n\t\t'view_item' => 'View Thing',\r\n\t\t'search_items' => 'Search Things',\r\n\t\t'not_found' => 'No Things Found',\r\n\t\t'not_found_in_trash' => 'No Things found in Trash',\r\n\t\t'parent' => 'Parent Thing',\r\n\t);\r\n\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => '',\r\n\t\t'public' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'has_archive' => false,\r\n\t\t'show_in_menu' => true,\r\n\t\t'exclude_from_search' => false,\r\n\t\t'capability_type' => 'post',\r\n\t\t'map_meta_cap' => true,\r\n\t\t'hierarchical' => false,\r\n\t\t'rewrite' => true,\r\n\t\t'query_var' => true,\r\n\t\t'menu_position' => 21,\r\n\t\t'supports' => array( 'title', 'revisions', 'thumbnail' ),\r\n\t);\r\n\r\n\tregister_post_type( 'thing', $args );\r\n\r\n// End of cptui_register_my_cpts()\r\n}\r\n```\r\n\r\n(it seems that GitHub is converting the tabs to spaces - the plugin does generate tabs like it should)"},"comment":{"url":"https://api.github.com/repos/WebDevStudios/custom-post-type-ui/issues/comments/73377673","html_url":"https://github.com/WebDevStudios/custom-post-type-ui/issues/211#issuecomment-73377673","issue_url":"https://api.github.com/repos/WebDevStudios/custom-post-type-ui/issues/211","id":73377673,"user":{"login":"tw2113","id":484075,"avatar_url":"https://avatars.githubusercontent.com/u/484075?v=3","gravatar_id":"","url":"https://api.github.com/users/tw2113","html_url":"https://github.com/tw2113","followers_url":"https://api.github.com/users/tw2113/followers","following_url":"https://api.github.com/users/tw2113/following{/other_user}","gists_url":"https://api.github.com/users/tw2113/gists{/gist_id}","starred_url":"https://api.github.com/users/tw2113/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tw2113/subscriptions","organizations_url":"https://api.github.com/users/tw2113/orgs","repos_url":"https://api.github.com/users/tw2113/repos","events_url":"https://api.github.com/users/tw2113/events{/privacy}","received_events_url":"https://api.github.com/users/tw2113/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T19:00:25Z","updated_at":"2015-02-07T19:00:25Z","body":"Yeah, whitespacing in the export textareas...will always be a day-long fight. :) Enough to worry about just getting the proper data, quoting, and whatnot created, and not so much worry about exactly how it's laid out, as long as still valid.\r\n\r\nIf I recall, it also always seemed to change depending on how much there is to display."}}