PHPackages                             powerbuoy/sleek-modules - 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. powerbuoy/sleek-modules

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

powerbuoy/sleek-modules
=======================

Create modules by creating classes in /modules/.

v7.3.3(11mo ago)14.1k[1 issues](https://github.com/powerbuoy/sleek-modules/issues)2GPL-2.0-or-laterPHP

Since Oct 27Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/powerbuoy/sleek-modules)[ Packagist](https://packagist.org/packages/powerbuoy/sleek-modules)[ RSS](/packages/powerbuoy-sleek-modules/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (109)Used By (2)

[Sleek Modules](https://github.com/powerbuoy/sleek-modules/)
============================================================

[](#sleek-modules)

[![Packagist](https://camo.githubusercontent.com/e8757ccca09da02bd4b665ba65640992ae6e61fa815761738d37dbe8782e7122/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f706f77657262756f792f736c65656b2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/powerbuoy/sleek-modules)[![GitHub license](https://camo.githubusercontent.com/75634774f0e1cd767d5afef0dde28214edc708255ec08050ebaedb682f800ca1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706f77657262756f792f736c65656b2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-modules/blob/master/LICENSE)[![GitHub issues](https://camo.githubusercontent.com/cbd4c1e6b832cecc2a3ec5cb9bd969136185eeb55ed8269ea189241ba9f2f3ab/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f706f77657262756f792f736c65656b2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-modules/issues)[![GitHub forks](https://camo.githubusercontent.com/529f4399faf44cf513471eeee2508b31c47cf31d35891db9bb749bf43f6fa0f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f706f77657262756f792f736c65656b2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-modules/network)[![GitHub stars](https://camo.githubusercontent.com/1d2498b7023467eae71ae0d4a27e8edf1ec8baa8a101d9e5c49bebd03b28dab9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f706f77657262756f792f736c65656b2d6d6f64756c65732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-modules/stargazers)

Create modules by creating classes in `/modules/`.

Theme Support
-------------

[](#theme-support)

### `sleek/modules/add_new_module_preview`

[](#sleekmodulesadd_new_module_preview)

Enable screenshots and descriptions of modules when clicking "Add a Module".

### `sleek/modules/global_modules`

[](#sleekmodulesglobal_modules)

Enable "Global Modules" (WIP).

### `sleek/modules/inline_edit`

[](#sleekmodulesinline_edit)

Enable inline editing of flexible modules.

### `sleek/modules/module_preview`

[](#sleekmodulesmodule_preview)

Enable module preview in admin.

Filters
-------

[](#filters)

### `sleek/modules/global_modules(array $modules)`

[](#sleekmodulesglobal_modulesarray-modules)

Return an array of module names here to enable them as global modules.

### `sleek/modules/dummy_field_value($value, $field, $module, $template, $level)`

[](#sleekmodulesdummy_field_valuevalue-field-module-template-level)

Return a `$value` from here to use that value when rendering the field with dummy data.

### `sleek/modules/fields(array $fields, $moduleName, $args)`

[](#sleekmodulesfieldsarray-fields-modulename-args)

Filter the ACF fields for modules before they're added. This allows you to add "global" fields to several modules at once.

Actions
-------

[](#actions)

TODO...

Functions
---------

[](#functions)

### `Sleek\Modules\render($module, $fields, $template)`

[](#sleekmodulesrendermodule-fields-template)

Render module `$module` using (optional) fields `$fields` (or ACF location like a term, options page or set to `null` to fetch fields from `get_the_ID()`) using (optional) template `$template`.

### `Sleek\Modules\render_flexible($area, $id)`

[](#sleekmodulesrender_flexiblearea-id)

Render flexible modules contained in flexible content area `$area` using (optional) `$id` as ACF location.

### `Sleek\Modules\get_module_fields(array $modules, $layout, $withTemplates)`

[](#sleekmodulesget_module_fieldsarray-modules-layout-withtemplates)

Fetch ACF fields for all `$modules` and use layout `$layout` (`tabs`, `accordion`, `normal` or `flexible`). Optionally give every module group a `Template` dropdown using `$withTemplates = true`.

### `Sleek\Modules\render_dummies(array $modules)`

[](#sleekmodulesrender_dummiesarray-modules)

Render all `$modules` using dummy data.

Classes
-------

[](#classes)

### `Sleek\Modules\Module`

[](#sleekmodulesmodule)

Extend this class to create a module.

#### `Module::init()`

[](#moduleinit)

This method is called once on every page load. It allows you to add hooks or do whatever you like related to your module. Note that it runs whether or not the module is used on the current page.

#### `Module::fields()`

[](#modulefields)

Return an array of ACF fields from here and they will be added to the module.

#### `Module::data()`

[](#moduledata)

Return an array from here and each array property will be available in the module template.

#### `Module::get_field($name)`

[](#moduleget_fieldname)

Return the value of any field returned from `fields()`. Useful inside `data()` to check module configuration.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity75

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

Recently: every ~123 days

Total

108

Last Release

339d ago

Major Versions

v2.3.1 → v3.0.02020-03-08

v3.9.2 → v4.0.02020-03-20

v4.6.2 → v5.0.02020-04-21

v5.4.0 → v6.0.02020-09-11

v6.13.0 → v7.0.02021-09-30

### Community

Maintainers

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

---

Top Contributors

[![powerbuoy](https://avatars.githubusercontent.com/u/1027780?v=4)](https://github.com/powerbuoy "powerbuoy (175 commits)")

### Embed Badge

![Health badge](/badges/powerbuoy-sleek-modules/health.svg)

```
[![Health](https://phpackages.com/badges/powerbuoy-sleek-modules/health.svg)](https://phpackages.com/packages/powerbuoy-sleek-modules)
```

###  Alternatives

[jasonpriem/human-name-parser

Takes human names of arbitrary complexity and various wacky formats and parses them out.

109121.2k](/packages/jasonpriem-human-name-parser)[nayjest/builder

PHP package for instantiating objects using configurations

14201.5k6](/packages/nayjest-builder)[aldemeery/enum-polyfill

A Polyfill for the SplEnum type in PHP

1059.6k](/packages/aldemeery-enum-polyfill)[monsieurbiz/sylius-alert-message-plugin

Adds a simple message on top of your shop.

1327.0k](/packages/monsieurbiz-sylius-alert-message-plugin)

PHPackages © 2026

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