Submitted by sudeepg on Tue, 10/28/2008 - 12:00.
Use the following function in '_phptemplate_variables' function in template.php. In the following code snippet, if I want to remove the "Edit" tab:
<?php
function _phptemplate_variables($hook, $vars = array()) {
if($hook == 'page') {
yourthemename_removetab('Edit', $vars);
// add additional lines here to remove other tabs
}
return $vars;
}
function yourthemename_removetab($label, &$vars) {
$tabs = explode("\n", $vars['tabs']);
$vars['tabs'] = '';
foreach($tabs as $tab) {
if(strpos($tab, '>' . $label . '<') === FALSE) {
Recent comments
1 week 6 hours ago
2 weeks 5 days ago
4 weeks 14 hours ago
4 weeks 2 days ago
4 weeks 4 days ago
4 weeks 5 days ago
29 weeks 1 day ago
29 weeks 5 days ago
29 weeks 5 days ago
30 weeks 22 hours ago