Google-Analytics-Popular-Posts icon indicating copy to clipboard operation
Google-Analytics-Popular-Posts copied to clipboard

Adding stats_get_csv() to replace Jetpack stats

Open foliovision opened this issue 8 years ago • 0 comments

This is tricky:

  1. if stats_get_csv() is not defined yet, it’s effectively replaced by fv_ga_stats_get_csv() which we did here. However if JetPack plugin is loaded before this plugin, it won’t be replaced.

However that function is in a JetPack module so perhaps it never loads with the plugin, but later on once JetPack reads its options.

  1. it uses “option_jetpack_active_modules” filter to disable JetPack stats module if it’s active to make sure if won’t try to redefine the stats_get_csv() function.

This whole code could be changed to an option, or it could first check if JetPack is indeed not active.

foliovision avatar Feb 02 '17 11:02 foliovision