HEX
Server: Apache
System: Linux cpanelx.inxs.ro 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: crowdandsafety (1041)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/thread-self/cwd/wp-content/plugins/cornerstone/includes/shortcodes/feature-headline.php
<?php

// Feature Headline
// =============================================================================

function x_shortcode_feature_headline( $atts, $content = null ) {
  extract( shortcode_atts( array(
    'id'            => '',
    'class'         => '',
    'style'         => '',
    'type'          => '',
    'level'         => '',
    'looks_like'    => '',
    'icon'          => '',
    'icon_color'    => '',
    'icon_bg_color' => ''
  ), $atts, 'x_feature_headline' ) );

  $id    = ( $id    != '' ) ? 'id="' . esc_attr( $id ) . '"' : '';
  $class = ( $class != '' ) ? 'h-feature-headline ' . esc_attr( $class ) : 'h-feature-headline';
  $style = ( $style != '' ) ? 'style="' . $style . '"' : '';
  switch ( $type ) {
    case 'right' :
      $type = ' right-text';
      break;
    case 'center' :
      $type = ' center-text';
      break;
    default :
      $type = '';
  }
  $level      = ( $level      != '' ) ? $level : 'h2';
  $looks_like = ( $looks_like != '' ) ? ' ' . $looks_like : '';
  $icon       = ( $icon       != '' ) ? $icon : '';

  if ( $icon != '' ) {
    // @TODO move to icon system
    do_action("cs_fa_add_webfont_styles");

    $icon_style = '';

    if ( $icon_color != '' ) {
      $icon_style .= "color: {$icon_color};";
    }

    if ( $icon_bg_color !=  '' ) {
      $icon_style .= "background-color: {$icon_bg_color}!important;";
    }

    if ( $icon_style != '' ) {
      $icon_style = " style=\"{$icon_style}\" ";
    }

    $data_icon = fa_data_icon( $icon );
    $icon    = "<i class=\"x-icon-{$icon} x-framework-icon\" $data_icon {$icon_style}></i>";

  }

  $output = "<{$level} {$id} class=\"{$class}{$type}{$looks_like}\" {$style}><span>{$icon}" . do_shortcode( $content ) . "</span></{$level}>";

  return $output;
}

add_shortcode( 'x_feature_headline', 'x_shortcode_feature_headline' );