xref: /plugin/deletepageguard/conf/default.php (revision 0da697856a21f6e79666d7fe1c6a3ae059c82150)
1e39ccd63SJonny Dee<?php
2e39ccd63SJonny Dee/**
3994617c9SJohann Duscher * Default configuration for the Delete Page Guard plugin
4e39ccd63SJonny Dee *
5e39ccd63SJonny Dee * Each key defined here will be used as a default when the plugin is
6e39ccd63SJonny Dee * installed. Administrators can override these values via the
7e39ccd63SJonny Dee * Configuration Manager. See metadata.php for descriptions.
8*0da69785SJohann Duscher *
9*0da69785SJohann Duscher * @license GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html) - see LICENSE.md
10*0da69785SJohann Duscher * @author  Johann Duscher <jonny.dee@posteo.net>
11*0da69785SJohann Duscher * @copyright 2025 Johann Duscher
12e39ccd63SJonny Dee */
13e39ccd63SJonny Dee
14e39ccd63SJonny Dee// Newline separated list of PCRE regular expressions. A page whose ID
15e39ccd63SJonny Dee// (or relative file path, depending on match_target) matches any of
16e39ccd63SJonny Dee// these patterns cannot be deleted by empty save.
17*0da69785SJohann Duscher// Example patterns:
18*0da69785SJohann Duscher//   ^start$                    - Protects the main start page
19*0da69785SJohann Duscher//   ^sidebar$                  - Protects any sidebar pages
20*0da69785SJohann Duscher//   ^users:[^:]+:start$        - Protects user start pages (users:alice:start)
21*0da69785SJohann Duscher//   ^wiki:(syntax|dokuwiki)$   - Protects specific wiki documentation pages
22e39ccd63SJonny Dee$conf['patterns'] = '';
23e39ccd63SJonny Dee
24e39ccd63SJonny Dee// Which attribute to match against: 'id' matches against the page ID
25e39ccd63SJonny Dee// (colon separated), 'filepath' matches against the relative file path
26e39ccd63SJonny Dee// below the data directory. Default is 'id'.
27e39ccd63SJonny Dee$conf['match_target'] = 'id';
28e39ccd63SJonny Dee
29e39ccd63SJonny Dee// Comma separated list of additional user groups that may delete
30e39ccd63SJonny Dee// protected pages. Administrators always bypass the block. Example:
31e39ccd63SJonny Dee// 'manager,editor'
32e39ccd63SJonny Dee$conf['exempt_groups'] = '';
33e39ccd63SJonny Dee
34e39ccd63SJonny Dee// When true, whitespace‑only content is treated as empty. When false,
35e39ccd63SJonny Dee// only truly empty strings trigger deletion. Default is on.
36e39ccd63SJonny Dee$conf['trim_mode'] = 1;