Make sharing dialog configurable from hook_preprocess()