braekling / WP-Matomo

Official WP-Matomo (former WP-Piwik) repository
GNU General Public License v3.0
31 stars 29 forks source link

Add do_action in onloadStatsPage to create widgets from outside of wp-piwik #41

Closed hrhthegreat closed 3 years ago

hrhthegreat commented 7 years ago

Hi,

I added do_action to the onloadStatsPage in WP_Piwik.php, So I am able to add my own widget from my own plugin to statistics page. It's also good if there will be an ability to remove the existing widgets from statistics page with actions or filters like this.

hrhthegreat commented 7 years ago

Hello,

I've also added ability to turn off and on the statistics widgets from admin settings. Please review the commits and let me know if it is OK.

braekling commented 7 years ago

Hi, thanks for your contribution!

I'm just wondering if it's really necessary to allow widget disabling by the settings? You can also disable widgets on the dashboard page's settings.

If this is necessary, it may be a good idea to offer the widget management for plugins ("outside widgets"), too. I'll think about this.