• Resolved spielo

    (@spielo)


    Hi,

    will there one time coming a setting timeframe for Online Visitors? At the moment after every plugin update we have to change in onlinemodul the time settings.

    Thanks

    • This topic was modified 2 weeks, 3 days ago by spielo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi spielo,

    Thanks for raising this, and sorry for the repeated work.

    You are right that there is no setting for it yet. The Online Visitors window is fixed at 5 minutes inside the plugin code, so the change you make by
    hand is replaced every time the plugin updates. That will happen with any edit to plugin files.

    We are going to fix this properly. First we will add a filter so you can set the value from a small snippet in your own theme or a helper plugin, which
    survives updates. After that we plan to expose it as a normal setting in the admin.

    In the meantime, could you tell us what value you change it to, and what works better about it for your site? That helps us choose a sensible range and
    default.

    Regards,

    Thread Starter spielo

    (@spielo)

    Hi,

    Thanks for the replay, we use different timeframes by sites up to 240 minutes

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi spielo,

    Thanks, that helps. We have added a filter for exactly this, so you can set the window once and it will not be wiped by updates. It is in our development branch now and ships in the next release.

    Put this in a small helper plugin, or in your theme functions file, and set the minutes to whatever suits each site. For 240 minutes:

    add_filter( 'wp_statistics_online_visitors_timeframe', function () { return 240; } );

    Once you are on the next release, that is all it takes, on every site, and updates leave it alone.

    Best

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

You must be logged in to reply to this topic.