Advertisement
geminilabs

[site-reviews] include the IP Address in API requests

Mar 11th, 2024 (edited)
801
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. add_filter('site-reviews/rest-api/reviews/schema/properties', function (array $properties) {
  2.     if (isset($properties['ip_address']['context'])) {
  3.         $properties['ip_address']['context'] = ['edit', 'view'];
  4.     }
  5.     return $properties;
  6. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement