Add custom field automatically when post or page is publish