$tab ) {
$i++;
$label = tutils()->array_get( 'label', $tab );
$callback = tutils()->array_get( 'callback', $tab );
$fields = tutils()->array_get( 'fields', $tab );
if ( $current_tab ) {
$active = $current_tab === $key ? 'active' : '';
$display = $current_tab === $key ? 'block' : 'none';
} else {
$active = 1 === $i ? 'active' : '';
$display = 1 === $i ? 'block' : 'none';
}
echo '
';
do_action( 'tutor_course/settings_tab_content/before', $key, $tab );
do_action( 'tutor_course/settings_tab_content/before/' . esc_attr( $key ) . '', $tab );
if ( tutils()->count( $fields ) ) {
$this->generate_field( $fields );
}
/**
* Handling Callback
*/
if ( $callback && is_callable( $callback ) ) {
call_user_func( $callback, $key, $tab );
}
do_action( 'tutor_course/settings_tab_content/after', $key, $tab );
do_action( 'tutor_course/settings_tab_content/after/' . esc_attr( $key ) . '', $tab );
echo '
';
}
?>