PHPackages                             premmerce/wordpress-sdk - 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. premmerce/wordpress-sdk

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

premmerce/wordpress-sdk
=======================

Wordpress SDK for premmerce plugins

v2.1(7y ago)14.0k↓14.3%GPL-2.0+PHP

Since Oct 30Pushed 6y agoCompare

[ Source](https://github.com/Premmerce/wordpress-sdk)[ Packagist](https://packagist.org/packages/premmerce/wordpress-sdk)[ RSS](/packages/premmerce-wordpress-sdk/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

Premmerce Wordpress SDK
=======================

[](#premmerce-wordpress-sdk)

Premmerce wordpress SDK used in plugins generated by premmerce-dev-tools plugin.

FileManager
-----------

[](#filemanager)

File manager is responsible for plugin resources(assets, views, paths) management. Class should be initialized with plugin main file full path as parameter.

params:

- string $mainFile - main plugin file path
- string $templatePath - theme directory to override plugin templates located in `frontend` directory

```
    $fileManager = new FileManager($mainFile);

    //V2
    $fileManager = new FileManager($mainFile, $templatePath);
```

### includeTemplate

[](#includetemplate)

includeTemplate(string $template, array $variables = \[\])

params:

- string $template - relative path to file
- array $variables - array of variables used in template file

Includes template located in plugin `views` folder with passed variables in scope

Each template located in `views/forntend` directory can be overridden in theme in `/plugin_name/` directory

```
$fileManager->includeTemplate('admin/index.php',['title' => 'My title']);
```

### renderTemplate

[](#rendertemplate)

renderTemplate(string $template, array $variables = \[\])

params:

- string $template - relative path to file
- array $variables - array of variables used in template file

Returns rendered template located in plugin `views` folder with passed variables in scope

Each template located in `views/forntend` directory can be overridden in theme in `/plugin_name/` directory

```
$rendered = $fileManager->includeTemplate('admin/index.php',['title' => 'My title']);
```

### locateAsset

[](#locateasset)

locateAsset(string $file)

Returns asset url located in plugin `assets` folder

params:

- string $template - relative path to file

```
$url = $fileManager->locateAsset('admin/css/style.css');

wp_enqueue_style('my_style', $fileManager->locateAsset('front/css/style.css'));
```

AdminNotifier
-------------

[](#adminnotifier)

Class is responsible for displaying messages in admin area. AdminNotifier should be instantiated, before `admin_notices` action

### push

[](#push)

Show message on admin\_notices action

push(string $message, string $type = self::SUCCESS, bool $isDismissible = false)

params:

- string $message - message text
- string $type - message type, one of predefined constants: AdminNotifier::SUCCESS|AdminNotifier::ERROR|AdminNotifier::WARNING|AdminNotifier::INFO
- bool $isDismissible - can user dismiss message

```
$notifier->push('Message text', AdminNotifier::SUCCESS, true)
```

### flash

[](#flash)

Save flash message to show during next request

flash(string $message, string $type = self::SUCCESS, bool $isDismissible = false)

params:

- string $message - message text
- string $type - message type, one of predefined constants: AdminNotifier::SUCCESS|AdminNotifier::ERROR|AdminNotifier::WARNING|AdminNotifier::INFO
- bool $isDismissible - can user dismiss message

```
$notifier->flash('Message text', AdminNotifier::SUCCESS, true)
```

PluginInterface
---------------

[](#plugininterface)

The Interface that should be implemented by plugin main file

### Changelog

[](#changelog)

#### V2

[](#v2)

- Added second parameter to FileManager `__construct()`
- Added `flash` method to AdminNotifier

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Total

4

Last Release

2670d ago

Major Versions

v1.1 → v2.02018-06-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/276cf192bbebe44fd3a2e5d7fd662b77ff96d8f066bef986b3dc8fa6afea5e24?d=identicon)[premmerce](/maintainers/premmerce)

### Embed Badge

![Health badge](/badges/premmerce-wordpress-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/premmerce-wordpress-sdk/health.svg)](https://phpackages.com/packages/premmerce-wordpress-sdk)
```

###  Alternatives

[pid/speakingurl

Generate of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' or 'slug' from a string.

1.1k5.3k1](/packages/pid-speakingurl)[ronanguilloux/php-gpio

GPIO-related utils &amp; toolkit PHP library

2678.0k](/packages/ronanguilloux-php-gpio)[bmidget/kohana-formo

Formo is a form module for Kohana 3 that lets you work with forms as objects

1328.4k](/packages/bmidget-kohana-formo)[daxslab/yii2-taggedview

Extension to help setup the standard HTML meta tags besides the ones defined by Opengraph and Twitter to contribute to website SEO

114.5k](/packages/daxslab-yii2-taggedview)

PHPackages © 2026

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