{"action":"closed","issue":{"url":"https://api.github.com/repos/loewydesign/wordpress-layout-builder/issues/3","labels_url":"https://api.github.com/repos/loewydesign/wordpress-layout-builder/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/loewydesign/wordpress-layout-builder/issues/3/comments","events_url":"https://api.github.com/repos/loewydesign/wordpress-layout-builder/issues/3/events","html_url":"https://github.com/loewydesign/wordpress-layout-builder/issues/3","id":119600285,"number":3,"title":"`LayoutBuilder\\Output::render()` echos content, but `[layout]` shortcode should return, not echo","user":{"login":"agopshi","id":7819293,"avatar_url":"https://avatars.githubusercontent.com/u/7819293?v=3","gravatar_id":"","url":"https://api.github.com/users/agopshi","html_url":"https://github.com/agopshi","followers_url":"https://api.github.com/users/agopshi/followers","following_url":"https://api.github.com/users/agopshi/following{/other_user}","gists_url":"https://api.github.com/users/agopshi/gists{/gist_id}","starred_url":"https://api.github.com/users/agopshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agopshi/subscriptions","organizations_url":"https://api.github.com/users/agopshi/orgs","repos_url":"https://api.github.com/users/agopshi/repos","events_url":"https://api.github.com/users/agopshi/events{/privacy}","received_events_url":"https://api.github.com/users/agopshi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-30T22:56:17Z","updated_at":"2015-12-05T22:58:22Z","closed_at":"2015-12-05T22:58:22Z","body":"Right now, the `[layout]` shortcode essentially echos out the layout because `LayoutBuilder\\Output::render()` echos it. This isn't a big problem on pages that only use a layout and nothing else, but it causes problems for pages that mix one or more layouts and other content.\r\n\r\nProposed fix:\r\n\r\n1. Add an `$echo = true` parameter to `LayoutBuilder\\Output::render()`. This will maintain backwards compatibility, and if it's set to false, it should return the output.\r\n\r\n2. Change the `[layout]` shortcode to use `$echo = false` when calling `LayoutBuilder\\Output::render()`. This should fix the shortcode without breaking any existing code."}}