PHPackages                             nabeghe/wp-shortcodes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nabeghe/wp-shortcodes

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nabeghe/wp-shortcodes
=====================

A standalone version of WordPress shortcodes system for use outside WordPress.

v1.0.2(11mo ago)310GPL-2.0+PHPPHP &gt;=8.1

Since Sep 22Pushed 11mo ago1 watchersCompare

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

READMEChangelog (3)DependenciesVersions (4)Used By (0)

WP Shortcodes
=============

[](#wp-shortcodes)

The standalone version of [WordPress shortcodes](https://github.com/WordPress/WordPress/blob/d2c835af27d4e4c42b97f422a0aa98b8fd3fb7cd/wp-includes/shortcodes.php#L63) system for use outside of WordPress.

**Notice:** The kses-related parts have been removed from the shortcode system and are currently not supported.

🫡 Usage
-------

[](#-usage)

### 🚀 Installation

[](#-installation)

You can install the package via composer:

```
composer require nabeghe/wp-shortcodes
```

### Example

[](#example)

```
use Nabeghe\WPShortcodes\Shortcodes;

$shortcodes = new Shortcodes();
$shortcodes->add('hash', function ($atts, $content = null) {
    $atts['algo'] ??= 'md5';
    return hash($atts['algo'], $content);
});

$result = $shortcodes->do('
MD5 = [hash algo="md5"]https://github.com/nabeghe/wp-shortcodes[/hash]
SJA256 = [hash algo="sha256"]https://github.com/nabeghe/wp-shortcodes[/hash]
');
echo $result;
```

📖 License
---------

[](#-license)

Copyright (c) 2024 Hadi Akbarzadeh

Licensed under the GPL-2.0+ license, see [LICENSE.md](LICENSE.md) for details.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance51

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~129 days

Total

3

Last Release

344d ago

### Community

Maintainers

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

---

Top Contributors

[![nabeghe](https://avatars.githubusercontent.com/u/12207627?v=4)](https://github.com/nabeghe "nabeghe (3 commits)")

### Embed Badge

![Health badge](/badges/nabeghe-wp-shortcodes/health.svg)

```
[![Health](https://phpackages.com/badges/nabeghe-wp-shortcodes/health.svg)](https://phpackages.com/packages/nabeghe-wp-shortcodes)
```

###  Alternatives

[lavalite/theme

Deafalut theme for lavalite cms.

3324.5k](/packages/lavalite-theme)

PHPackages © 2026

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