WP Manifestindependent plugin directory
manifest / content / flag-major-updates

Flag Major Updates

Allow editors to flag updates to WordPress posts as "major", and store the date of the last major update to a post.

by dxw · github.com/dxw/flag-major-updates · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/dxw/flag-major-updates/archive/refs/heads/main.zip

Readme

Flag Major Updates

This plugin allows an editor to mark an update to a post as a "major update". The date of the last major update to that post is then stored, and can be retrieved to e.g. display in the front end, or used to order posts by.

Requires ACF Pro.

PHP compatibility

This plugin requires PHP version 8.2 or above.

Development

Install the dependencies:

composer install

Run the tests:

vendor/bin/kahlan spec

Run the linters:

vendor/bin/psalm --show-info=true --find-unused-psalm-suppress
vendor/bin/php-cs-fixer fix

Type analysis

Note that this project aims to create fully typed code, with no Psalm output. We use a Psalm plugin to provide type annotation and stubs for WordPress globals, so the need for explicit annotation should be minimal.

Developers should aim for the output of Psalm to look something like this using the strictest error level:

❯ vendor/bin/psalm --error-level=1 --find-unused-psalm-suppress
Target PHP version: 7.4 (inferred from composer.json).
Scanning files...
Analyzing files...


------------------------------

       No errors found!

------------------------------

Checks took 0.01 seconds and used 6.608MB of memory
No files analyzed
Psalm was able to infer types for 97.7273% of the codebase

Read the full README on GitHub →