<commit_before><?php
/**
 *   Social Share Macro
 *   ==================
 *
 *   @param {object} options     = Config Options
 *   @param {string} options.class       = Classname
 *   @param {*}      options.request     = Request URL
 *   @param {*}      options.description = Seo Description
 *   @param {*}      options.image       = Seo Image URL
 *   @param {*}      options.title       = Seo Title
 *   @param {bool}   options.icon        = Option that activate SVG Share Icons
 *   @param {string} options.iconpath    = Path to icons
 *   @param {string} options.iconname    = Iconfile Name (Sprite)
 *   @param {string} options.iconprefix  = Prefix for icons
 *   @param {string} options.viewbox     = Viewbox Size
 *   @param {object} networks = Possible Social Networks
 *   @param {bool}   networks.networks.facebook
 *   @param {bool}   networks.networks.twitter
 *   @param {bool}   networks.networks.googleplus
 *   @param {bool}   networks.networks.pinterest
 *   @param {bool}   networks.networks.mail
 *   @param {bool}   networks.networks.whatsapp
 */
function macro_socialShare($options = []) {
  $opt = [
    'class'       => 'o-socialshare',
    'request'     => get_permalink(),
    'image'       => (has_post_thumbnail() ? the_post_thumbnail() : ''),
    'title'       => wp_title(),
    'icon'        => true,
    'iconpath'    => '/assets/img/',
    'iconname'    => 'symbol-sprite.svg',
    'iconprefix'  => 'icon-',
    'viewbox'     => '0 0 20 20',
    'networks'    => [
      'facebook'  => true,
      'twitter'   => true,
      'googleplus'=> true,
      'pinterest' => true,
      'mail'      => true,
      'whatsapp'  => false
    ]
  ];

  // Merge Options Array
  $options = array_replace_recursive($opt, $options);

  // Build Share URLs
  $shareUrl = [
    'facebook'   => 'http://www.facebook.com/sharer.php?u='.$options['request'],
    'twitter'    => 'http://twitter.com/share?url='.$options['request'].'&amp;text='.$options['title'],
    'googleplus' => 'https://plus.google.com/share?url='.$options['request'],
    'pinterest'  => '//pinterest.com/pin/create/link/?url='.$options['request'].'&amp;media='.$options['image'].'&amp;description='.$options['title'],
    'mail'       => 'mailto:?Subject='.$options['title'].'&Body=%20'.$options['request'],
    'whatsapp'   => 'whatsapp://send?text='.$options['request'].' '.$options['title']
  ];

  // Building Block - Modify structure if needed
  echo '<nav role="navigation" class="'.$options['class'].'">';
  foreach ($options['networks'] as $key => $network) {
    echo ($options['icon'] == true ? '<div class="'.$options['class'].'__box">' : '');
    echo '<a href="'.$shareUrl[$key].'" target="_blank" class="'.$options['class'].'__link'.($options['icon'] == true ? '---solo' : '').'" title="Share with '.ucfirst($key).'">';
    if ($options['icon'] == true) {
      echo '<svg class="'.$options['class'].'__icon" viewBox="'.$options['viewbox'].'">';
      echo '<use xlink:href="'.$options['iconpath'].$options['iconname'].'#'.$options['iconprefix'].$key.'"></use>';
      echo '</svg>';
    } else {
      echo $key;
    }
    echo '</a>';
    echo ($options['icon'] == true ? '</div>' : '');
  }
}<commit_msg>Forgotten Closing Tag<commit_after><?php
/**
 *   Social Share Macro
 *   ==================
 *
 *   @param {object} options     = Config Options
 *   @param {string} options.class       = Classname
 *   @param {*}      options.request     = Request URL
 *   @param {*}      options.description = Seo Description
 *   @param {*}      options.image       = Seo Image URL
 *   @param {*}      options.title       = Seo Title
 *   @param {bool}   options.icon        = Option that activate SVG Share Icons
 *   @param {string} options.iconpath    = Path to icons
 *   @param {string} options.iconname    = Iconfile Name (Sprite)
 *   @param {string} options.iconprefix  = Prefix for icons
 *   @param {string} options.viewbox     = Viewbox Size
 *   @param {object} networks = Possible Social Networks
 *   @param {bool}   networks.networks.facebook
 *   @param {bool}   networks.networks.twitter
 *   @param {bool}   networks.networks.googleplus
 *   @param {bool}   networks.networks.pinterest
 *   @param {bool}   networks.networks.mail
 *   @param {bool}   networks.networks.whatsapp
 */
function macro_socialShare($options = []) {
  $opt = [
    'class'       => 'o-socialshare',
    'request'     => get_permalink(),
    'image'       => (has_post_thumbnail() ? the_post_thumbnail() : ''),
    'title'       => wp_title(),
    'icon'        => true,
    'iconpath'    => '/assets/img/',
    'iconname'    => 'symbol-sprite.svg',
    'iconprefix'  => 'icon-',
    'viewbox'     => '0 0 20 20',
    'networks'    => [
      'facebook'  => true,
      'twitter'   => true,
      'googleplus'=> true,
      'pinterest' => true,
      'mail'      => true,
      'whatsapp'  => false
    ]
  ];

  // Merge Options Array
  $options = array_replace_recursive($opt, $options);

  // Build Share URLs
  $shareUrl = [
    'facebook'   => 'http://www.facebook.com/sharer.php?u='.$options['request'],
    'twitter'    => 'http://twitter.com/share?url='.$options['request'].'&amp;text='.$options['title'],
    'googleplus' => 'https://plus.google.com/share?url='.$options['request'],
    'pinterest'  => '//pinterest.com/pin/create/link/?url='.$options['request'].'&amp;media='.$options['image'].'&amp;description='.$options['title'],
    'mail'       => 'mailto:?Subject='.$options['title'].'&Body=%20'.$options['request'],
    'whatsapp'   => 'whatsapp://send?text='.$options['request'].' '.$options['title']
  ];

  // Building Block - Modify structure if needed
  echo '<nav role="navigation" class="'.$options['class'].'">';
  foreach ($options['networks'] as $key => $network) {
    echo ($options['icon'] == true ? '<div class="'.$options['class'].'__box">' : '');
    echo '<a href="'.$shareUrl[$key].'" target="_blank" class="'.$options['class'].'__link'.($options['icon'] == true ? '---solo' : '').'" title="Share with '.ucfirst($key).'">';
    if ($options['icon'] == true) {
      echo '<svg class="'.$options['class'].'__icon" viewBox="'.$options['viewbox'].'">';
      echo '<use xlink:href="'.$options['iconpath'].$options['iconname'].'#'.$options['iconprefix'].$key.'"></use>';
      echo '</svg>';
    } else {
      echo $key;
    }
    echo '</a>';
    echo ($options['icon'] == true ? '</div>' : '');
  }
  echo '</nav>';
}
{'fraction_non_alphanumeric': 0.21891010712622264, 'fraction_numerical': 0.0024840863219996894, 'mean_word_length': 3.0464824120603016, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 68, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5568473', 'n_tokens_mistral': 2105, 'n_tokens_neox': 2095, 'n_words': 400}