settings.php 1.5 KB
<?php

namespace Tz\WordPress\Tools\PagePermissions;

use Tz\WordPress\Tools\PagePermissions\Admin;

/*
Idea: Checkbox beside each textarea with option to include registration forum or not
*/ ?>

<div class="wrap">
  <?php screen_icon(); ?>
  <h2>Permission Defaults</h2>

  <form method="post">
    <input type="hidden" name="<?php echo Admin\SUBMIT_HOOK; ?>" value="1" />

    <h3>Default Option</h3>
    <?php require(__DIR__ . DIRECTORY_SEPARATOR . 'form.php'); ?>

    <hr />

    <h3>Error Messages</h3>
    <h6>(Messages are displayed for given criteria when page permission is not met)</h6>

    <p>
      <label for="<?php echo ELE_AUTH; ?>" />"Must be Logged In" message for un-authenticated visitors</label>
      <br /><textarea id="<?php echo ELE_AUTH; ?>" name="<?php echo ELE_AUTH; ?>"><?php echo $selected[ELE_AUTH]; ?></textarea>
    </p>

    <p>
      <label for="<?php echo ELE_CUST_AUTH; ?>" />"Only Specific Roles" message for un-authenticated visitors</label>
      <br /><textarea id="<?php echo ELE_CUST_AUTH; ?>" name="<?php echo ELE_CUST_AUTH; ?>"><?php echo $selected[ELE_CUST_AUTH]; ?></textarea>
    </p>

    <p>
      <label for="<?php echo ELE_DENIED; ?>" />"Only Specific Roles" message for authenticated users without sufficient privelages</label>
      <br /><textarea id="<?php echo ELE_DENIED; ?>" name="<?php echo ELE_DENIED; ?>"><?php echo $selected[ELE_DENIED]; ?></textarea>
    </p>

    <p class="submit"><input type="submit" class="button-primary" value="Save Changes" /></p>
  </form>
</div>