<commit_before><?php

// Shortcodes

add_shortcode('fn-shortcode','fn_shortcode'); // 1. Ausgabe in Klammern, 2. Funktionsname, gleich dem Namen darunter.
function fn_shortcode()
{
  ob_start(); ?>

  <p>Shortcode Inhalte</p>

  <?php
  return ob_get_clean();
}

// Theme Option Ausgabe Shortcodes

add_shortcode('firmenname','fn_option_name');
function fn_option_name()
{
  ob_start();

  echo the_field('company_name', 'option');

  return ob_get_clean();
}

add_shortcode('strasse','fn_option_strasse');
function fn_option_strasse()
{
  ob_start();

  echo the_field('address_street', 'option');

  return ob_get_clean();
}

add_shortcode('plz-ort','fn_option_city');
function fn_option_city()
{
  ob_start();

  $postal = get_field('address_postal', 'option');
  $city = get_field('address_city', 'option');

  echo $postal . ' ' . $city;

  return ob_get_clean();
}

add_shortcode('telefon','fn_option_tel');
function fn_option_tel()
{
  ob_start();

  echo get_field('company_phone', 'option');

  return ob_get_clean();
}

add_shortcode('fax','fn_option_fax');
function fn_option_fax()
{
  ob_start();

  echo get_field('company_fax', 'option');

  return ob_get_clean();
}

add_shortcode('mail','fn_option_mail');
function fn_option_mail()
{
  ob_start();

  echo get_field('company_mail', 'option');

  return ob_get_clean();
}
<commit_msg>added some shortcodes to match the theme settings, added a fn-icon shortcode for fontawesome usage, added antispambot to mails<commit_after><?php

// Logo

add_shortcode('logo','fn_option_logo');
function fn_option_logo()
{
  ob_start();

  $logo = get_field('company_logo', 'option');
  $logo_src = wp_get_attachment_image_src( $logo , '' );
  $logo_url = $logo_src[0];

  echo '<img src="' . $logo_url . '" alt="">';

  return ob_get_clean();
}

// Firmenname

add_shortcode('firmenname','fn_option_name');
function fn_option_name()
{
  ob_start();

  echo the_field('company_name', 'option');

  return ob_get_clean();
}

// Straße

add_shortcode('strasse','fn_option_strasse');
function fn_option_strasse()
{
  ob_start();

  echo the_field('address_street', 'option');

  return ob_get_clean();
}

// Stadt

add_shortcode('plz-ort','fn_option_city');
function fn_option_city()
{
  ob_start();

  $postal = get_field('address_postal', 'option');
  $city = get_field('address_city', 'option');

  echo $postal . ' ' . $city;

  return ob_get_clean();
}

// Telefon

add_shortcode('telefon','fn_option_tel');
function fn_option_tel()
{
  ob_start();

  echo get_field('company_phone', 'option');

  return ob_get_clean();
}

// Fax

add_shortcode('fax','fn_option_fax');
function fn_option_fax()
{
  ob_start();

  echo get_field('company_fax', 'option');

  return ob_get_clean();
}

// Mail

add_shortcode('mail','fn_option_mail');
function fn_option_mail()
{
  ob_start();

  $mail = get_field('company_mail', 'option');
  echo '<a href="mailto:' . antispambot( $mail ) . '">' . antispambot( $mail ) . '</a>';

  return ob_get_clean();
}

// Land

add_shortcode('land','fn_option_country');
function fn_option_country()
{
  ob_start();

  echo get_field('address_country', 'option');

  return ob_get_clean();
}

// Font Awesome 5 Shortcode

add_shortcode( 'fn-icon','fn_icon' );
function fn_icon( $atts )
{
  ob_start();
  $atts = shortcode_atts( array(
    'type' => 'fal',
    'name' => '',
    'size' => '',
    'cls' => '',
  ), $atts,'fn_icon' );

  if ( $atts['name'] ) {
    $name = ' fa-' . $atts['name'];
  }

  $type = $atts['type'];
  if ( $type == 'regular' || $type == 'medium' || $type == 'md' ) {
    $type = 'far';
  } elseif ( $type == 'strong' || $type == 'bold' || $type == 'solid' ) {
    $type = 'fas';
  } elseif ( $type == 'brands' || $type == 'brand' ) {
    $type = 'fab';
  }

  if ( $atts['size'] ) {
    $size = ' fa-' . $atts['size'];
  }

  if ( $atts['cls'] ) {
    $class = $atts['cls'];
  }

  echo '<i class="' . $type . $name . $size . $class . '"></i>';

  return ob_get_clean();
}

{'fraction_non_alphanumeric': 0.19154291467404982, 'fraction_numerical': 0.0010067958721369243, 'mean_word_length': 4.534818941504178, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4299053', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1480, 'n_words': 278}