Skip to content
wpgeniusPublic

About

CoverFold – Photo & Video Album Gallery. Stunning photo and video albums for WordPress, with a block editor block and an Elementor widget.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

79 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoverFold – Photo & Video Album Gallery

Latest release CI Release Deploy License: GPL v3+ Try it in your browser WordPress.org WordPress tested Active installs

Stunning photo & video albums for WordPress.

CoverFold shows a filterable grid of album covers. Click a cover and the whole album (photos, Media Library videos, YouTube, YouTube playlists and Vimeo) opens in a Foldbox lightbox. Use it as a block editor block, an Elementor widget or the [coverfold] shortcode.

CoverFold is the successor of Album Station and migrates its albums automatically.

Structure

Path What it does
coverfold.php Plugin bootstrap
includes/class-coverfold-post-type.php coverfold_album post type, coverfold_category taxonomy
includes/class-coverfold-meta-box.php Album edit screen: media picker, video links
includes/class-coverfold-album.php Album data and lightbox items
includes/class-coverfold-videos.php YouTube / playlist / Vimeo parsing and cached remote data
includes/class-coverfold-renderer.php Shared grid markup for block, widget and shortcode
includes/class-coverfold-block.php, blocks/album-grid/ Block editor block (plain JS, no build step)
includes/elementor/ Elementor widget (+ hidden Album Station compatibility widget)
includes/class-coverfold-shortcode.php [coverfold] and legacy [feature_album]
includes/class-coverfold-migration.php One-time Album Station migration
assets/vendor/foldbox/ Foldbox 1.4.2 (MIT): lightbox and animated filter, copied from the npm package

Try it in your browser

Open the demo in WordPress Playground: it installs the latest release with six sample albums and a demo page. (Playground downloads releases/latest/download/coverfold.zip, so it needs at least one release.)

How changes ship

issue  →  branch  →  pull request (Closes #N)  →  squash merge to main  →  automatic release  →  deploy (if enabled)
  • main is protected. Changes go through pull requests, merged with squash. Repository admins can still bypass the rules.
  • Every PR closes an issue. The Linked issue check fails a PR without Closes #N. One request with several changes = one issue per change, delivered in one PR.
  • CI runs on every PR and must pass: PHP 7.4–8.5 syntax and unit tests, PHPCS, PHPStan, JS/CSS lint and WordPress Plugin Check. Plugin Check fails when Tested up to in readme.txt is behind the latest WordPress, so bump it after testing each new WordPress version.
  • Releases are automatic. On each merge to main, the Release workflow releases only if the plugin zip would change (everything .distignore doesn't exclude). It bumps the version (patch by default, or minor/major with the release:minor / release:major label), writes the changelog (one line per closed issue; issues labelled changelog:skip are left out) and the version into readme.txt and the plugin header, commits that to main, tags it and publishes a GitHub release with coverfold.zip.
  • Claude skills stay current. Once a month the Agent skills sync compares .claude/skills/ with WordPress/agent-skills and, when they changed, opens an issue and a PR. Close and reopen that PR so CI runs.
  • Deploys are off. The Deploy workflow targets WordPress.org SVN (DEPLOY_METHOD=wporg) and runs only while the repo variable DEPLOY_ENABLED is true. Turn it on once the plugin is approved on WordPress.org and the SVN_USERNAME / SVN_PASSWORD secrets are set.

Development

composer install && npm ci
Command What it checks
composer lint PHP syntax
composer phpcs WordPress Coding Standards (composer phpcbf fixes most issues)
composer phpstan Static analysis
composer test Unit tests
npm run lint JS and CSS (Node 22.12 or newer)

Updating Foldbox

Foldbox is an npm dependency. The plugin ships a copy of its built files in assets/vendor/foldbox/, because the release zip has no node_modules. After changing its version in package.json (Dependabot opens a monthly PR for it), run:

npm ci && npm run vendor:foldbox

and commit the result. This copies foldbox.min.js, foldbox.min.css and LICENSE, and updates the Foldbox version in class-coverfold-assets.php, readme.txt and this README. CI (npm run vendor:foldbox:check) fails while the shipped copy differs from the installed package.

A local site: cp .env.example .env && docker compose up -d, then open http://localhost:8000.

Developer hooks

  • coverfold_post_type_args, coverfold_taxonomy_args – change registration arguments
  • coverfold_query_args – change the album query
  • coverfold_album_items – change an album's lightbox items
  • coverfold_grid_html – change the grid markup
  • coverfold_playlist_max_videos – videos loaded per YouTube playlist (max 50)
  • coverfold_deep_links – return false to stop the address bar following the open album, photo and category (#album=slug&photo=2, #category=slug)

License

GPL-3.0-or-later. See LICENSE.

Photo and video credits

The screenshots and the Playground demo use photos from the WordPress Photo Directory, shared under CC0. Thank you to the photographers:

Videos in the demo:

  • Anna's hummingbird (Calypte anna) in the rain by Love Star Production, CC0, via Wikimedia Commons; trimmed and re-encoded as demo/hummingbird-rain.mp4 (Birds, a self-hosted Media Library video).
  • Blender open movies by the Blender Foundation / Blender Studio, Creative Commons Attribution, embedded from their official channels: Big Buck Bunny (Vimeo, Big animals), Spring (Waterfalls & forests), Sintel (Mountains & lakes) and Coffee Run (Bistro plates) on YouTube.

About

CoverFold – Photo & Video Album Gallery. Stunning photo and video albums for WordPress, with a block editor block and an Elementor widget.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages