YahnisElsts / wp-update-server-stats

Gather statistics from wp-update-server logs
MIT License
46 stars 17 forks source link

ClassicPress support #3

Closed nomanualdev closed 5 years ago

nomanualdev commented 5 years ago

Hello,

It's possible to show ClassicPress like WordPress sites usage? several users are migrating because Gutenberg and the stats doesn't show how many users are using themes and plugins with ClassicPress.

Regards.

YahnisElsts commented 5 years ago

This project is not affiliated with ClassicPress. Did you perhaps mean to post this issue in a different repository?

nomanualdev commented 5 years ago

Our users are using WordPress and ClassicPress at the same time, for example, the stats show 68.6% of wordpress 5.1 instalations and 30.2% of "Other" but cant determinate if is "Other" means other WP versions or ClassicPress instalations.

I added the "cms" to the $UpdateChecker:

$url = ...
$url .= '&cms=' . self::detect_cms();
$UpdateChecker = Puc_v4_Factory::buildUpdateChecker($url,$target,$slug);
private static function detect_cms() {
    return (function_exists('classicpress_version_short')) ? 'ClassicPress': 'WordPress';
}

And the logs look like this: _[2019-04-05 09:56:16 -0500] 127.0.0.1 GET get_metadata {SLUG} 1.0.1 5.1.1 {WEB_URL} action=get_metadata&slug={SLUG}&token={TOKEN}&cms=WordPress&installed_version=1.0.1&php=7.0.33-1+ubuntu16.04.1+deb.sury.org+1&locale=enUS

Until here everything works fine, but the wp-update-server-stats does not show other non-wordpress cms, I understand that it was the expected behaviour, but now ClassicPress entered to the market.

ClassicPress is a fork of WP 4.9, and some users are migrating.

It's possible to expect an update for wp-update-server-status which shows WordPress and ClassicPress data?

YahnisElsts commented 5 years ago

I see, thank you for the explanation.

That sounds like a reasonable idea, but unfortunately I don't have the time to add that feature right now. If you'd like to give it a shot yourself, feel free to send a PR.