<?php if (!defined('TWEAKR_INIT')) die('DIRECT ACCESS PROHIBITED'); ?>


    <!-- Permalinks -->
    <div class="postbox tweakr-postbox">
    <h3 class="hndle"><span><?php _e('Permalinks', 'tweakr'); ?></span></h3>
    <div class="inside tweakr-setting-section">

        <h4>Insert-Dialogs</h4>

        <p>Virtual Permlinks can be used by the Editor Insert-Dialogs to avoid issues with static links (Link + Media Dialog).<br />
        <strong>Note:</strong> if enabled, this option must not turned off - otherwise the media links are broken. Only use it in case you know what you're doing! 
        </p>

        <?php 
            // Virtual Permalinks
            $this->_settingsUtility->displayCheckbox(__('Virtual Permalinks', 'tweakr'), 'permalinks-virtual', array(
                'label' => 'Enable Virtual Permalink URLs',
                'description' => 'Placeholders like link://post.local/1234 are used within the Insert-Dialogs and got replaced by the real link during rendering - this avoids problems with different domains names.'
            ));
        ?>

        <h4>Permalink Structure</h4>

        <p>The WordPress Core rewrite rules will be altered to add the .html extension to the following elements</p>

        <?php 
            // Add .html to Pages
            $this->_settingsUtility->displayCheckbox(__('Pages', 'tweakr'), 'rewrites-page-ext-html', array(
                'label' => 'Add .html extension to all pages'
            ));

            // Add .html to Categories
            $this->_settingsUtility->displayCheckbox(__('Categories', 'tweakr'), 'rewrites-category-ext-html', array(
                'label' => 'Add .html extension to all categories'
            ));

            // Add .html to custom Taxonomies
            $this->_settingsUtility->displayCheckbox(__('Taxonomies', 'tweakr'), 'rewrites-custom-taxonomy-ext-html', array(
                'label' => 'Add .html extension to custom taxonomies'
            ));

            // Remove Trailing-Slashes
            $this->_settingsUtility->displayCheckbox(__('Trailing slashes', 'tweakr'), 'rewrites-trailingslashes-remove', array(
                'label' => 'Remove trailing slashes from all permalinks'
            ));

            // html extension optional
            $this->_settingsUtility->displayCheckbox(__('Backward compatiblity', 'tweakr'), 'rewrites-ext-html-optional', array(
                'label' => 'Allow access to content without .html extension',
                'description' => 'The trailing .html extension is normally required to access posts/pages. In compatibility mode, both paths (with/without) the .html extension are accessible.'
            ));
        ?>


    <!-- // Permalinks -->
    </div></div>