{"action":"created","issue":{"url":"https://api.github.com/repos/defries/404-redirected/issues/6","repository_url":"https://api.github.com/repos/defries/404-redirected","labels_url":"https://api.github.com/repos/defries/404-redirected/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/defries/404-redirected/issues/6/comments","events_url":"https://api.github.com/repos/defries/404-redirected/issues/6/events","html_url":"https://github.com/defries/404-redirected/issues/6","id":159765153,"number":6,"title":"Query arguments are being removed","user":{"login":"defries","id":411524,"avatar_url":"https://avatars.githubusercontent.com/u/411524?v=3","gravatar_id":"","url":"https://api.github.com/users/defries","html_url":"https://github.com/defries","followers_url":"https://api.github.com/users/defries/followers","following_url":"https://api.github.com/users/defries/following{/other_user}","gists_url":"https://api.github.com/users/defries/gists{/gist_id}","starred_url":"https://api.github.com/users/defries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defries/subscriptions","organizations_url":"https://api.github.com/users/defries/orgs","repos_url":"https://api.github.com/users/defries/repos","events_url":"https://api.github.com/users/defries/events{/privacy}","received_events_url":"https://api.github.com/users/defries/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-06-11T09:32:55Z","updated_at":"2016-06-29T12:00:28Z","closed_at":"2016-06-29T11:45:19Z","body":"<!--\r\nThanks for contributing to 404 Redirected! Enter a clear title (e.g. \"Search error when using plus sign\") and proceed.\r\n-->\r\n\r\n#### What I Expected To Happen\r\nI'm trying to add query args to my links.\r\n\r\n#### What Happened Instead\r\nThey keep getting stripped off the url when this plugin is activated\r\n\r\n#### Steps to Reproduce the Bug\r\nAdd query args to any existing URL and you'll see they're being stripped.\r\n\r\n#### Possible fix\r\n```\r\nclass Bypass404Redirect {\r\n\tfunction __construct(){\r\n\t\tadd_action('template_redirect', array($this, 'strip'), 9);\r\n\t\tadd_action('template_redirect', array($this, 'restore'), 11);\r\n\t}\r\n\tprivate $uri = '';\r\n\r\n\tfunction strip(){\r\n\t\t$this->uri = $_SERVER['REQUEST_URI'];\r\n\t\t$_SERVER['REQUEST_URI'] = preg_replace('/\\?.*/', '', $_SERVER['REQUEST_URI']);\r\n\t}\r\n\r\n\tfunction restore(){\r\n\t\t$_SERVER['REQUEST_URI'] = $this->uri;\r\n\t}\r\n}\r\nnew Bypass404Redirect();\r\n```\r\n[From the forums](https://wordpress.org/support/topic/query-arg-is-removed?replies=3) Props @daanmeijer\r\n<!--\r\nPLEASE NOTE:\r\n- These comments won't show up when you submit the issue.\r\n- Try to add as much detail as possible. Be specific!\r\n- GitHub issues aren't for support! If you have questions, use the forums here https://wordpress.org/support/plugin/404-redirected\r\n- If you're requesting a new feature, explain why you'd like it to be added.\r\n-->"},"comment":{"url":"https://api.github.com/repos/defries/404-redirected/issues/comments/229335664","html_url":"https://github.com/defries/404-redirected/issues/6#issuecomment-229335664","issue_url":"https://api.github.com/repos/defries/404-redirected/issues/6","id":229335664,"user":{"login":"defries","id":411524,"avatar_url":"https://avatars.githubusercontent.com/u/411524?v=3","gravatar_id":"","url":"https://api.github.com/users/defries","html_url":"https://github.com/defries","followers_url":"https://api.github.com/users/defries/followers","following_url":"https://api.github.com/users/defries/following{/other_user}","gists_url":"https://api.github.com/users/defries/gists{/gist_id}","starred_url":"https://api.github.com/users/defries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/defries/subscriptions","organizations_url":"https://api.github.com/users/defries/orgs","repos_url":"https://api.github.com/users/defries/repos","events_url":"https://api.github.com/users/defries/events{/privacy}","received_events_url":"https://api.github.com/users/defries/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T12:00:28Z","updated_at":"2016-06-29T12:00:28Z","body":"> To avoid any potential complications, it may be best to revert to the class suggested at the beginning of the ticket rather than fixing the initial code.\r\n\r\nI agree"}}
{"actor":{"display_login":"defries"}}