I want to add extra options to theme panel with conditions.. like:
<code>if (get_option("example_option")) {
/* add option to theme settings here */
}
</code>is it possible?
boweParticipant
Post count: 698
Currently you can link options together with your options.ini file. I don’t think you can show/hide an option based on if the option is filled in. It’s something that we really want to do in the future (using Ajax to show/hide more options as soon as a user selects a radio box for example.
Here’s a code example of how you can link options:
<code>[balance_box_layout]
section = "global"
title = "Box Layout"
description = "Enable Box layout?"
type = "select"
field_options[] = "yes=Yes"
field_options[] = "no=No"
default_value = "no"
[balance_box_radius]
type = "ui/slider"
section = "global"
title = "Box Border Radius"
description = "Select the border radius (rounded corners) of the box"
default_value="12"
min = 0
max = 40
step = 1
suffix = " pixels"
parent = "balance_box_layout"
</code>
The magic is in the “parent” directive at the bottom.
I mean blog options. Basically: “if a plugin activated, show an extra option” like that
boweParticipant
Post count: 698
This is a good feature request.. I know it can be done using our Extensions API.. @marshall could you chip in?