We'll create fresh WordPress site with File Inliner installed. You have 20 minutes to test the plugin after that site we'll be deleted.
This plugin displays the content of a file in a post. The content of the file
(called a “snippet”) is put in a <pre></pre>
block by default.
It has the following advantages over pasting the content of the file in your post
yourself:
If requested (see the preserveformat
parameter), the content of the file
is put in a <div></div>
block, with each line (delimited by
the carriage return) in its own <p></p>
block.
Syntax: [file lang="some_lang" start="a_line_number" end="a_line_number" link="on_or_off" style="some_style_properties" preserveformat="on_or_off"]path/to/your/file[/file]
Note: The order of the attributes is mandatory!
In your post, write [file]path/to/your/file[/file]
. That’s it!
If you write [file lang="cpp"]path/to/your/file[/file]
(for instance),
and if the syntax highlighter plugin you use supports
the <pre lang="*"></pre>
syntax (most does), then the content
of your file will be processed by the syntax highlighter plugin as usual.
If you write [file link="on"]path/to/your/file[/file]
, a link will
be automatically added to the top left of the text area.
If you write [file start="10" end="20"]path/to/your/file[/file]
,
only the lines 10 to 20 of the file will be displayed. You can omit the start
(ie. “from beginning to line 20”) or the end (ie. “from line 10 to the end of
the file”) if you want.
In your post, write [file style="color: #FF0000;"]path/to/your/file[/file]
.
Just write [file off]your content[/file]
.
Note: The ‘off’ attribute must come BEFORE any other ones.