Closed justinpicard closed 5 years ago
You have to add the href to the options array.
array(
'id' => 'some_button',
'type' => 'button',
'title' => esc_html__( 'Some button', 'something' ),
'options' => array(
'value' => esc_html__( 'Button', 'something' ),
'href' => '/your-url',
'target' => '_blank', //optional
),
// below all are optional
'info' => ' some info',
'after' => ' some after',
'before' => ' some before',
'help' => ' some help',
'description' => 'Some description',
),
I added a 'button' element type to my website options page. The button shows in the options page, but the defaults are not being overwritten, so I cant give the button an own URL, value etc.
I noticed this field was also not present in the Plugin Boilerplate example.