*/
public function permissionDenied() {
status_header(403);
+ global $civicrm_wp_title;
+ $civicrm_wp_title = ts('You do not have permission to access this page.');
throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
}
return !$this->isUserRegistrationPermitted();
}
+ /**
+ * Should the current execution exit after a fatal error?
+ *
+ * In WordPress, it is not usually possible to trigger theming outside of the WordPress theme process,
+ * meaning that in order to render an error inside the theme we cannot exit on error.
+ *
+ * @return bool
+ */
+ public function exitAfterFatal() {
+ $ret = TRUE;
+ if (!is_admin() && !wp_doing_ajax()) {
+ $ret = FALSE;
+ }
+
+ return apply_filters('civicrm_exit_after_fatal', $ret);
+ }
+
}