[WordPress] 外掛分享: Plugin README Parser

前言介紹

  • 這款 WordPress 外掛「Plugin README Parser」是 2010-10-19 上架。
  • 目前有 30 個安裝啟用數。
  • 上一次更新是 2025-03-14,距離現在已有 51 天。
  • 外掛最低要求 WordPress 4.6 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 有 4 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

dartiss | morehawes |

外掛標籤

embed | parser | readme | markdown |

內容簡介

WordPress README 外掛

這個外掛可以把 WordPress 的 README 檔案使用 Markdown 語言轉換成 XHTML,並顯示在網站上的文章或頁面中。

對於插件開發人員來說,這是一個理想的方案,可以在不必重複努力的情況下,在自己的網站上添加說明。

主要功能包括:

將 Markdown README 轉換為 XHTML,並在任何文章或頁面上顯示
使用短碼或直接使用 PHP 函數呼叫
截圖響應式輸出
輸出被緩存以達到最大效能
作者和標籤資訊會自動加上連結
加入下載連結
可以指定要排除 README 的哪些部分
也可以省略特定的文本行
提供額外的短碼,以顯示插件橫幅及返回特定的插件數據(下載鏈接、版本號等)
在程式碼輸出上禁用 Google 翻譯
還有更多功能!

圖示來自非常有才華的Janki Rathod♥️

👉 請訪問Github 頁面以獲取最新的程式碼開發、計劃加強功能和已知問題👈

開始使用

只需在任何文章或頁面中添加[readme]短碼即可使用。例如:

[readme]WP README Parser[/readme]

這將獲取並顯示此外掛的 README。您也可以指定檔案名稱。

第一個標題(即插件名稱)會自動被隱藏,因為我們假設您已經將它添加到文章/頁面中或將其用作標題。

其他短碼參數

排除

每個 README 被劃分為多個部分。如果您希望從輸出中排除任何部分,則使用此參數列出相應部分的名稱。

第一個部分(通常是“說明”)之前的部分是有關插件的多個“元資料”,包括標籤等。這些部分會自動加入連結。但是,如果您只想排除此資料,則應使用“meta”的部分名稱。在此資料底部是一個簡短的描述,在這種情況下會保留。如果您想刪除此描述和元資料,請使用“head”的部分名稱。如果您只想刪除特定的元資料,請指定contributors、donate、tags、requires、license、license uri、tested或stable。

例如...

[readme exclude="Meta,Changelog"]WP README Parser[/readme]

這將顯示除“變更日誌”和“插件元資料”之外的整個 README。

包括

排除的相反,這允許您僅指定希望出現的部分。因此,使用上面的例子...

[readme include="Meta,Changelog"]WP README Parser[/readme]

這將僅顯示 README 文件中的 Meta 和 Changelog 部分。

與排除命令的唯一不同之處在於,您無法只包括特定部分的元資料。如果您認為需要此選項,請通過論壇與我們聯繫。

忽略

此命令與排除不同,它允許忽略 README 中的特定行。多行應以雙逗號分隔(以允許在要忽略的實際行中使用單逗號)。例如...

原文外掛簡介

WordPress README files are formatted using a version of the Markdown language. This plugin can be used to convert these to XHTML and display on a post or page of your site.
It’s ideal for plugin developers who wish to add instructions to their own site without having to duplicate effort.
Key features include…

Convert your markdown README to XHTML and display in any post or page
Use shortcodes or a direct PHP function call
Responsive output of screenshots
Output is cached for maximum performance
Links automatically added to author and tag information
Download links added
Ability to specify which sections of the readme to exclude
Can also omit specific lines of text
Extra shortcodes available to display plugin banners and to return specific plugin data (download link, version number, etc)
Google Translation suppressed on code output
And much, much more!

Iconography is courtesy of Flatart ♥️
👉 Please visit the Github page for the latest code development, planned enhancements and known issues 👈
Getting Started
To use, simply add the [readme] shortcode to any post or page. An example of use would be…
[readme]WP README Parser[/readme]

This would fetch and display the README for this plugin. You can also specify a filename instead.
The first heading, which is the name of the plugin, will be automatically suppressed as it is assumed that you have already added this to your post/page or are using it as the title.
Additional Shortcode Parameters
exclude
Each README is divided into a number of sections. If you wish to exclude any from the output then use this parameter to list them.
Before the first section (usually “Description”) is a number of pieces of “meta data” about the plugin, including tags, etc. Links are automatically added to these. If, however, you wish to just exclude this data then you should use the section name of “meta”. Underneath this data is a short description which will remain in this case. If you want to remove this description and the meta data then use the section name of “head”. If you wish to just remove a particular bit of meta data then specify contributors, donate, tags, requires, license, license uri, tested or stable.
For example…
[readme exclude="Meta,Changelog"]WP README Parser[/readme]

