Control: Pages - 10quality/wpmvc-addon-metaboxer GitHub Wiki
Control used as a field type to display a dropdown (<select>
) with all WordPress pages listed.
class Post extends Model
{
// Class properties and methods...
protected function init()
{
$this->metaboxes = [
'metabox_id' => [
'tabs' => [
'tab_id' => [
'fields' => [
'my_page' => [
'type' => 'pages',
'title' => __( 'My Page', 'my-domain' ),
],
// Other fields...
],
],
],
],
];
}
}
Control | Data type | Description |
---|---|---|
wide |
bool |
Flag that indicates if the input should display wider or small. |
show_option_none |
string |
See WordPress documentation. |
show_option_no_change |
string |
See WordPress documentation. |
option_none_value |
string |
See WordPress documentation. |
value_field |
string |
See WordPress documentation. |
depth |
int |
See WordPress documentation. |