{"action":"created","issue":{"url":"https://api.github.com/repos/timber/timber/issues/1058","repository_url":"https://api.github.com/repos/timber/timber","labels_url":"https://api.github.com/repos/timber/timber/issues/1058/labels{/name}","comments_url":"https://api.github.com/repos/timber/timber/issues/1058/comments","events_url":"https://api.github.com/repos/timber/timber/issues/1058/events","html_url":"https://github.com/timber/timber/issues/1058","id":159174947,"node_id":"MDU6SXNzdWUxNTkxNzQ5NDc=","number":1058,"title":"Timber initializing too early","user":{"login":"haroldangenent","id":1481468,"node_id":"MDQ6VXNlcjE0ODE0Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/1481468?v=4","gravatar_id":"","url":"https://api.github.com/users/haroldangenent","html_url":"https://github.com/haroldangenent","followers_url":"https://api.github.com/users/haroldangenent/followers","following_url":"https://api.github.com/users/haroldangenent/following{/other_user}","gists_url":"https://api.github.com/users/haroldangenent/gists{/gist_id}","starred_url":"https://api.github.com/users/haroldangenent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haroldangenent/subscriptions","organizations_url":"https://api.github.com/users/haroldangenent/orgs","repos_url":"https://api.github.com/users/haroldangenent/repos","events_url":"https://api.github.com/users/haroldangenent/events{/privacy}","received_events_url":"https://api.github.com/users/haroldangenent/received_events","type":"User","site_admin":false},"labels":[{"id":98406190,"node_id":"MDU6TGFiZWw5ODQwNjE5MA==","url":"https://api.github.com/repos/timber/timber/labels/needs-investigation","name":"needs-investigation","color":"d4c5f9","default":false},{"id":1086533397,"node_id":"MDU6TGFiZWwxMDg2NTMzMzk3","url":"https://api.github.com/repos/timber/timber/labels/old-issue","name":"old-issue","color":"24ea20","default":false}],"state":"closed","locked":false,"assignee":{"login":"palmiak","id":2342458,"node_id":"MDQ6VXNlcjIzNDI0NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2342458?v=4","gravatar_id":"","url":"https://api.github.com/users/palmiak","html_url":"https://github.com/palmiak","followers_url":"https://api.github.com/users/palmiak/followers","following_url":"https://api.github.com/users/palmiak/following{/other_user}","gists_url":"https://api.github.com/users/palmiak/gists{/gist_id}","starred_url":"https://api.github.com/users/palmiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmiak/subscriptions","organizations_url":"https://api.github.com/users/palmiak/orgs","repos_url":"https://api.github.com/users/palmiak/repos","events_url":"https://api.github.com/users/palmiak/events{/privacy}","received_events_url":"https://api.github.com/users/palmiak/received_events","type":"User","site_admin":false},"assignees":[{"login":"palmiak","id":2342458,"node_id":"MDQ6VXNlcjIzNDI0NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2342458?v=4","gravatar_id":"","url":"https://api.github.com/users/palmiak","html_url":"https://github.com/palmiak","followers_url":"https://api.github.com/users/palmiak/followers","following_url":"https://api.github.com/users/palmiak/following{/other_user}","gists_url":"https://api.github.com/users/palmiak/gists{/gist_id}","starred_url":"https://api.github.com/users/palmiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmiak/subscriptions","organizations_url":"https://api.github.com/users/palmiak/orgs","repos_url":"https://api.github.com/users/palmiak/repos","events_url":"https://api.github.com/users/palmiak/events{/privacy}","received_events_url":"https://api.github.com/users/palmiak/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-06-08T14:17:14Z","updated_at":"2018-11-14T06:58:17Z","closed_at":"2018-11-08T13:50:47Z","author_association":"CONTRIBUTOR","body":"### Expected behavior\n\nTimber to initialize after all plugins or mu-plugins are able to hook into WordPress functions.\n\n**This bug is specific for `timber-library` (WP plugin), since initialization for `timber/timber` will have be done by the theme developer.**\n### Actual behavior\n\nTimber initializes before this happens (at inclusion). This is especially a problem in Multisite, because network plugins are loaded before `muplugins_loaded` is called.\n\nRight now, plugins are forced to be a `mu-plugin` AND cannot use `muplugins_loaded` to register their actions. Possibly, Timber should even be initialized on `setup_theme` instead or at least at `plugins_loaded`.\n\n**Use case**\nRelated to #1056: `Timber\\ImageHelper::add_constants()` is run on inclusion as well (when initializing Timber). This does not allow plugins to hook into `home_url()` and change it.\n\nThe specific use-case would be when mapping a WordPress Multisite install to a domain. In this case, a filter should be used to change the `home_url()`.\n\n_I'm not sure if the problem is as broad as \"Timber initializing too early\" or if it's a specific bug for this use-case._\n### Steps to reproduce behavior\n\nFor the specific use-case:\n1. Use WordPress Multisite\n2. Create a subdirectory install\n3. Map this website to a domain by filtering `home_url()` or using a plugin that does this\n4. Sideload an image (for example, by resizing an external image)\n### What version of WordPress, PHP and Timber are you using?\n\nWordPress 4.5.2, PHP 7.0, Timber 1.0.4.\n### How did you install Timber? (for example, from GitHub, Composer/Packagist, WP.org?)\n\nComposer via WPackagist.\n"},"comment":{"url":"https://api.github.com/repos/timber/timber/issues/comments/438558508","html_url":"https://github.com/timber/timber/issues/1058#issuecomment-438558508","issue_url":"https://api.github.com/repos/timber/timber/issues/1058","id":438558508,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODU1ODUwOA==","user":{"login":"gchtr","id":2084481,"node_id":"MDQ6VXNlcjIwODQ0ODE=","avatar_url":"https://avatars2.githubusercontent.com/u/2084481?v=4","gravatar_id":"","url":"https://api.github.com/users/gchtr","html_url":"https://github.com/gchtr","followers_url":"https://api.github.com/users/gchtr/followers","following_url":"https://api.github.com/users/gchtr/following{/other_user}","gists_url":"https://api.github.com/users/gchtr/gists{/gist_id}","starred_url":"https://api.github.com/users/gchtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gchtr/subscriptions","organizations_url":"https://api.github.com/users/gchtr/orgs","repos_url":"https://api.github.com/users/gchtr/repos","events_url":"https://api.github.com/users/gchtr/events{/privacy}","received_events_url":"https://api.github.com/users/gchtr/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T06:58:17Z","updated_at":"2018-11-14T06:58:17Z","author_association":"MEMBER","body":"@mahagr That’s exactly what I meant or tried to say. Maybe I wasn’t clear enough."}}
{"actor":{"display_login":"gchtr"}}