Mynewsdesk

描述

wpMynewsdesk integrates the Mynewsdesk pressroom API with WordPress. Enter your Mynewsdesk API key in Settings » myNewsDesk, place the [mynewsdesk] shortcode anywhere on your site, and the plugin fetches and renders your press releases, news, blog posts, events, images, videos, documents and contacts.

This plugin is not built by Mynewsdesk and Mynewsdesk does not provide support for it.

Highlights

  • Modern, object-oriented codebase (PHP 8.0+).
  • All output is escaped; all input is sanitized.
  • AJAX requests are protected by WordPress nonces.
  • HTTP requests use the WordPress HTTP API (wp_remote_get) with timeout and user-agent.
  • XML parsing is hardened against XXE (LIBXML_NONET).
  • Compatible with WordPress 6.5 through 7.0.

安装

  1. Upload the plugin folder to wp-content/plugins/ or install it through the WordPress Plugins screen.
  2. Activate the plugin from the Plugins screen.
  3. Open Settings » myNewsDesk and enter your unique Mynewsdesk API key.
  4. Set the pressroom site (country code such as se for Sweden or uk for the United Kingdom).
  5. Pick a default media type and the media types you want to display.
  6. Add the [mynewsdesk] shortcode to a page or post.

常见问题

Where do I get the API key?

Contact the Mynewsdesk team to obtain an API key. See https://www.mynewsdesk.com/docs/webservice_pressroom for details.

Why am I seeing “Unable to load content from Mynewsdesk”?

The plugin could not reach the Mynewsdesk API or received an invalid XML response. Verify your API key, pressroom site and that outbound HTTPS traffic is allowed from your server.

评价

阅读所有2条评价

贡献者及开发者

「Mynewsdesk」是开源软件。 以下人员对此插件做出了贡献。

贡献者

帮助将「Mynewsdesk」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

2.0.0

  • Rewrote the plugin as a namespaced, single-file OOP class.
  • Added strict input sanitization and full output escaping across the admin UI, shortcode and AJAX responses.
  • Added nonce verification (check_ajax_referer) to the AJAX endpoint.
  • Replaced direct DOMDocument::load($url) calls with wp_remote_get() plus hardened SimpleXML parsing (LIBXML_NONET).
  • Switched the API endpoint to HTTPS.
  • Replaced deprecated screen_icon() and WP_PLUGIN_URL usage with modern equivalents (plugin_dir_url, add_query_arg).
  • Migrated the settings screen to the WordPress Settings API with sanitize_callback for each option.
  • Migrated the AJAX response to wp_send_json_success / wp_send_json_error.
  • Renamed internal option keys (kkpo_* mnd_*). Existing installs are migrated automatically on activation or first admin load; legacy values are preserved so downgrades remain safe.
  • Set requirements: WordPress 6.5+, PHP 8.0+.

1.5

  • Legacy release.