MP_Settings::button( array $args )
Callback button function.
Contents
Parameters Parameters
- $args
-
(array) (Required) array of arguments
Source Source
File: mortgage-platform/Inc/Base/MP_Settings.php
public function button( $args ) {
$name = $args['label_for'];
$option_name = $args['option_name'];
$input = get_option( $option_name );
$description = $args['description'];
$default = $args['default'];
$value = isset( $input[ $name ] ) ? $input[ $name ] : $default;
echo '<button id="' . esc_attr( $name ) . '" class="button">' . esc_attr( $value ) . '</button>';
echo '<p>' . esc_attr( $description ) . '</p>';
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |