Skip to content

Commit

Permalink
Merge pull request #720 from 3Dgoo/4
Browse files Browse the repository at this point in the history
Replace deprecated sort rand with shuffle
  • Loading branch information
GuySartorelli committed Aug 18, 2023
2 parents e9390c3 + bcbb40e commit b9c535a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Widgets/BlogFeaturedPostsWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function getPosts()
return $blog->getBlogPosts()
->filter('ID:not', Director::get_current_page()->ID)
->filter('FeaturedInWidget', true)
->sort('RAND()')
->shuffle()
->limit($this->NumberOfPosts);
}

Expand Down

0 comments on commit b9c535a

Please sign in to comment.