{"action":"created","issue":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/294","repository_url":"https://api.github.com/repos/eventespresso/event-espresso-core","labels_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/294/comments","events_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/294/events","html_url":"https://github.com/eventespresso/event-espresso-core/pull/294","id":313473906,"number":294,"title":"Convert Exception to EE_Error for sites messing with `plugin_dir_url`","user":{"login":"nerrad","id":1429108,"avatar_url":"https://avatars1.githubusercontent.com/u/1429108?v=4","gravatar_id":"","url":"https://api.github.com/users/nerrad","html_url":"https://github.com/nerrad","followers_url":"https://api.github.com/users/nerrad/followers","following_url":"https://api.github.com/users/nerrad/following{/other_user}","gists_url":"https://api.github.com/users/nerrad/gists{/gist_id}","starred_url":"https://api.github.com/users/nerrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerrad/subscriptions","organizations_url":"https://api.github.com/users/nerrad/orgs","repos_url":"https://api.github.com/users/nerrad/repos","events_url":"https://api.github.com/users/nerrad/events{/privacy}","received_events_url":"https://api.github.com/users/nerrad/received_events","type":"User","site_admin":false},"labels":[{"id":22687537,"url":"https://api.github.com/repos/eventespresso/event-espresso-core/labels/bug","name":"bug","color":"fc2929","default":true},{"id":839396544,"url":"https://api.github.com/repos/eventespresso/event-espresso-core/labels/has%20codebase%20ticket","name":"has codebase ticket","color":"c1c924","default":false}],"state":"open","locked":false,"assignee":{"login":"nerrad","id":1429108,"avatar_url":"https://avatars1.githubusercontent.com/u/1429108?v=4","gravatar_id":"","url":"https://api.github.com/users/nerrad","html_url":"https://github.com/nerrad","followers_url":"https://api.github.com/users/nerrad/followers","following_url":"https://api.github.com/users/nerrad/following{/other_user}","gists_url":"https://api.github.com/users/nerrad/gists{/gist_id}","starred_url":"https://api.github.com/users/nerrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerrad/subscriptions","organizations_url":"https://api.github.com/users/nerrad/orgs","repos_url":"https://api.github.com/users/nerrad/repos","events_url":"https://api.github.com/users/nerrad/events{/privacy}","received_events_url":"https://api.github.com/users/nerrad/received_events","type":"User","site_admin":false},"assignees":[{"login":"nerrad","id":1429108,"avatar_url":"https://avatars1.githubusercontent.com/u/1429108?v=4","gravatar_id":"","url":"https://api.github.com/users/nerrad","html_url":"https://github.com/nerrad","followers_url":"https://api.github.com/users/nerrad/followers","following_url":"https://api.github.com/users/nerrad/following{/other_user}","gists_url":"https://api.github.com/users/nerrad/gists{/gist_id}","starred_url":"https://api.github.com/users/nerrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nerrad/subscriptions","organizations_url":"https://api.github.com/users/nerrad/orgs","repos_url":"https://api.github.com/users/nerrad/repos","events_url":"https://api.github.com/users/nerrad/events{/privacy}","received_events_url":"https://api.github.com/users/nerrad/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-11T20:21:05Z","updated_at":"2018-04-12T16:16:51Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/pulls/294","html_url":"https://github.com/eventespresso/event-espresso-core/pull/294","diff_url":"https://github.com/eventespresso/event-espresso-core/pull/294.diff","patch_url":"https://github.com/eventespresso/event-espresso-core/pull/294.patch"},"body":"See https://events.codebasehq.com/projects/event-espresso/tickets/11493 for context.\r\n\r\nWhen `WP_DEBUG` is true, this will still throw an exception.  When not true, an `EE_Error` notice will be created instead (and only display in the admin).\r\n\r\nHere's what the notice appears like:\r\n\r\n![New notice](https://www.evernote.com/l/AAMtf_rf33ZNbYqThBhJtgKjMf35wcXoUT4B/image.png)\r\n\r\n## To Test\r\n\r\nYou can add the following code to some plugin (I just added it temporarily to the beginning fo the `espresso.php` file) to cause the conditions for the notice appearing:\r\n\r\n```\r\nadd_filter('plugins_url', function($url) {\r\n    return preg_replace_callback(\r\n        '!(https?://[^/|\"]+)([^\"]+)?!',\r\n        function($matches) {\r\n            if (isset($matches[0]) && $matches[0] === site_url()) {\r\n                return \"/\";\r\n            } elseif (isset($matches[0]) && strpos($matches[0], site_url()) !== false) {\r\n                return $matches[2];\r\n            } else {\r\n                return $matches[0];\r\n            }\r\n        },\r\n        $url\r\n    );\r\n});\r\n```\r\n\r\n* [ ] Using the above code, ensure that the error notice appears when `WP_DEBUG` is not defined or set to `false` and an exception is thrown when `WP_DEBUG` is defined and `true`.\r\n\r\nAlso please provide feedback (reviewer and tester) for actual content of notice.\r\n"},"comment":{"url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/comments/380861968","html_url":"https://github.com/eventespresso/event-espresso-core/pull/294#issuecomment-380861968","issue_url":"https://api.github.com/repos/eventespresso/event-espresso-core/issues/294","id":380861968,"user":{"login":"joshfeck","id":891156,"avatar_url":"https://avatars1.githubusercontent.com/u/891156?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfeck","html_url":"https://github.com/joshfeck","followers_url":"https://api.github.com/users/joshfeck/followers","following_url":"https://api.github.com/users/joshfeck/following{/other_user}","gists_url":"https://api.github.com/users/joshfeck/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfeck/subscriptions","organizations_url":"https://api.github.com/users/joshfeck/orgs","repos_url":"https://api.github.com/users/joshfeck/repos","events_url":"https://api.github.com/users/joshfeck/events{/privacy}","received_events_url":"https://api.github.com/users/joshfeck/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T16:16:51Z","updated_at":"2018-04-12T16:16:51Z","author_association":"CONTRIBUTOR","body":"The message is displayed on the front end of the site (not seeing a notice in the admin).\r\n\r\n![screen shot 2018-04-12 at 12 15 09 pm](https://user-images.githubusercontent.com/891156/38690146-5f7bcd02-3e4b-11e8-81ea-d2c29c48a50a.png)\r\n"}}
{"actor":{"display_login":"joshfeck"}}