Filters for “views per day” string

I was wondering if you could add some filters to your plugin. I would like to show “566 x” instead of “566.28 views per day” in the widget. I have to change couple of lines of code every time you release a new version. It would really help if I could just implement some filter in my theme.

Have a look at lines 699-711 in includes/class-wordpress-popular-posts-output.php. I suggest changing them to the code snippet below. Would that be a problem? Thanks

thanks for a quick reply. Sure, I could use filter “wpp_custom_html” or “wpp_post”, but that would leave me with a lot of unnecessary code and I would have to keep track of any changes to these bits of code in your plugin to keep it working going forward. It would be really neat if you could add the two filters I suggested. I understand if you don’t feel it’s important, but it would help a lot. And your plugin would be one bit more developer friendly 🙂

The Custom Markup option built-in into the widget is quite minimal, and the filter hooks don’t take that much space either. I guess we’ll have to agree to disagree on this one.

(…) I would have to keep track of any changes to these bits of code in your plugin to keep it working going forward.

Not really, no. I avoid making changes that would break existing funcionality unless I have a very good reason to do so, so you don’t have to worry about that.

It would be really neat if you could add the two filters I suggested.

Since there are already a few ways in place to customize the HTML output of the widget, chances are it won’t happen to be honest. If you feel these are not developer friendly enough, then please keep doing what feels best for you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Filters for “views per day” string’ is closed to new replies.