This will display the entire README with the exception of the Changelog and the Plugin meta.
include
The opposite of exclude this allows you to specify ONLY the section that you wish to appear. So, using the example from above…
[readme include="Meta,Changelog"]WP README Parser[/readme]

This will ONLY show the Meta and Changelog sections of the README file.
The only difference to the exclude command is that you can’t include just specific sections of the meta. If you believe that this option is required then please get in touch via the forum.
ignore
Different from exclude this allows to ignore specific lines of the README. Multiple lines should be separated by double commas (to allow single commas to be be used in the actual line to be ignored). For example…
[readme ignore="this line,,and this line"]WP README Parser[/readme]

target
Any links will have a target of _blank. If you wish this to be anything else then change it with this parameter. For example…
[readme target="_self"]WP README Parser[/readme]

nofollow
If you wish a link to have a nofollow option (i.e. the tag of rel="nofollow") then specify this as “Yes”. By default it won’t. For example…
[readme nofollow="Yes"]WP README Parser[/readme]

cache
This allows you to specify how long output should be cached for, in minutes. By default caching is set to 60 minutes. For example, to cache for 24 hours…
[readme cache=1440]WP README Parser[/readme]

version
If you wish to display a specific version of the README, use this parameter to request it. For example…
[readme version=1.0]WP README Parser[/readme]

mirror
If your plugin is hosted at a number of other locations then you can use this to specify alternative download URLs other than the WordPress repository. Simply seperate multiple URLs with double commas (i.e. ,,). For example…
[readme mirror="http://www.example1.com,,http://www.example2.com"]WP README Parser[/readme]

links
By default download and other links will be added to the bottom of the README output. By specifying a section name via this parameter, however, then the links will appear before that section. For example, to appear before the description you’d put…
[readme links="description"]WP README Parser[/readme]

name
If you specify a README filename instead a name then it will be assumed that the plugin name at the top of the README is the correct one. This may not be the case, however, if you’ve renamed your plugin (as is the case for this plugin). You can therefore use the name parameter to override this.
[readme name="WP README Parser"]https://plugins.svn.wordpress.org/wp-readme-parser/trunk/readme.txt[/readme]

ext
The extension that your screenshots are stored as – i.e. PNG or JPG.
assets
Storing your screenshots in your assets folder? Then set this to ‘yes’ for them to be read from there. For example…
[readme assets="yes"]WP README Parser[/readme]

Using Content Reveal

If you also have the plugin Content Reveal installed, then each section of the README will be collapsable – that is, you can click on the section heading to hide the section content.
By default, all sections of the output will be revealed.
You may now use 3 further parameters when using the [readme] shortcode…
hide
Use this parameter to hide sections automatically – simply click on them to reveal them again.
For example…
[readme hide="Changelog"]WP README Parser[/readme]

