woof_front_builder_options_after_update
Filtert das gesamte Options-Array, nachdem eine Front-Builder-Option aktualisiert und bevor sie in der Datenbank gespeichert wurde.
Parameter
$options (array) — Assoziatives Array aller Optionen für die aktuelle Front-Builder-Instanz, einschließlich des neu aktualisierten Feldes
Quelldatei
ext/front_builder/classes/options.php:67
Code-Beispiel
add_filter('woof_front_builder_options_after_update', function($options) {
// Ensure a certain option always has a minimum value
if (isset($options['max_posts']) && $options['max_posts'] < 1) {
$options['max_posts'] = 1;
}
return $options;
});
Anwendungshinweise
- Wird während der AJAX-Methode save_options() ausgeführt.
- Empfängt das vollständige assoziative Options-Array, nachdem die einzelne Feldaktualisierung zusammengeführt wurde.
- Das Ergebnis wird JSON-kodiert und in einer benutzerdefinierten Datenbanktabelle gespeichert.