PHPackages                             greenpeace/planet4-gpea-plugin-blocks - 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. greenpeace/planet4-gpea-plugin-blocks

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

greenpeace/planet4-gpea-plugin-blocks
=====================================

This repository contains the WordPress plugin that provides the blocks to be used with Shortcake UI plugin.

v0.7.23(1y ago)24.2k2[6 PRs](https://github.com/greenpeace/planet4-gpea-plugin-blocks/pulls)GPL-3.0+PHP

Since May 31Pushed 1y ago11 watchersCompare

[ Source](https://github.com/greenpeace/planet4-gpea-plugin-blocks)[ Packagist](https://packagist.org/packages/greenpeace/planet4-gpea-plugin-blocks)[ RSS](/packages/greenpeace-planet4-gpea-plugin-blocks/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (3)Versions (87)Used By (0)

GreenpeaceEA Planet 4 - Shortcodes
==================================

[](#greenpeaceea-planet-4---shortcodes)

This WordPress plugin provides blocks to be used with Shortcake UI plugin. This plugin is developed by Greenpeace Netherlands to be used in the Planet4 engagement platform.

Currently this plugin adds the following new shortcodes:

1. Donation form
2. Petition form
3. No-index (to discourage search engines from indexing)
4. Liveblog

Coming in the near-future (available on dev-branch)

1. Quote block with image
2. Statistics block in 3 columns
3. New hero image header

In the backlog are among others:

- Information request form
- interactive maps

How to develop a new block you ask?
-----------------------------------

[](#how-to-develop-a-new-block-you-ask)

1. Create a new controller class that extends Controller inside directory *classes/controller/blocks*. The class name should follow naming convention: GPEA\_**Blockname**\_Controller and its file name should be class-**blockname**-controller.php.
2. Implement its parent's class two abstract methods:

- In method **prepare\_fields()** you need to define the blocks fields
- In method **prepare\_template()** you need to prepare them for rendering.

3. Create the template file that will be used to render your block inside directory *includes/blocks*. If the name of the file is gpea\_**blockname**.twig then you need to set the BLOCK\_NAME constant as gpea\_**'blockname'**
4. Add your new class name to the array that the `P4BLBKS\Loader` function takes as an argument in `planet4-gpea-blocks.php`.
5. Finally, before committing do `composer update --no-dev && composer dump-autoload --optimize` in order to add your new class to composer's autoload.

And how do i build new assets?
------------------------------

[](#and-how-do-i-build-new-assets)

Asset sources are located in:

`/includes/assets/`

1. `/js/src/`
2. `/css/scss/`

Gulp builds the buildfiles into the parent directories of the sourcesfiles (so `/js/` and `/css`/). Maps are placed in `/maps/`...

Using your favorite package manager `install` the required packages from package.json and simply run `gulp watch` or `gulp`.

Known issues
------------

[](#known-issues)

Currently Firefox does not read the maps correctly. Chrome/Chromium does.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~20 days

Total

77

Last Release

591d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/73b0188184085e27029f0917c76dbc21e87c206c01909c3e931d53adf0bb3b3c?d=identicon)[sagarsdeshmukh](/maintainers/sagarsdeshmukh)

![](https://avatars.githubusercontent.com/u/939357?v=4)[Nikos Roussos](/maintainers/comzeradd)[@comzeradd](https://github.com/comzeradd)

![](https://avatars.githubusercontent.com/u/71187640?v=4)[Planet 4 Bot](/maintainers/planet-4)[@planet-4](https://github.com/planet-4)

---

Top Contributors

[![oekeur](https://avatars.githubusercontent.com/u/14031077?v=4)](https://github.com/oekeur "oekeur (425 commits)")[![hit1205](https://avatars.githubusercontent.com/u/986389?v=4)](https://github.com/hit1205 "hit1205 (235 commits)")[![ale-latte](https://avatars.githubusercontent.com/u/48325375?v=4)](https://github.com/ale-latte "ale-latte (215 commits)")[![nicklem](https://avatars.githubusercontent.com/u/11616750?v=4)](https://github.com/nicklem "nicklem (171 commits)")[![mjsarfatti](https://avatars.githubusercontent.com/u/736316?v=4)](https://github.com/mjsarfatti "mjsarfatti (63 commits)")[![hi-upchen](https://avatars.githubusercontent.com/u/58502423?v=4)](https://github.com/hi-upchen "hi-upchen (28 commits)")[![xblackbytesx](https://avatars.githubusercontent.com/u/506495?v=4)](https://github.com/xblackbytesx "xblackbytesx (20 commits)")[![wallat](https://avatars.githubusercontent.com/u/946379?v=4)](https://github.com/wallat "wallat (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![eahk](https://avatars.githubusercontent.com/u/53209063?v=4)](https://github.com/eahk "eahk (4 commits)")[![nowill-design-gp](https://avatars.githubusercontent.com/u/96771139?v=4)](https://github.com/nowill-design-gp "nowill-design-gp (3 commits)")[![hyjasonmei](https://avatars.githubusercontent.com/u/10399181?v=4)](https://github.com/hyjasonmei "hyjasonmei (2 commits)")[![hankfchan](https://avatars.githubusercontent.com/u/54634573?v=4)](https://github.com/hankfchan "hankfchan (1 commits)")[![lithrel](https://avatars.githubusercontent.com/u/617346?v=4)](https://github.com/lithrel "lithrel (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/greenpeace-planet4-gpea-plugin-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/greenpeace-planet4-gpea-plugin-blocks/health.svg)](https://phpackages.com/packages/greenpeace-planet4-gpea-plugin-blocks)
```

###  Alternatives

[verbb/expanded-singles

Extract Single entries to be top-level entries.

51442.8k14](/packages/verbb-expanded-singles)[phptars/tars2php

php代码自动生成工具

1211.1k5](/packages/phptars-tars2php)

PHPackages © 2026

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