Download the PHP package getolympus/olympus-radio-field without Composer
On this page you can find all versions of the php package getolympus/olympus-radio-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package olympus-radio-field

Dionysos Radio Field
This component is a part of the Olympus Dionysos fields for WordPress.
Table of contents
Contributing
Field initialization
Use the following lines to add a radio field
in your WordPress admin pages or custom post type meta fields:
Variables definition
The display depends on the mode
value:
- set to
default
(orinline
), labels options will be displayed on the same line, as aninline-block
display - set to
block
, labels options will be displayed each per line, as ablock
display - set to
image
, labels options will be displayed asdefault
mode, with images and overlay text label - set to
image-block
, labels options will be displayed asblock
mode, with images and overlay text label - set to
group
, labels options will be displayed as a simple but efficient group of choices
Variable | Type | Default value if not set | Accepted values |
---|---|---|---|
title |
String | 'Radio button' |
empty |
default |
String | empty string | One of the options keys |
description |
String | empty | empty |
mode |
String | default |
see Variables definition |
options |
Array | empty | Array with a key/value options |
Texts definition
Code | Default value | Definition |
---|---|---|
t_no_options |
The field does no have any options. | Used as an error in the case no options have been set |
Retrive data
Retrieve your value from Database with a simple get_option('my_radio_field_id', '')
(see WordPress reference):
Image mode
To display images instead of simple labels, set the mode
to image
and build the field's options as follow:
Below, a full example:
Release History
Version | Note |
---|---|
0.0.19 | Remove Checkbox mode from field |
0.0.18 | Fix image label display for small images |
0.0.17 | Add group mode with native WordPress display |
Contributing
- Fork it (https://github.com/GetOlympus/olympus-dionysos-field-radio/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.