Constructive News

描述

Constructive News provides three different Gutenberg blocks showing teasers of constructive / solutions-focused news stories from a variety of different media sources, including links to the original articles on the websites of the corresponding media. The idea is not help website owners get (positive) content (news teasers) on their blogs and websites.

For this purpose they can choose among three Gutenberg blocks:

  • Constructive News Card
  • Constructive News Grid
  • Constructive News List

All articles are thoroughly handpicked by the editorial team of Squirrel News. Squirrel News is run by the German nonprofit Constructive News e.V.

This plugin is published by Jonathan Widder for Squirrel News / Constructive News e.V. and developed by Anouar Ben Hamza.

Getting started

To get started, activate the plugin, choose the language on the Constructive News settings page, then insert one of the Constructive News blocks into a post or page.

Language note: English and German content are fetched from completely different source pools and countries, so switching the language will change the geographic focus and sources of the articles.

Use of external service

This plugin is a service-based plugin.
It connects to an external content service to fetch article data:

  • Endpoint: https://getarticlesforlastissues-mdlzfg63qq-uc.a.run.app
  • Query parameters sent by the plugin: lang and limit

Without the external service response, the plugin cannot fetch fresh article content and does not work.

Service and Privacy Disclosure

This plugin performs outbound requests to the Squirrel News content service to retrieve article data.

The service is operated by Squirrel News for Constructive News e.V. and is used to deliver the curated article data shown by the plugin blocks.

The plugin sends requests to the external service whenever a Constructive News block is rendered and needs article data, including in the block editor preview and on the frontend.

Data sent to the service:

  • The selected content language (en or de)
  • The requested article limit
  • Technical request data sent by normal HTTP requests, such as the visitor IP address, user agent, and request timing

Why this data is sent:

  • To request the correct article feed
  • To return the requested number of curated articles
  • To allow the remote service to respond and operate securely

Service links:

  • Privacy Policy: https://squirrel-news.net/privacy-policy/
  • Legal notice / service terms information: https://squirrel-news.net/imprint/

Plugin settings data stored locally in WordPress:

  • Selected language (en or de)
  • Cached API payloads for performance/fallback

External links rendered on the frontend can point to:

  • Squirrel News website
  • Squirrel News support page
  • Third-party publisher article URLs

Site owners should review and publish their own privacy disclosures as needed for their jurisdiction and site policy.

Development

The distributed plugin includes the original, human-readable source files used to build the JavaScript and CSS assets.

Included source and build files:

  • src/ contains the original block editor and frontend source code
  • build/ contains the compiled production assets used by WordPress
  • package.json contains the build commands and dependencies

Build tools:

  • npm
  • @wordpress/scripts

To rebuild the generated assets:

  1. Run npm install
  2. Run npm run build

Developer Hooks

The plugin includes filters for customization without editing core files.

API filters:
* constructnews_api_lang
* constructnews_api_limit
* constructnews_api_payload
* constructnews_api_base_url
* constructnews_api_request_args
* constructnews_api_articles

Card block filters:
* constructnews_card_block_lang
* constructnews_card_labels
* constructnews_card_behavior_flags
* constructnews_card_styles
* constructnews_card_articles_prepared
* constructnews_card_display_articles
* constructnews_card_plan

Grid block filters:
* constructnews_grid_block_lang
* constructnews_grid_labels
* constructnews_grid_behavior_flags
* constructnews_grid_styles
* constructnews_grid_articles_prepared
* constructnews_grid_display_articles
* constructnews_grid_plan

List block filters:
* constructnews_list_block_lang
* constructnews_list_labels
* constructnews_list_behavior_flags
* constructnews_list_styles
* constructnews_list_articles_prepared
* constructnews_list_display_articles
* constructnews_list_plan

Example:

add_filter( 'constructnews_api_limit', function( $limit ) { return 10; } );

Blocks

This plugin provides 3 blocks.

  • Constructive News List A compact constructive news list with images on the left.
  • Constructive News Card Magazine-style cards for constructive news with images on top and equal-height text boxes.
  • Constructive News Grid Magazine-style grid cards for constructive news stories.

安裝

  1. Upload the plugin folder to /wp-content/plugins/ or install via the WordPress admin.
  2. Activate Constructive News.
  3. Go to Constructive News in wp-admin and select language.
  4. Insert one of the Constructive News blocks in the block editor.

常見問題

Does this plugin require an external service?

Yes. Fresh content is fetched from the Squirrel News content API service every 2-3 days.

Does the plugin work without API keys?

Yes. No API key is required in the current version.

What data is sent to the service?

The plugin sends language and limit values as query parameters. Standard HTTP request metadata is also transmitted by normal web requests.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Constructive News” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Constructive News 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0.0

  • First public release.