Yes, you have to be staying onsite -- usually in a rack-rate room with at least a one-day base ticket purchase, or in a
DVC resort on a points stay.
DDP is a Disney promotion for Disney resorts -- not for Disney restaurants. They are trying to encourage people to stay onsite by offering an "all-inclusive" option like you would get on a cruise or all-inclusive resort.