Skip to content

Sanitization Filters ​

wpsocialreviews/backend_sanitized_values ​

wpsocialreviews/backend_sanitized_values — Post-process sanitized backend input

When it runs: Applied at the end of wpsr_backend_sanitizer() (in boot/globals.php), after the sanitize map has been applied. Use it for cross-field validation or custom cleaning.

Parameters:

  • $inputs (array): the sanitized values.
  • $originalValues (array): the raw input before sanitization.

Source: boot/globals.php

Usage:

php
add_filter('wpsocialreviews/backend_sanitized_values', function ($inputs, $original) {
    // enforce your own rule on a custom field
    if (isset($inputs['my_field'])) {
        $inputs['my_field'] = strtolower($inputs['my_field']);
    }
    return $inputs;
}, 10, 2);

See Sanitizers for the sanitizer helpers themselves.

WP Social Ninja Developer Documentation