Class AdminPageFramework_WPReadmeParser
Parses WordPress readme files and generates HTML outputs.
This helps when creating a help page with some readme file contents.
Usage
Set a file path or a text content of WordPress formatted readme and instantiate the class. Then perform theget()
method by passing a section name.
If a section name is omitted, the entire contents will be returned.
Example
$_sText = '...'; $_oParser = new AdminPageFramework_WPReadmeParser; $_oParser->setText( $_sText ); $_sText = $_oParser->get();
$_sFilePath = dirname( __FILE__ ) . '/aa/bbb/readme.txt'; $_oParser = new AdminPageFramework_WPReadmeParser( $_sFilePath ); $_sFAQ = $_oParser->get( 'Frequently asked questions' ); // passing the section name
Package: AdminPageFramework\Utility
Copyright: Copyright (c) 2013-2022, Michael Uno
Author: Michael Uno
Since: 3.5.0
Uses: AdminPageFramework_Parsedown
Located at utility/readme_parser/AdminPageFramework_WPReadmeParser.php
Copyright: Copyright (c) 2013-2022, Michael Uno
Author: Michael Uno
Since: 3.5.0
Uses: AdminPageFramework_Parsedown
Located at utility/readme_parser/AdminPageFramework_WPReadmeParser.php
Methods summary
public
|
#
__construct( string $sFilePathOrContent = '', array $aReplacements = array(), array $aCallbacks = array() )
Sets up properties. If you don't have a file path but a text string, then omit the first
parameter and use the Parameters
Since
3.5.0
3.6.0 Made it accept string content to be passed to the first parameter. |
public
|
|
public
string
|