You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ale Mostajo edited this page Feb 22, 2020
·
1 revision
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...protectedfunctioninit()
{
$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.