diff --git a/docs/hooks/hook_civicrm_tabset.md b/docs/hooks/hook_civicrm_tabset.md index 7376028ea0631bd21013a626c198d804603a80c5..6be8ef6e639e7d32278398a21b3e27a978292f5d 100644 --- a/docs/hooks/hook_civicrm_tabset.md +++ b/docs/hooks/hook_civicrm_tabset.md @@ -99,8 +99,7 @@ contributions and events. // return an html snippet etc. $url = CRM_Utils_System::url( 'civicrm/contact/view/contribution', "reset=1&snippet=1&force=1&cid=$contactID" ); - // $url should return in 4.4 and prior an HTML snippet e.g. '<div><p>....'; - // in 4.5 and higher this needs to be encoded in json. E.g. json_encode(array('content' => <html form snippet as previously provided>)); + // this needs to be encoded in json. E.g. json_encode(array('content' => <html form snippet>)); // or CRM_Core_Page_AJAX::returnJsonResponse($content) where $content is the html code // in the first cases you need to echo the return and then exit, if you use CRM_Core_Page method you do not need to worry about this. $tabs[] = array( 'id' => 'mySupercoolTab', @@ -109,4 +108,4 @@ contributions and events. 'weight' => 300, ); } - } \ No newline at end of file + }