scr_url
If you wish to supply your own hide/reveal images then you can specify your own folder here.
The two images (one for when the content is hidden, another for when it’s shown) must be named image1 and image2. They can either by GIF or PNG images (see the next parameter).
For example…
[readme scr_url="https://artiss.blog”]WP README Parser[/readme]

scr_ext
Use this specify whether you wish to use PNG or GIF images for your own hide/reveal images. If you do not specify it, GIF will be used.
For example…
[readme scr_url="https://artiss.blog" scr_ext="png"]WP README Parser[/readme]

Using a Function Call

If you wish to code a direct PHP call to the plugin, you can do. The function is named readme_parser and accepts 2 parameters. The first is an array of all the options, the same as the shortcode. The second parameter is the README name or filename.
For example…
echo readme_parser( array( 'exclude' => 'meta,upgrade notice,screenshots,support,changelog,links,installation,licence', 'ignore' => 'For help with this plugin,,for more information and advanced options ' ), 'YouTube Embed' );

This may be of particular use to plugin developers as they can then display the README for their plugins within their administration screens.
Displaying the plugin banner
Some plugins have banners assigned to them. The shortcode [readme_banner] can be used to output them (responsively too). Between the opening and closing shortcode you must specify a plugin name (a URL can’t be used) and that’s it. For example…
[readme_banner]YouTube Embed[/readme_banner]

If no banner image exists then nothing will be output.
Display specific README information
You may wish to add your own section to the output to provide download links, etc. In which case you can suppress this section and then use an additional shortcode to retrieve the information that you need.
Use the shortcode [readme_info] to return one of a number of different pieces of information. Use the required parameter data to specify what you need – this can b…

download – Display a download link
version – Output the current version number
forum – Display a link to the forum
wordpress – Display a link to the plugin in the WordPress.org repository

In the cases of the links you must specify text between the opening and closing shortcodes to link to.
There are 4 additional parameters…

name – Use this to specify the plugin name. This is a require parameter
target – If outputting a link this will assign a target to the output (default is _blank)
nofollow – If Yes then this will be a nofollow link. By default it won’t be
cache – By default any output will be cached for 50 minutes so that if you use this shortcode multiple times on a page the data will only be fetched once. Specify a different number (in minutes) to adjust this. Set to No to switch off caching entirely

An example of usage may be…
`[readme_info name=”YouTube Embed” data=”download”]Download YouTube Embed[/readme_info]’
Reviews & Mentions
WPCandy – WP README Parser Plugin converts Plugin’s readme into blog-ready XHTML
Acknowledgements
Plugin README Parser uses PHP Markdown Extra by Michel Fortin.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Plugin README Parser」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.0.2 | 1.1.1 | 1.2.1 | 1.3.7 | 1.3.8 | 1.3.9 | trunk | 1.3.10 | 1.3.11 | 1.3.12 | 1.3.13 | 1.3.14 | 1.3.15 |

延伸相關外掛(你可能也想知道)

  • WP Githuber MD – WordPress Markdown Editor 》一個全方位的 WordPress Markdown 外掛程式,提供多種功能,包括 Markdown 編輯器、即時預覽、圖片貼上、HTML 到 Markdown 換算工具等等。, 如需詳細資訊,請...。
  • Import Markdown – Versatile Markdown Importer 》Import Markdown 讓您輕鬆地基於 Markdown 檔案生成文章。, Ultimate Markdown, 我們也運行一個WordPress外掛,將Markdown整合進區塊編輯器中。如需更多信息...。
  • WP Mermaid 》使用mermaid.js,以類似 Markdown 的方式從文本生成圖表和流程圖。, WP Mermaid 足夠智能,只會在文章中包含 Mermaid 語法的時候加載 mermaid.js,通過檢測短...。
  • WP-Markdown 》這個外掛允許您使用 Markdown 語法來撰寫任何文章類型的文章。在儲存文章之前,外掛會將 Markdown 轉換為 HTML。編輯文章時,外掛會將其轉換回 Markdown 語法...。
  • WP Editor.md – The Perfect WordPress Markdown Editor 》WP Editor.md是一款美觀且實用的Markdown文件編輯器。, 使用Editor.md提供WordPress支持。, 此外掛使用WordPress Jetpack中的Markdown模組進行內容的解析和保...。
  • Ultimate Markdown – Markdown Editor, Importer, & Exporter 》Ultimate Markdown 是一個 WordPress 外掛,可以讓您使用流行的 Markdown 語法來創建 WordPress 文章。, 安裝這個外掛後,您可以:, , 從現有的 Markdown 檔...。
  • WP Markdown Editor (Formerly Dark Mode) 》如果你想在 WordPress 快速編輯內容,而不用考慮區塊,那麼 WP Markdown Editor 就是您的完美選擇!使用最酷的編輯器-WP Markdown Editor,獲取身臨其境、寧...。
  • Markup Markdown 》這個外掛可以在編輯頁面上將 Gutenberg 區塊編輯器(或經典的 TinyMCE 編輯器)替換為基於 CodeMirror 的 Markdown 編輯器 EasyMDE。, 內容以 Markdown 語法...。
  • Markdown Comment Block 》只顯示於區塊編輯器的評論, 我喜歡在 Ulysses 本地或使用 我的部落格 的 Iceberg 編輯器 草擬文章。雖然我很喜歡 Iceberg,但當我發布一篇文章時,我通常會切...。
  • Todo List Block 》易於編輯的區塊, 在進行這個項目時,我探索了一些可以改善個人發布流程的地方。其中一個地方是使用我的Markdown Comment區塊,將編輯者的評論帶入Gutenberg之...。
  • Markdown Editor 》Markdown Editor會將預設的WordPress編輯器替換為一個Markdown編輯器,供您在文章和頁面中使用。此外,該外掛使用Jetpack Markdown模組將Markdown轉換為HTML...。
  • Documents from Git 》官方文件: https://github.com/gis-ops/wordpress-markdown-git, 這個WordPress外掛讓您能夠輕鬆地從您最喜愛的遠端Git平台上發布、協作和版本控制您的[...。
  • Git it Write – Write posts from GitHub 》Git it Write允許將存儲在Github存儲庫中的markdown文件發布到您的WordPress網站中。因此,使用此外掛程序,當存儲庫中添加、更新文件時,WordPress文章將相...。
  • WP Gatsby Markdown Exporter 》這個外掛可以建立包含已轉換為 Markdown 格式的文章的 zip 檔案。此外,還可以使用 WP-CLI 命令進行網站的大量內容匯出。其他的功能包括:, , - 將 WordPress...。
  • External Markdown 》這是一個 WordPress 外掛,可使用短碼 [external_markdown] 從外部網站(例如 GitHub、GitLab 等)嵌入 Markdown 文件到 WordPress 內容中。可能的使用情況是...。

文章
Filter
Apply Filters
Mastodon