considbrs-webdev/modularity-noticeboard

A Modularity module that implements a municipal digital noticeboard for publishing legally binding public notices—meeting summons, agendas, adjusted minutes and decisions—replacing the physical noticeboard, managing appeal deadlines under municipal law, and providing accessible, auditable, and integ

Maintainers

Package info

github.com/Considbrs-Webdev/modularity-noticeboard

Type:wordpress-plugin

pkg:composer/considbrs-webdev/modularity-noticeboard

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-dev 2026-03-25 16:10 UTC

This package is auto-updated.

Last update: 2026-03-26 11:13:59 UTC


README

A Modularity module that implements a municipal digital noticeboard for publishing legally binding public notices—meeting summons, agendas, adjusted minutes and decisions—replacing the physical noticeboard, managing appeal deadlines under municipal law, and providing accessible, auditable, and integratable publication workflows.

Features

Custom Post Type for Notices

The plugin registers a custom post type noticeboard_notice for managing notices. Each notice can contain:

  • Title and content
  • Publication date
  • Archive/expiration date
  • Attached PDF documents
  • Protocol links

Taxonomies

Two taxonomies are available for organizing notices:

  • Notice Types (noticeboard_notice_type) – Categorize notices by type (e.g., meeting summons, agendas, decisions, minutes)
  • Notice Groups (notice_group) – Assign notices to responsible groups or departments (e.g., municipal board, committees)

Modularity Module

The Noticeboard module can be placed on any page using Modularity and offers the following display settings:

  • Display style – Choose how notices are presented (e.g., card view)
  • Number of notices – Limit how many notices to show
  • Filter by notice type – Show only specific types of notices
  • Group by notice type – Organize displayed notices by their type
  • Archive mode – Display all notices (useful for archive pages)
  • Archive link button – Add a link to the full noticeboard archive

Archive Support

The plugin provides archive display capabilities:

  • Built-in post type archive for notices
  • Option to use a custom page as the archive
  • Configurable URL slug for the post type
  • Breadcrumb integration for navigation

Requirements

Recommended:

Installation

  1. Download or clone the plugin to your /wp-content/plugins/ directory:

    cd wp-content/plugins
    git clone https://github.com/considbrs-webdev/modularity-noticeboard.git
  2. Install PHP dependencies:

    cd modularity-noticeboard
    composer install
  3. Install JavaScript dependencies and build assets:

    npm install
    npm run build
  4. Activate the plugin through the WordPress admin panel under Plugins.

  5. Flush permalinks by visiting Settings → Permalinks and clicking "Save Changes".

Configuration

General Settings

Navigate to Noticeboard → Settings in the WordPress admin to configure:

  • Post type slug – Customize the URL slug for notices (default: notice)
  • Custom archive page – Optionally use a regular page as the noticeboard archive instead of the default post type archive
  • Archive page selection – Choose which page to use as the archive when custom archive is enabled
  • Breadcrumb title – Customize the title displayed in breadcrumbs
  • Archival action – Choose what happens when a notice is archived:
    • Unpublish (default) – Sets the notice to draft status, preserving it for future reference
    • Delete – Permanently removes the notice from the database

Setting Up Notice Types

  1. Go to Noticeboard → Types
  2. Add the types of notices you'll be publishing (e.g., "Meeting Summons", "Agenda", "Minutes", "Decision")
  3. Configure display settings for each type if needed

Setting Up Notice Groups

  1. Go to Noticeboard → Groups
  2. Add groups representing the entities that publish notices (e.g., "Municipal Board", "Building Committee")

Using the Module

  1. Edit a page and add the Noticeboard module using Modularity
  2. Configure the module settings:
    • Choose display style
    • Set number of notices to display
    • Select specific notice types to show (optional)
    • Enable grouping by notice type
    • Enable archive button to link to full noticeboard

Usage

Creating a Notice

  1. Go to Noticeboard → Add New
  2. Enter the notice title
  3. Add content or attach a PDF document
  4. Select the appropriate notice type
  5. Assign to the relevant group
  6. Set publication and archive dates if applicable
  7. Publish the notice

Displaying Notices

Add the Noticeboard module to any page through Modularity to display notices. For a full archive view, either:

  • Use the built-in archive at /notice/ (or your configured slug)
  • Create a page with the Noticeboard module in archive mode

Hooks and Filters

The plugin provides several filters for customization:

  • Modularity/Module/Noticeboard/GroupIcon – Customize the group icon
  • Modularity/Module/Noticeboard/GroupTitleVariant – Customize group title heading level
  • Modularity/Module/Noticeboard/NoticeTitleVariant – Customize notice title heading level
  • Modularity/Module/Noticeboard/TitleVariant – Customize module title heading level
  • Modularity/Module/Noticeboard/ArchiveLabel – Customize archive button text
  • Modularity/Module/Noticeboard/ArchiveIcon – Customize archive button icon
  • Modularity/Module/Noticeboard/ArchiveButtonStyle – Customize archive button styling

WP-CLI Commands

The plugin includes WP-CLI commands for managing notices from the command line.

Archive Notices

Archive notices that have passed their archive date:

# Archive all notices with passed archive dates
wp noticeboard archive

# Preview what would be archived (dry run)
wp noticeboard archive --dry-run

List Notices

List all notices with their archive status:

# List notices in table format
wp noticeboard list

# Output as JSON
wp noticeboard list --format=json

# Output as CSV
wp noticeboard list --format=csv

Automatic Archival (Cron Job)

To automatically archive notices when their archive date passes, you need to set up a system cron job. The plugin does not automatically archive notices on its own—you must configure a scheduled task.

Setting Up the Cron Job

Add a cron job to run the archive command daily (or at your preferred interval):

# Edit your crontab
crontab -e

# Add this line to run archival daily at 1:00 AM
0 1 * * * cd /path/to/wordpress && wp noticeboard archive --path=/path/to/wordpress

Replace /path/to/wordpress with the actual path to your WordPress installation.

Alternative: Using WP-Cron

If you prefer using WordPress's built-in scheduling, you can create a custom plugin or add to your theme's functions.php:

// Schedule the archival check
add_action('init', function() {
    if (!wp_next_scheduled('noticeboard_archive_notices')) {
        wp_schedule_event(time(), 'daily', 'noticeboard_archive_notices');
    }
});

// Run the archival
add_action('noticeboard_archive_notices', function() {
    if (class_exists('WP_CLI')) {
        return; // Skip if running via WP-CLI
    }
    
    // Manually trigger archival logic here or use:
    // shell_exec('wp noticeboard archive --path=' . ABSPATH);
});

Note: System cron is more reliable than WP-Cron for time-sensitive operations like legal notice archival.

License

MIT License - see LICENSE for details.

Author

Developed by Consid Borås AB