/** * Default Emoji replacement callback * @internal */ function twitter_api_replace_emoji_callback(array $match) { try { if (empty($match[0])) { return ''; } $ref = twitter_api_emoji_ref($match[0]); if (!$ref) { return $match[0]; } $html = '<img src="https://abs.twimg.com/emoji/v1/72x72/' . $ref . '.png" style="width:1em;" class="emoji emoji-' . $ref . '" />'; return $html; } catch (Exception $e) { WP_DEBUG and trigger_error($e->getMessage(), E_USER_WARNING); return ''; } }
public function _replace_hexref(array $match) { return $ref = twitter_api_emoji_ref($match[0]); }