Save - 10quality/wpmvc-addon-administrator GitHub Wiki
The save process is handled by the add-on. No additional code needs to be added.
Save message
To change the default success message, use the model's save_message
property in the init()
method, like this:
// Namespace and use statement...
class Settings extends Model
{
// Class properties...
protected function init()
{
$this->save_message = __( 'Hooray! Settings have been saved!', 'my-domain' );
}
}
Errors and validations
Use field options validate_callback
and validate_message
, as described in the field options article, to apply custom validation and reporting.