diff -u b/quicktabs.api.php b/quicktabs.api.php --- b/quicktabs.api.php +++ b/quicktabs.api.php @@ -5,9 +5,11 @@ * * @param &$quicktabs * A loaded Quicktabs object, either from the database or from code. - * If the object is a custom Quicktab, it's custom property is set to TRUE, and the structure of the object differs. + * + * @param &$quicktabs (optional) + * If the quicktab is a custom tab, then its contents is also provided. */ -function hook_quicktabs_alter(&$quicktabs) { +function hook_quicktabs_alter(&$quicktabs, &$custom_tabs) { } /** diff -u b/quicktabs.module b/quicktabs.module --- b/quicktabs.module +++ b/quicktabs.module @@ -197,13 +197,13 @@ $name = preg_replace('/[^[a-zA-Z]_]/', '_', $name); $contents = array(); - // Create an $info object, and pass the settings and custom tabs by reference to alter them. - $info = new stdClass(); - $info->machine_name = $name; - $info->custom = TRUE; - $info->settings = &$settings; - $info->tabs = &$custom_tabs; - drupal_alter('quicktabs', $info); + $settings = $settings + array( + 'machine_name' => $name, + 'custom' => TRUE, + ); + $info = (object) $settings; + drupal_alter('quicktabs', $info, $custom_tabs); + $settings = (array) $info; } else { // If $name doesn't correspond to an existing Quicktabs instance, and there