{"action":"created","issue":{"url":"https://api.github.com/repos/pkp/pkp-lib/issues/1468","repository_url":"https://api.github.com/repos/pkp/pkp-lib","labels_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1468/labels{/name}","comments_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1468/comments","events_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1468/events","html_url":"https://github.com/pkp/pkp-lib/issues/1468","id":155462513,"number":1468,"title":"[UI] Themes hook in even when not enabled","user":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars.githubusercontent.com/u/2306629?v=3","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pkp/pkp-lib/labels/Open%20Journal%20Systems","name":"Open Journal Systems","color":"aabbaa"},{"url":"https://api.github.com/repos/pkp/pkp-lib/labels/Open%20Monograph%20Press","name":"Open Monograph Press","color":"a2c6dc"}],"state":"open","locked":false,"assignee":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars.githubusercontent.com/u/2306629?v=3","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/pkp/pkp-lib/milestones/9","html_url":"https://github.com/pkp/pkp-lib/milestones/OJS%203.0","labels_url":"https://api.github.com/repos/pkp/pkp-lib/milestones/9/labels","id":1008389,"number":9,"title":"OJS 3.0","description":"This is the initial release of OJS 3.0, a major rewrite of OJS 2.x including a front-end overhaul pioneered in OMP.\r\n\r\nTechnically, OJS 3.0 represents a comprehensive modernization of OJS, featuring a Javascript framework with JQuery/JQueryUI, a styling overhaul featuring LessPHP, and better use of PHP5 constructs.\r\n\r\nFor end users, OJS 3.0 provides a much fresher user experience. Many long-standing UI/UX issues in OJS 2.x have been reworked and better future-proofed.","creator":{"login":"asmecher","id":200411,"avatar_url":"https://avatars.githubusercontent.com/u/200411?v=3","gravatar_id":"","url":"https://api.github.com/users/asmecher","html_url":"https://github.com/asmecher","followers_url":"https://api.github.com/users/asmecher/followers","following_url":"https://api.github.com/users/asmecher/following{/other_user}","gists_url":"https://api.github.com/users/asmecher/gists{/gist_id}","starred_url":"https://api.github.com/users/asmecher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmecher/subscriptions","organizations_url":"https://api.github.com/users/asmecher/orgs","repos_url":"https://api.github.com/users/asmecher/repos","events_url":"https://api.github.com/users/asmecher/events{/privacy}","received_events_url":"https://api.github.com/users/asmecher/received_events","type":"User","site_admin":false},"open_issues":58,"closed_issues":39,"state":"open","created_at":"2015-03-05T22:48:57Z","updated_at":"2016-05-23T09:35:35Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-05-18T10:01:35Z","updated_at":"2016-05-24T11:46:40Z","closed_at":null,"body":"If a theme [hooks in to do things like print JavaScript](https://github.com/pkp/ojs/blob/master/plugins/themes/default/DefaultThemePlugin.inc.php#L25), they execute the hooks whether they're currently enabled or not.\r\n\r\nThe obvious solution is to just check if the theme is active before registering a hook. If there's a risk of lots of badly coded themes not doing this, we might set up a specific architecture for hook registration which is gated \"under the hood\" so themers don't need to be aware of this."},"comment":{"url":"https://api.github.com/repos/pkp/pkp-lib/issues/comments/221244534","html_url":"https://github.com/pkp/pkp-lib/issues/1468#issuecomment-221244534","issue_url":"https://api.github.com/repos/pkp/pkp-lib/issues/1468","id":221244534,"user":{"login":"asmecher","id":200411,"avatar_url":"https://avatars.githubusercontent.com/u/200411?v=3","gravatar_id":"","url":"https://api.github.com/users/asmecher","html_url":"https://github.com/asmecher","followers_url":"https://api.github.com/users/asmecher/followers","following_url":"https://api.github.com/users/asmecher/following{/other_user}","gists_url":"https://api.github.com/users/asmecher/gists{/gist_id}","starred_url":"https://api.github.com/users/asmecher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmecher/subscriptions","organizations_url":"https://api.github.com/users/asmecher/orgs","repos_url":"https://api.github.com/users/asmecher/repos","events_url":"https://api.github.com/users/asmecher/events{/privacy}","received_events_url":"https://api.github.com/users/asmecher/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T11:46:40Z","updated_at":"2016-05-24T11:46:40Z","body":"The `ThemePlugin` subclass should take care of mapping hooks etc. into a sensible API that hides the details from the theme implementer, but ideally without limiting the themer should they want more control over how the system behaves. So I'm ambivalent about changing the loading behavior, but if we do have examples of theme plugins that need to register hooks, I wonder whether that indicates that the `ThemePlugin` should enrich its API to move that out of the theme."}}
{"actor":{"display_login":"asmecher"}}