PHPackages                             wbf/license - 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. wbf/license

ActiveLibrary

wbf/license
===========

An helper component for managing licenses

021PHP

Since Jan 19Pushed 9y ago3 watchersCompare

[ Source](https://github.com/wagaweb/wbf_license)[ Packagist](https://packagist.org/packages/wbf/license)[ RSS](/packages/wbf-license/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

License
=======

[](#license)

A license manager for themes and plugins.

Simple usage
------------

[](#simple-usage)

You first need to create a license class by extending WBF\\components\\license\\License and implementing WBF\\components\\license\\License\_Interface, then you can register this license with the License Manager:

```
$l = new YourLicense();

\WBF\components\license\License_Manager::register_theme_license($l);
```

And that's it! WBF will detect your new license and allows user to enter their license code through the dashboard.

Creating dashboard interface
----------------------------

[](#creating-dashboard-interface)

If you are using WBF as plugin the admin interface will be automatically created for you. If this is not the case you have to do it yourself.

You can look at the WBF implementation in License\_Manager class:

`perform_page_actions()` =&gt; saves input data

`admin_license_menu_item()` =&gt; adds the menu item

`license_page()` =&gt; display the admin page.

Lock theme updates with license
-------------------------------

[](#lock-theme-updates-with-license)

If you use the WBF Custom Updater, you can use an hook or two to lock the updates once your license is registered.

In your License constructor:

```
add_filter("wbf/custom_theme_updater/can_update", [$this, "allow_updates"], 10, 2);
add_action("wbf/custom_theme_updater/after_update_inject", [$this, "show_update_notice"], 10, 2);
```

Then, in your License class:

```
public function allow_updates($can_update, Theme_Update_Checker $checker){
    if(!$this->is_valid()){
        $can_update = false;
    }
    return $can_update;
}

public function show_update_notice(Theme_Update_Checker $checker, $can_update){
    if(!$can_update){
        $message = sprintf(__( 'A new version of %s is available! Enter a valid license to get latest updates.', 'wbf' ),"my-theme","admin.php?page=wbf_licenses");
        //Show notice whatever you like
        //...
    }
}
```

Lock plugins updates with
-------------------------

[](#lock-plugins-updates-with)

For now WBF alone does not automatically binds plugins licenses to update mechanism. On the other hand Plugins Framework does it within the `set_update_server()` method.

\[...\]

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecab5a59cfdd434af4feb082bcb4c24e264ea99574713c876789c3ea8a088c65?d=identicon)[Waga Dev](/maintainers/Waga%20Dev)

---

Top Contributors

[![LostCore](https://avatars.githubusercontent.com/u/2674299?v=4)](https://github.com/LostCore "LostCore (19 commits)")

### Embed Badge

![Health badge](/badges/wbf-license/health.svg)

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

PHPackages © 2026

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