{"action":"created","issue":{"url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/58","labels_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/58/comments","events_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/58/events","html_url":"https://github.com/qTranslate-Team/qtranslate-x/issues/58","id":59354156,"number":58,"title":"Add/remove content hooks dynamically","user":{"login":"funkjedi","id":9314,"avatar_url":"https://avatars.githubusercontent.com/u/9314?v=3","gravatar_id":"","url":"https://api.github.com/users/funkjedi","html_url":"https://github.com/funkjedi","followers_url":"https://api.github.com/users/funkjedi/followers","following_url":"https://api.github.com/users/funkjedi/following{/other_user}","gists_url":"https://api.github.com/users/funkjedi/gists{/gist_id}","starred_url":"https://api.github.com/users/funkjedi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkjedi/subscriptions","organizations_url":"https://api.github.com/users/funkjedi/orgs","repos_url":"https://api.github.com/users/funkjedi/repos","events_url":"https://api.github.com/users/funkjedi/events{/privacy}","received_events_url":"https://api.github.com/users/funkjedi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-28T19:23:57Z","updated_at":"2015-03-01T05:40:28Z","closed_at":null,"body":"When custom fields are added/removed from a post I'm looking for a way to be able to add/remove the content hooks from the frontend (since the page has already loaded).\r\n\r\nOne approach would be to expose the `qTranslateX` instance on the `window` object. That would allow calling the `addContentHook*` methods.\r\n\r\n```js\r\njQuery(document).ready(function($){ \r\n    window.qtx = new qTranslateX(qTranslateConfig.js);\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/comments/76575462","html_url":"https://github.com/qTranslate-Team/qtranslate-x/issues/58#issuecomment-76575462","issue_url":"https://api.github.com/repos/qTranslate-Team/qtranslate-x/issues/58","id":76575462,"user":{"login":"funkjedi","id":9314,"avatar_url":"https://avatars.githubusercontent.com/u/9314?v=3","gravatar_id":"","url":"https://api.github.com/users/funkjedi","html_url":"https://github.com/funkjedi","followers_url":"https://api.github.com/users/funkjedi/followers","following_url":"https://api.github.com/users/funkjedi/following{/other_user}","gists_url":"https://api.github.com/users/funkjedi/gists{/gist_id}","starred_url":"https://api.github.com/users/funkjedi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkjedi/subscriptions","organizations_url":"https://api.github.com/users/funkjedi/orgs","repos_url":"https://api.github.com/users/funkjedi/repos","events_url":"https://api.github.com/users/funkjedi/events{/privacy}","received_events_url":"https://api.github.com/users/funkjedi/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T05:40:28Z","updated_at":"2015-03-01T05:40:28Z","body":"Good thinking `qTranslateConfig.qtx` is a great place for it.\r\n\r\nHaving a filter on the return value of `qtranxf_select_admin_js()` would be great. When `SCRIPT_DEBUG` is turned on I can just deregister and then register my own `qtranslate-admin-edit` script. However since the file is manually output using `readfile()` when `SCRIPT_DEBUG` is turned off this really isn't an option."}}