<?php
/*
Plugin Name: Weekly Charts
Description: Renders the weekly charts block on the homepage.
Version: 1.0
*/

register_block('weekly', function (): void {
    $db = $GLOBALS['db'] ?? null;
    $db1 = $GLOBALS['db1'] ?? null;
    if (!$db instanceof PDO || !$db1 instanceof CMSMySQLiCompat) {
        return;
    }

    require __DIR__ . '/weekly.php';
});
