Need help in the process of creating your own WordPress theme?
Population option type.
Do no use this option by any means. Use the official method of adding population for the options presented in Introduction. This option was created for some special cases:
In 99% of the cases the official method will meet all your needs.
| Name | Type | Required | Description |
|---|---|---|---|
| options | array |
no |
List of options that population covers. |
| Name | Type | Default | Description |
|---|---|---|---|
| iconOnly | boolean |
false |
Hide the input with the population name, keeping only the dropdown. |
| choices | array |
List of population methods. Check out Population method section. |
| Name | Type | Default | Description |
|---|---|---|---|
| value | string |
"" |
Population method id. |
| Name | Type | Required | Description |
|---|---|---|---|
| value | string |
yes |
Valid population method is. |
| title | string |
yes |
Population method title. |
| icon | string |
no |
Custom icon for population method. |
{
id: "titlePopulation",
type: "population"
config: {
choices: [
{ id: "post-id", title: "Post ID" },
{ id: "post-title", title: "Post Title" },
{ id: "post-excerpt", title: "Post Excerpt" },
]
},
options: [
{
id: "title",
label: "title"
type: "inputText"
}
]
}
{
id: "titlePopulation",
type: "population"
config: {
iconOnly: true,
choices: [
{ id: "post-id", title: "Post ID" },
{ id: "post-title", title: "Post Title" },
{ id: "post-excerpt", title: "Post Excerpt" },
]
}
}