Skip to content

Instantly share code, notes, and snippets.

@johnalarcon johnalarcon/functions.php
Last active Apr 2, 2019

Embed
What would you like to do?
Filter examples for the Discourse Stats plugin for ClassicPress. These code snips can be added to a functionality plugin or the functions.php file.
<?php
// Change the update interval of the Discourse Stats plugin widgets.
function codepotent_discourse_stats_update_interval($seconds) {
return 86400; // 1 day
}
add_filter('codepotent_discourse_stats_update_interval', 'codepotent_discourse_stats_update_interval');
// Change the date format for the "Join date" of the Discourse Stats plugin for ClassicPress.
// See https://www.php.net/manual/en/function.date.php for all the possible date tokens.
function codepotent_discourse_stats_date_format() {
return 'j M Y'; // 13 JAN 2019
}
add_filter('codepotent_discourse_stats_date_format', 'codepotent_discourse_stats_date_format');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.