roundcubemail/plugins/emoticons/emoticons.php
function html2text($args)
    {
        $rcube = rcube::get_instance();

        if ($rcube->action == 'html2text' || $rcube->action == 'send') {
            $this->load_config();

            if (!$rcube->config->get('emoticons_compose', true)) {
                return $args;
            }

            require_once __DIR__ . '/emoticons_engine.php';

            $args['body'] = emoticons_engine::icons2text($args['body']);
        }

        return $args;
    }
function html2text($args)
    {
        $rcube = rcube::get_instance();

        if ($rcube->action == 'html2text' || $rcube->action == 'send') {
            $this->load_config();

            if (!$rcube->config->get('emoticons_compose', true)) {
                return $args;
            }

            require_once __DIR__ . '/emoticons_engine.php';

            $args['body'] = emoticons_engine::icons2text($args['body']);
        }

        return $args;
    }
function html2text ( $ args ) { $ rcube = rcube :: get_instance ( ) ; if ( $ rcube -> action == 'html2text' || $ rcube -> action == 'send' ) { $ this -> load_config ( ) ; if ( ! $ rcube -> config -> get ( 'emoticons_compose' , true ) ) { return $ args ; } require_once __DIR__ . '/emoticons_engine.php' ; $ args [ 'body' ] = emoticons_engine :: icons2text ( $ args [ 'body' ] ) ; } return $ args ; }
'html2text' hook handler to replace image emoticons from TinyMCE
editor with plain text emoticons.

This is executed on html2text action, i.e. when switching from HTML to text
in compose window (or similar place). Also when generating alternative
text/plain part.
html2text hook handler to replace image emoticons from TinyMCE editor with plain text emoticons .