| Server IP : 68.183.124.220 / Your IP : 216.73.217.137 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/ninja-forms/deprecated/includes/admin/ |
Upload File : |
<?php if ( ! defined( 'ABSPATH' ) ) exit;
function ninja_forms_display_tabs(){
global $ninja_forms_tabs;
$current_tab = ninja_forms_get_current_tab();
$current_page = esc_html( $_REQUEST['page'] );
$opt = nf_get_settings();
if(isset($_REQUEST['form_id'])){
$form_id = absint( $_REQUEST['form_id'] );
}else{
$form_id = '';
}
if(isset($ninja_forms_tabs[$current_page]) AND is_array($ninja_forms_tabs[$current_page])){
foreach($ninja_forms_tabs[$current_page] as $slug => $tab){
if((isset($opt['screen_options']['tab'][$slug]['visible']) AND $opt['screen_options']['tab'][$slug]['visible'] == 1) OR !isset($opt['screen_options']['tab'][$slug]['visible'])){
if($tab['add_form_id'] == 1){
$link = remove_query_arg( array( 'update_message','notification-action' ) );
if($form_id != ''){
$link = esc_url( add_query_arg( array( 'tab' => $slug, 'form_id' => $form_id ), $link ) );
}else{
$link = esc_url( add_query_arg( array( 'tab' => $slug ), $link ) );
}
}else{
$link = esc_url( remove_query_arg( array( 'form_id', 'tab', 'update_message' ) ) );
$link = esc_url( add_query_arg( array( 'tab' => $slug ), $link ) );
}
if($tab['disable_no_form_id'] AND ($form_id == '' OR $form_id == 'new')){
$link = '';
}
if( isset( $tab['url'] ) ){
$link = $tab['url'];
}
if( isset( $tab['target'] ) ){
$target = $tab['target'];
}else{
$target = '';
}
if($tab['show_this_tab_link']){
if($current_tab == $slug){
?>
<span class="nav-tab nav-tab-active <?php echo $tab['active_class'];?>"><?php echo $tab['name'];?></span>
<?php
}else{
?>
<a href="<?php echo $link;?>" target="<?php echo $target;?>" class="nav-tab <?php echo $tab['inactive_class'];?>"><?php echo $tab['name'];?></a>
<?php
}
}
}
}
}
}
?>