Skip to content

Instantly share code, notes, and snippets.

@woodyhayday
Created April 18, 2018 13:49
Show Gist options
  • Save woodyhayday/8c9323c4d5935c04e44baf7887b744db to your computer and use it in GitHub Desktop.
Save woodyhayday/8c9323c4d5935c04e44baf7887b744db to your computer and use it in GitHub Desktop.
function zbsCustom_modifyTabs( $arr, $id ) {
// this is just a check :)
if (!is_array($arr)) $arr = array();
// Here we add the new tab
// 'id' = Represents HTML id attribute, must be unique & html-attribute format (e.g. a-b-c)
// 'name' = Title string
// 'content' = the HTML you want to display in your tab (you could use another function to produce this)
$arr[] = array(
'id' => 'example-tab',
'name' => 'Example Tab',
'content' => '<h2>The Company ID is: '.$id.'</h2>'
);
return $arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment