// Add custom CSS for modern dark UI add_action('admin_head', function() { echo ''; }); // Helper: Seed months table for current and next year public static function seed_months_if_needed() { global $wpdb; $months_table = $wpdb->prefix . 'pf_months'; $settings_table = $wpdb->prefix . 'pf_settings'; $settings = $wpdb->get_row("SELECT * FROM $settings_table WHERE id=1", ARRAY_A); $now = new DateTime(); $y = (int)$now->format('Y'); $targetEndYear = isset($settings['seeded_until_year']) ? max((int)$settings['seeded_until_year'], $y+1) : $y+1; $start = DateTime::createFromFormat('Y-m', $now->format('Y-m')); $end = DateTime::createFromFormat('Y-m', sprintf('%04d-12',$targetEndYear)); $cursor = clone $start; while ($cursor <= $end) { $month = $cursor->format('Y-m'); $wpdb->query($wpdb->prepare("INSERT IGNORE INTO $months_table (month) VALUES (%s)", $month)); $cursor->modify('first day of next month'); } } Hello world! – BudgetTracker

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Comments

One response to “Hello world!”

  1. A WordPress Commenter Avatar

    Hi, this is a comment.
    To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    Commenter avatars come from Gravatar.

Leave a Reply

Your email address will not be published. Required fields are marked *