/** * Output backend HTML for Layotter * * @param $post object Post object as provided by Wordpress */ function layotter_output_interface($post) { $hidden_style = 'width: 1px; height: 1px; position: fixed; top: -999px; left: -999px;'; $visible_style = 'width: 100%; height: 200px;margin-bottom: 30px;'; echo '<textarea id="content" name="content" style="' . $hidden_style . '"></textarea>'; if (Layotter_Settings::is_debug_mode_enabled()) { echo '<p>'; printf(__('Debug mode enabled: Inspect and manually edit the JSON structure generated by Layotter. Use with caution. A faulty structure will break your page layout and content. Go to <a href="%s">Layotter\'s settings page</a> to disable debug mode.', 'layotter'), admin_url('admin.php?page=layotter-settings')); echo '</p>'; echo '<textarea id="layotter-json" name="layotter_json" style="' . $visible_style . '"></textarea>'; } else { echo '<textarea id="layotter-json" name="layotter_json" style="' . $hidden_style . '"></textarea>'; } require_once __DIR__ . '/../views/editor.php'; }