Download the PHP package getolympus/olympus-file-field without Composer
On this page you can find all versions of the php package getolympus/olympus-file-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download getolympus/olympus-file-field
More information about getolympus/olympus-file-field
Files in getolympus/olympus-file-field
Package olympus-file-field
Short Description Content field, this component is a part of the Olympus Dionysos fields.
License MIT
Homepage https://github.com/GetOlympus/olympus-dionysos-field-content
Informations about the package olympus-file-field
Dionysos Content Field
This component is a part of the Olympus Dionysos fields for WordPress.
Field initialization
Use the following lines to add a content field
in your WordPress admin pages or custom post type's meta fields:
Note the $identifier
(first ::build()
parameter) is set to false
because no value is stored in database.
Variables definitions
Variable | Type | Default value if not set | Accepted values |
---|---|---|---|
title |
String | 'File contents' |
empty |
content |
String | empty | empty |
debug |
Bookean | empty | empty |
file |
String | false |
true or false |
vars |
Array | empty | empty |
Notes:
- Set
content
to display HTML tags. It can be used as a fallback if file doesn't exist - Set
debug
totrue
to enable the debug mode in case file inclusion fail - Set
file
to define the PHP file path to include asinclude_once
PHP function
Vars usage
In the included file (im_the_batman.php
in this example), you can use the $v
variable as an array:
Content display priority
The component will display, by priority:
- included
file
path - everything in
content
Note: do not forget to set debug
to true
to display an error in the case the file
does not exist or is not readable.
Release History
0.0.12
- Remove useless description
0.0.11
- New Olympus components compatibility
- Change repository to be a part of Dionysos fields
0.0.10
- FIX: content raw display on twig file
Contributing
- Fork it (https://github.com/GetOlympus/olympus-dionysos-field-content/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
Built with ♥ by Achraf Chouk ~ (c) since a long time.