PHPackages                             iionly/expirationdate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. iionly/expirationdate

ActiveElgg-plugin

iionly/expirationdate
=====================

Provides a method to set an expiration date for entities and to delete the entities after that date.

5.0.0(1y ago)2171GPL-2.0-onlyPHP

Since Oct 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/iionly/expirationdate)[ Packagist](https://packagist.org/packages/iionly/expirationdate)[ Docs](https://github.com/iionly/expirationdate)[ RSS](/packages/iionly-expirationdate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (13)Used By (0)

Expirationdate plugin for Elgg 5.0 and newer Elgg 5.X
=====================================================

[](#expirationdate-plugin-for-elgg-50-and-newer-elgg-5x)

Latest Version: 5.0.0
Released: 2024-11-01
Contact:
License: GNU General Public License version 2
Copyright: (c) Brett Profitt (Original developer) / iionly (for Elgg 1.8 onwards)

Description
-----------

[](#description)

The Expirationdate plugin can be used to define a date of expiration for entities and to delete them automatically via a cron job. The plugin provides no user interface on your site (apart from setting the desired cron interval in the admin section).

For example this plugin can optionally be used with the Elggx Userpoints plugin.

If you only intend to use the Expirationdate plugin in connection with another plugin that already has the expiration date mechanism implemented, you only need to enable it like another Elgg plugin and set the desired cron interval in the plugin's settings. Additionally, at least the cronjob for this interval must be configured on your server!

If you intend to use the methods included in the Expirationdate plugin within your own plugin development, read on.

Installation
------------

[](#installation)

1. If you have installed a previous version of the Expirationdate plugin plugin disable the plugin in the admin section of your site and then remove the expirationdate folder from the mod directory of your Elgg installation,
2. Copy the expirationdate folder into the mod directory of your Elgg installation,
3. Enable the Expirationdate plugin plugin in the admin section of your site and set the desired cron interval in the Expirationdate plugin settings.

Usage
-----

[](#usage)

Configure cron for Elgg as described in the Elgg documentation.

Install and enable the Expirationdate plugin. Be sure to set the plugin's period to something that will match nicely with your cron jobs.

Within your plugin, set entity expiration dates by saying:

```
\Expirationdate::expirationdate_set($entity->guid, $expiration_date_string, bool);

```

where $expiration\_date\_string is a valid strtotime() string. If the 3rd parameter is true, the entity will be disabled instead of deleted.

Unset expiration dates by saying:

```
\Expirationdate::expirationdate_unset($entity->guid);

```

Before entities are deleted the plugin\_hook expirationdate:expirate\_entity is called with $param set as:

array('entity' =&gt; entity object)

If you register a function to this hook, the entity will not be deleted/disabled unless the function returns true.

Each entity that has an expiration date will be passed through the plugin hook expirationdate:will\_expire\_entity with the $param set as:

array('expirationdate' =&gt; timestamp of expiration, 'entity' =&gt; entity object)

This can be used to send out warning emails, etc.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~301 days

Recently: every ~339 days

Total

12

Last Release

563d ago

Major Versions

1.10.x-dev → 2.3.42017-02-12

2.3.x-dev → 3.0.02019-04-06

3.3.x-dev → 4.0.02024-11-01

4.0.x-dev → 5.0.02024-11-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdbf30b346be3828b40d37e87d3dfc0974c9481c41c8019a37a90d59580b031b?d=identicon)[iionly](/maintainers/iionly)

---

Top Contributors

[![iionly](https://avatars.githubusercontent.com/u/1773681?v=4)](https://github.com/iionly "iionly (11 commits)")

---

Tags

pluginelgg

### Embed Badge

![Health badge](/badges/iionly-expirationdate/health.svg)

```
[![Health](https://phpackages.com/badges/iionly-expirationdate/health.svg)](https://phpackages.com/packages/iionly-expirationdate)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
