PHPackages                             shortlist-digital/agreable-promo-plugin - 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. shortlist-digital/agreable-promo-plugin

ActiveWordpress-plugin

shortlist-digital/agreable-promo-plugin
=======================================

Wordpress plugin for Shortlist Media.

4.0.3(9y ago)02.8k1[1 PRs](https://github.com/shortlist-digital/agreable-promo-plugin/pulls)MITPHP

Since Aug 20Pushed 8y ago11 watchersCompare

[ Source](https://github.com/shortlist-digital/agreable-promo-plugin)[ Packagist](https://packagist.org/packages/shortlist-digital/agreable-promo-plugin)[ RSS](/packages/shortlist-digital-agreable-promo-plugin/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (96)Used By (0)

Shortlist Media Wordpress Promo Plugin
======================================

[](#shortlist-media-wordpress-promo-plugin)

Wordpress Plugin built for Croissant stack using [Herbert](http://getherbert.com/) plugin framework.

---

### Dependencies

[](#dependencies)

- Timber
- Advanced Custom Fields

---

#### Create custom post type

[](#create-custom-post-type)

- `/app/customPostType.php`

#### Plugin degines an widget using ACF available to articles

[](#plugin-degines-an-widget-using-acf-available-to-articles)

- `/widget-loader-acf.php`
    A Croissant theme (e.g. Troisieme) will traverse plugins directory for 'slm' prefixed sub directories which contain `widget-loader-acf.php` at their root. This ACF definition is added to list of widgets available in theme.

#### Add plugin view path to Timber's paths for rendering

[](#add-plugin-view-path-to-timbers-paths-for-rendering)

- `/app/hooks/timber_loader_paths.php`
    Parent theme will include the plugin Twig templates and render using Timber (see [lab-troisieme-2015/src/views/partials/widget-container.twig](https://bitbucket.org/ShortlistMedia/lab-troisieme-2015/src/a09dddfd3df596f3c8b81db759160ded95a577e4/views/partials/widget-container.twig?at=master#cl-5)). Therefore we add our plugin paths to Timber's internal array of paths using this filter called by Timber: `'timber/loader/paths`.

#### Fire plugin specific action whilst rendering (to enqueue styles/scripts within plugin)

[](#fire-plugin-specific-action-whilst-rendering-to-enqueue-stylesscripts-within-plugin)

- `/app/hooks/slm_plugin_enqueue.php`
    Just before rendering the plugin template, the parent theme calls Wordpress `do_action('acf_{{name}}_enqueue')`. e.g. (using Timber):
    `{% do action('slm_'~widget.acf_fc_layout~'_enqueue', widget) %}`
    The hook name is constructed from the ACF Field Group 'name' in `widget-loader-acf.php`. e.g. 'acf\_promo\_plugin\_enqueue'

#### Configurable plugin options for Wordpress installation

[](#configurable-plugin-options-for-wordpress-installation)

- `app/panels.php`
    Adds Settings panel for installation specific configuration. Uses ACF definitions.

##### Using ACF to create panels in Post Type menu

[](#using-acf-to-create-panels-in-post-type-menu)

```
acf_add_options_sub_page(array(
  'page_title'  => 'Promo Style Settings',
  'menu_title'  => 'Promo Settings',
  'parent_slug' => 'edit.php?post_type=promo',
));

```

##### Add Custom Fields to menu

[](#add-custom-fields-to-menu)

Specify custom fields using `register_field_group($options)`. Best to create in Worpdress Admin and use export function. `$options['location']` will be an array specifying where to display the Custom Fields:

```
array (
  array (
    array (
      'param' => 'options_page',
      'operator' => '==',
      'value' => 'acf-options-promo-settings',
    ),
  ),
),

```

Note: If `acf_add_options_sub_page` is given 'menu\_title' of 'Promo Settings', the location 'value' is 'acf-options-promo-settings' (as above).

#### Deploy to packagist

[](#deploy-to-packagist)

Check the current latest tag `git fetch && git tag`

Bump the version appropriately and tag `git tag x.x.x`

Push to Github. Packagist will receive a hook and update the file `git push origin master --tags`

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 74.8% 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 ~6 days

Total

75

Last Release

3436d ago

Major Versions

0.6.6 → 1.0.02015-12-09

1.4.0 → 2.0.02016-04-26

2.1.0 → 3.0.02016-07-12

3.0.1 → 4.0.02016-10-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b90478148945c7280c07347ddf12f76faea2ad016219f5553e86fd5edba27cf?d=identicon)[jonsherrard](/maintainers/jonsherrard)

![](https://www.gravatar.com/avatar/61ad7e6bf7e888532cab85057b18648b093e470d0f2277548b302ac494de9e31?d=identicon)[shortlist-digital](/maintainers/shortlist-digital)

---

Top Contributors

[![jonsherrard](https://avatars.githubusercontent.com/u/631670?v=4)](https://github.com/jonsherrard "jonsherrard (163 commits)")[![ecoad](https://avatars.githubusercontent.com/u/596528?v=4)](https://github.com/ecoad "ecoad (27 commits)")[![garethfoote](https://avatars.githubusercontent.com/u/500616?v=4)](https://github.com/garethfoote "garethfoote (19 commits)")[![iamdeaneyelid](https://avatars.githubusercontent.com/u/1761265?v=4)](https://github.com/iamdeaneyelid "iamdeaneyelid (7 commits)")[![sidonaldson](https://avatars.githubusercontent.com/u/236669?v=4)](https://github.com/sidonaldson "sidonaldson (1 commits)")[![thomasdigby](https://avatars.githubusercontent.com/u/3226804?v=4)](https://github.com/thomasdigby "thomasdigby (1 commits)")

### Embed Badge

![Health badge](/badges/shortlist-digital-agreable-promo-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/shortlist-digital-agreable-promo-plugin/health.svg)](https://phpackages.com/packages/shortlist-digital-agreable-promo-plugin)
```

###  Alternatives

[friends-of-behat/symfony-extension

Integrates Behat with Symfony.

48222.8M489](/packages/friends-of-behat-symfony-extension)[drupal/drupal-extension

Drupal extension for Behat

21214.9M139](/packages/drupal-drupal-extension)[friends-of-behat/mink-extension

Mink extension for Behat

14033.3M411](/packages/friends-of-behat-mink-extension)[friends-of-behat/mink-debug-extension

Debug extension for Behat

2075.2M256](/packages/friends-of-behat-mink-debug-extension)[dmore/behat-chrome-extension

Behat extension for controlling Chrome without Selenium

3313.0M320](/packages/dmore-behat-chrome-extension)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

583.5M31](/packages/dvdoug-behat-code-coverage)

PHPackages © 2026

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