= DAY_IN_SECONDS ) { update_option( self::OPT_DROPPED_COUNT, 1, false ); update_option( self::OPT_DROPPED_RESET_AT, $now, false ); return; } $count = (int) get_option( self::OPT_DROPPED_COUNT, 0 ); update_option( self::OPT_DROPPED_COUNT, $count + 1, false ); } /** * Get the current 24h rolling drop counter (for admin status panel). * * @return int */ public static function get_drop_count_24h(): int { $reset_at = (int) get_option( self::OPT_DROPPED_RESET_AT, 0 ); if ( 0 === $reset_at || ( time() - $reset_at ) >= DAY_IN_SECONDS ) { return 0; } return (int) get_option( self::OPT_DROPPED_COUNT, 0 ); } }