Open Government Publications WP Registry grade D+. High-severity findings · 2 findingsWP RegistryHigh-severity findings · 2 findingsOpen the reportD+
Import and publish Government Publications through the WordPress REST API.
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/openwebconcept/open-government-publications/releases/download/2.0.11/open-government-publications.zipPlugin Open Government Publications
This WordPress plugin imports government publications from officielebekendmakingen.nl into WordPress and exposes them through the REST API.
Overview
Usage
After installation of the plugin (see Installation), open the plugin settings page by navigating to "Open Publications" -> "Settings". An import process should automatically start after an organization on the settings page has been configured. If not, navigate to "Open Publications" -> "Import options" and start a manual import process.
When publications have been imported, they are automatically exposed through the WordPress REST API. The main endpoint can be found at: https://yoursite.com/wp-json/owc/govpub/v1.
Search publications
Search through all publications. Optionally filter the results by using the parameters below.
Endpoint: /wp-json/owc/openpub/v1/search
Parameters:
All parameters are optional.
| Parameter | Type | Values | Effect | Default |
|--|--|--|--|--|
| s | string | | The search query. | "" (empty)
| limit | int | | Limit the list of returned publications to the specified amount. | 20 |
| page | int | | The page number for multipage results. | 1
| order | string | | The column to sort on. | "date"
| orderby | string | "ASC" or "DESC" | The sorting direction. | "DESC"
| open_govpub_type | string | | Find publications that are within this type. Expects the type' slug. | "" (empty)
Publication types
Publications are of a certain type. This endpoint exposes the list of available types. Uses WP_Term as storage.
Endpoint: /wp-json/owc/openpub/v1/types
Parameters:
All parameters are optional.
| Parameter | Type | Values | Effect | Default |
|--|--|--|--|--|
| return | string | "object", "array", "" | Return all WP_Term data. Omitting this parameter returns a key=>value list of the slug and name. | ""
| hide_empty | bool | 0 or 1| Either hide or show empty types. Pass a 1 to show empty types. | 1
Installation
For users
- Download the latest release from the releases page
- Unzip and move all files to the
/wp-content/plugins/open-government-publicationsdirectory. - Activate the plugin through the WordPress admin interface
- Open the plugin settings page by navigating to "Open Publications" -> "Settings".
An import process should automatically start after an organization on the settings page has been configured. If not, navigate to "Open Publications" -> "Import options" and start a manual import process.
Configuring an actual Cronjob is highly recommended.
For developers
To contribute to this project, you will need to download Composer and NPM.
- Clone this repository to your machine and/or WordPress installation
- Use Composer (
composer install) and NPM (npm i) to install the required dependencies - Run
npm run watchto automatically rebuild assest whenever a file changes or runnpm run buildfor a one-off build.
To create an optimized and zipped build, run the package.sh script. This also requires Composer and NPM to run.
Please adhere to the PSR-12 coding standard when adding changes to this plugin. For more information, view the PHP-FIG website.
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
Testing
Please make sure you have installed the dev dependencies and run:
$ composer test
$ composer phplint
$ composer phpcompatibility
This project also uses Psalm for code analysis:
$ composer psalm
Security
If you discover any security related issues, please email s.dekroon@sudwestfryslan.nl instead of using the issue tracker.
Releases
11 releases. Each count is every asset in that release; expand a row for the breakdown.
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.