cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
280 stars 82 forks source link

Update Helper's time methods so they use the current_datetime() function instead of current_time() #378

Closed cabrerahector closed 6 months ago

cabrerahector commented 6 months ago

The WP team announced back in 2019 that getting timestamps via current_time() was not recommended anymore and that devs should switch to current_datetime() instead.

WordPress Popular Posts' Helper class calls current_time() in a couple of places. Let's have a look and see if these instances can / should be replaced by current_datetime().