Advertisement
geminilabs

Untitled

Aug 21st, 2023 (edited)
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.35 KB | None | 0 0
  1. /**
  2.  * @param array $defaults
  3.  * @param string $method
  4.  * @param array $args
  5.  * @return array
  6.  */
  7. add_filter('site-reviews/defaults/reviews', function ($defaults, $method, $args) {
  8.     $themeId = 21801; // change this as needed
  9.     if ($themeId === (int) glsr()->args($args)->theme) {
  10.         $defaults['orderby'] = 'random';
  11.     }
  12.     return $defaults;
  13. }, 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement