Free!

{eac}Readme Extension

$0.00

{eac}Readme loads and translates a WordPress markdown 'readme.txt' file providing shortcodes to access header lines and section blocks.

See {eac}Readme

Also available from the WordPress Plugin Directory, or from your WordPress Dashboard, go to ‘Plugins‘ »  ‘Add New‘ and search for ‘EarthAsylum‘.

SKU: eacReadme Categories: ,

Description

{eac}Readme is an {eac}Doojigger extension which loads and translates a WordPress markdown 'readme.txt' file providing shortcodes to access header lines and section blocks.

Shortcode Usage

The first used shortcode must indicate the file to load...

[eacReadme file='docfolder/readme.txt']         # file is relative to the WordPress document root folder
[eacReadme content='contentfolder/readme.txt']  # content file is relative to the WordPress content folder (wp-content/)
[eacReadme plugin='pluginfolder/readme.txt']    # plugin file is relative to the WordPress plugins folder (wp-content/plugins/)
[eacReadme theme='themefolder/readme.txt']      # theme file is relative to the WordPress themes folder (wp-content/themes/)

After which, headers and sections may be pulled from that file...

[eacReadme]All Headers[/eacReadme]              # parses all header lines
[eacReadme]headerName[/eacReadme]               # gets the value of the named header line

[eacReadme]All Sections[/eacReadme]             # parses all section blocks
[eacReadme]sectionName[/eacReadme]              # parses the content of the named section block
[eacReadme]sectionName/sub-section[/eacReadme]  # parses the content of the named sub-section within section block

One shortcode can do it all...

[eacReadme plugin='pluginfolder/readme.txt']Document[/eacReadme]    # loads the file and parses the entire document

Shortcode Examples

Get header values...

[eacReadme]Contributors[/eacReadme]
[eacReadme]Donate link[/eacReadme]
[eacReadme]Requires at least[/eacReadme]
[eacReadme]Stable tag[/eacReadme]

Get unnamed segments...

[eacReadme]Title[/eacReadme]                    # gets the '=== plugin name ===' line (before headers)
[eacReadme]Short Description[/eacReadme]        # gets the short description (between headers and first section block)

Get section blocks...

[eacReadme]Description[/eacReadme]
[eacReadme]Installation[/eacReadme]
[eacReadme]Screenshots[/eacReadme]
[eacReadme]Changelog[/eacReadme]

Get multiple blocks and/or sub-sections...

[eacReadme plugin='eacReadme/readme.txt']Short Description,Description[/eacReadme]
[eacReadme plugin='eacReadme/readme.txt']Short Description,Description/Shortcode Examples[/eacReadme]

Other Options

Override option to parse markdown when retrieving a segment

[eacReadme parse='true|false' ...]

Set class='language-*' on code blocks

[eacReadme lang='php|js|css|html' ...]

Translating Header/Section Names

Translate header/section names when retrieving All Headers, All Sections, or Document

[eacReadme translate='name=newname,...']
[eacReadme translate='Requires at least=Requires WordPress Version,Screenshots=Screen Shots']

Erase default translation table

[eacReadme translate='no|none|false']

Default translation table

[
    'Headers'               => 'Document Header',
    'Plugin URI'            => 'Homepage',
    'Stable tag'            => 'Current Version',
    'Requires at least'     => 'Requires WordPress Version',
    'Tested up to'          => 'Compatible up to',
    'Requires PHP'          => 'Requires PHP Version',
    'WC requires at least'  => 'Requires WooCommerce',
    'Requires EAC'          => 'Requires {eac}Doojigger',
    'Changelog'             => 'Change Log',
    'Screenshots'           => 'Screen Shots',
];

Additional information

Reviews

There are no reviews yet.

Be the first to review “{eac}Readme Extension”

Your email address will not be published.

You may also like…