<commit_before><?php
/**
 * Class WPML_TemplateTag_Mailto
 *
 * @package  WPML
 * @category WordPress Plugins
 * @version  2.1.0
 * @author   <NAME>
 * @link     http://www.freelancephp.net/
 * @link     https://github.com/freelancephp/WP-Mailto-Links
 * @link     https://wordpress.org/plugins/wp-mailto-links/
 * @license  GPLv2+ license
 */
final class WPML_TemplateTag_Mailto extends WPRun_BaseAbstract_0x5x0
{

    /**
     * Create template tag "wpml_mailto()"
     */
    protected function init()
    {
        $this->createTemplateTag('wpml_mailto', $this->getCallback('mailto'));
    }

    /**
     * Handle template tag
     * @param string $email
     * @param string $display
     * @param array  $atts
     * @return string
     */
    protected function mailto($email, $display = null, $atts = array())
    {
        $email = $this->getArgument(0);

        if (is_array($display)) {
            // backwards compatibility (old params: $display, $attrs = array())
            $atts   = $display;
            $display = $email;
        } else {
            $atts['href'] = 'mailto:'.$email;
        }

        return $email->protectedMailto($display, $atts);
    }

}

/*?>*/<commit_msg>fixed bug wpml_mailto()<commit_after><?php
/**
 * Class WPML_TemplateTag_Mailto
 *
 * @package  WPML
 * @category WordPress Plugins
 * @version  2.1.1
 * @author   <NAME>
 * @link     http://www.freelancephp.net/
 * @link     https://github.com/freelancephp/WP-Mailto-Links
 * @link     https://wordpress.org/plugins/wp-mailto-links/
 * @license  GPLv2+ license
 */
final class WPML_TemplateTag_Mailto extends WPRun_BaseAbstract_0x5x0
{

    /**
     * Create template tag "wpml_mailto()"
     */
    protected function init()
    {
        $this->createTemplateTag('wpml_mailto', $this->getCallback('mailto'));
    }

    /**
     * Handle template tag
     * @param string $email
     * @param string $display
     * @param array  $atts
     * @return string
     */
    protected function mailto($email, $display = null, $atts = array())
    {
        $emailEncoder = $this->getArgument(0);

        if (is_array($display)) {
            // backwards compatibility (old params: $display, $attrs = array())
            $atts   = $display;
            $display = $email;
        } else {
            $atts['href'] = 'mailto:'.$email;
        }

        return $emailEncoder->protectedMailto($display, $atts);
    }

}

/*?>*/
{'fraction_non_alphanumeric': 0.14991762767710048, 'fraction_numerical': 0.006589785831960461, 'mean_word_length': 2.3689320388349513, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 4, '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': '3733905', 'n_tokens_mistral': 780, 'n_tokens_neox': 771, 'n_words': 156}