HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptuneprotect/wp-content/themes/sway/core/templates/header/content-modal-button.php
<?php

  /* Button style and color scheme */
  $btn_wrapper_class = $button_style_class = $button_color_class = $button_hover_class = $button_extra_class = '';

  if ( sway_get_option( 'tek-header-button-style' ) == 'solid-button') {
    $button_style_class .= 'tt_primary_button';
  } elseif ( sway_get_option( 'tek-header-button-style' ) == 'outline-button') {
    $button_style_class .= 'tt_secondary_button';
  } else {
    $button_style_class .= 'tt_primary_button';
  }

  if ( sway_get_option( 'tek-header-button-color' ) == 'primary-color') {
    $button_color_class .= 'btn_primary_color';
  } elseif ( sway_get_option( 'tek-header-button-color' ) == 'secondary-color') {
    $button_color_class .= 'btn_secondary_color';
  } else {
    $button_color_class .= 'btn_primary_color';
  }

  if ( sway_get_option( 'tek-header-button-hover-style' ) ) {
      $button_hover_class .= sway_get_option( 'tek-header-button-hover-style' );
  }

  if ( sway_get_option( 'tek-header-button-hover-style' ) ) {
      $button_extra_class .= sway_get_option( 'tek-header-button-hover-style' );
  }

  if ( sway_get_option( 'tek-header-button-css-class' ) ) {
      $button_extra_class = sway_get_option( 'tek-header-button-css-class' );
  }

  $btn_wrapper_class = implode( ' ', array( 'modal-menu-item', 'tt_button', $button_style_class, $button_color_class, $button_hover_class, $button_extra_class ) );
?>

<?php if ( sway_get_option( 'tek-modal-button' ) && sway_get_option( 'tek-header-button-action' ) == '1' ) : ?>
   <button class="<?php echo esc_attr($btn_wrapper_class); ?>" data-toggle="modal" data-target="#popup-modal" aria-label="<?php echo esc_html( sway_get_option( 'tek-header-button-text' ) ); ?>"><?php echo esc_html( sway_get_option( 'tek-header-button-text' ) );?></button>
<?php elseif ( sway_get_option( 'tek-modal-button' ) &&  sway_get_option( 'tek-header-button-action' ) == '2' ) : ?>
  <?php if ( '' != sway_get_option( 'tek-scroll-id' ) ) : ?>
     <a class="<?php echo esc_attr($btn_wrapper_class); ?> scroll-section" href="<?php if( is_front_page()) { echo esc_attr( sway_get_option( 'tek-scroll-id' ) ); } else { echo esc_url( site_url()) . esc_attr( sway_get_option( 'tek-scroll-id' ) );} ?>"><?php echo esc_html( sway_get_option( 'tek-header-button-text' ) );?></a>
  <?php endif; ?>
<?php elseif ( sway_get_option( 'tek-modal-button' ) && ( sway_get_option( 'tek-header-button-action' ) == '3')) : ?>
  <?php if ( '' != sway_get_option( 'tek-button-new-page' ) ) : ?>
   <a class="<?php echo esc_attr($btn_wrapper_class); ?>" <?php echo ( sway_get_option( 'tek-button-target' ) == 'new-page') ? 'target="_blank"' : 'target="_self"'; ?> href="<?php echo esc_url( sway_get_option( 'tek-button-new-page' ) ); ?>"><?php echo esc_html( sway_get_option( 'tek-header-button-text' ) );?></a>
  <?php endif; ?>
<?php endif; ?>