45 lines
2.1 KiB
PHTML
45 lines
2.1 KiB
PHTML
|
|
<div class="folder_settings_block">
|
|
|
|
<table class="form-table">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row">
|
|
<label for="baseUrl-folder"><?php echo __('Destination URL', 'static-html-output-plugin');?></label>
|
|
</th>
|
|
<td>
|
|
<?php $tpl->displayTextfield($this, 'baseUrl-folder', 'http://mystaticsite.com', '', ''); ?><br>
|
|
|
|
<p><i>Set this to the URL your visitors will use to access your site.</i></p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">
|
|
<label for="targetFolder"><?php echo __('Target Directory', 'static-html-output-plugin');?></label>
|
|
</th>
|
|
<td>
|
|
<input id="targetFolder" name="targetFolder" class="regular-text" style="width:100%;"
|
|
value="<?php echo $this->options->targetFolder ? $this->options->targetFolder : $this->wp_site->site_path . 'mystaticsite'; ?>" /><br>
|
|
|
|
<p>By exporting to a directory on your current server, you can check how it will look when published and make any adjustments needed. If you put this in a publicly accessible path and the links have been rewritten to support it, you may use this method to easily preview your static site without needing to leave your browser.</p>
|
|
|
|
<p>As a safeguard, this plugin will only allow you to export to a new directory, an empty directory, or one that contains a file named <code>.wp2static_safety</code> inside. You can write to any existing, populated directories, by placing a file named as such within.</p>
|
|
</td>
|
|
</tr>
|
|
<tr style="display:none;">
|
|
<th scope="row">
|
|
<label for="folder_test"><?php echo __('Test Directory', 'static-html-output-plugin');?></label>
|
|
</th>
|
|
<td>
|
|
<button id="folder-test-button" type="button" class="btn-primary button">Test Folder is Writable</button>
|
|
<span id="folder_test_results"></span>
|
|
|
|
<p>This will check the folder exists, else try to create it, along with a test file and directory inside it. It will also create the <code>.wp2static_safety</code> file within.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|