function team_settings_tabs_20200516($team_settings_tab) {
$current_tab = isset($_POST['tab']) ? $_POST['tab'] : 'general';
$team_settings_tab[] = array(
'id' => 'custom',
'title' => sprintf(__('%s Custom','team'),'<i class="fas fa-list-ul"></i>'),
'priority' => 3,
'active' => ($current_tab == 'custom') ? true : false,
);
return $team_settings_tab;
}
add_filter('team_settings_tabs', 'team_settings_tabs_20200516', 99);
add_action('team_settings_content_custom', 'team_settings_content_custom_20200216');
function team_settings_content_custom_20200216(){
$settings_tabs_field = new settings_tabs_field();
$team_settings = get_option('team_settings');
$custom_option = isset($team_settings['custom_option']) ? $team_settings['custom_option'] : '';
?>
<div class="section">
<div class="section-title"><?php echo __('Custom Tab', 'team'); ?></div>
<p class="description section-description"><?php echo __('Custom tab description.', 'team'); ?></p>
<?php
$args = array(
'id' => 'custom_option',
'parent' => 'team_settings',
'title' => __('custom option','team'),
'details' => __('Write custom option details.','team'),
'type' => 'text',
'value' => $custom_option,
'default' => '',
'placeholder' => 'Custom text here',
);
$settings_tabs_field->generate_field($args);
?>
</div>
<?php
}
View post on imgur.com