1. Go to this page and download the library: Download sigtrygg-space/kirby-trash library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sigtrygg-space / kirby-trash example snippets
// site/config/config.php
return [
// days until items are removed automatically.
// -1 = keep forever. 0 is treated as invalid and
// falls back to the default (30), so a misconfiguration
// can never wipe the trash instantly.
'sigtrygg-space.kirby-trash.retentionDays' => 30,
// where trashed items are stored (string or closure).
// default: site/storage/trash — custom folder setups have
// to point this at their storage location
'sigtrygg-space.kirby-trash.root' => null,
// disable the trash entirely: deletions become permanent
// again and the Panel area disappears. Also accepts a
// closure for logic-driven switching, e.g. by environment:
// 'enabled' => fn ($kirby) => $kirby->system()->isLocal() === false
'sigtrygg-space.kirby-trash.enabled' => true,
// show the number of trashed items as a badge on the Panel
// menu entry. false disables the badge; an array restyles it,
// e.g. ['theme' => 'passive'] for a more subtle look
'sigtrygg-space.kirby-trash.badge' => true,
// thumbnail previews for trashed image files and page covers.
// thumbs are generated lazily as JPEG below the cache root and
// removed together with their item. false disables previews;
// a number (px) or CSS length string scales the table rows —
// and with them the thumbnails, which follow Kirby's standard
// row height by default
'sigtrygg-space.kirby-trash.previews' => true, // or e.g. '3.5rem'
// items expiring within this many days are highlighted in
// the table and switch the badge to the warn theme.
// 0 disables the warn state
'sigtrygg-space.kirby-trash.warnDays' => 5,
'sigtrygg-space.kirby-trash.warnTheme' => 'orange',
// the badge's expiry lookup is cached persistently
// (site/cache); set to false to disable the plugin cache
'sigtrygg-space.kirby-trash.cache' => true,
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.