private function get_all() { static $emoji; if (!isset($emoji)) { $emoji = (include twitter_api_basedir() . '/inc/return-emoji.php'); } return $emoji; }
/** * Enable localisation * @internal */ function twitter_api_load_textdomain($locale = null, $domain = 'twitter-api') { static $current_locale; if (is_null($locale)) { $locale = get_locale(); } if (!$locale || 0 === strpos($locale, 'en')) { $current_locale and unload_textdomain($domain); $locale = 'en_US'; } else { if ($current_locale !== $locale) { // purposefully not calling load_plugin_textdomain, due to symlinking // and not knowing what plugin this could be called from. $mofile = realpath(twitter_api_basedir() . '/lang/' . $domain . '-' . $locale . '.mo'); if (!load_textdomain($domain, $mofile)) { $mofile = WP_LANG_DIR . '/plugins/' . $domain . '-' . $locale . '.mo'; load_textdomain($domain, $mofile); } } } // detect changes in plugin locale, binding once only if (!isset($current_locale)) { add_filter('plugin_locale', '_twitter_api_filter_plugin_locale', 10, 2); } $current_locale = $locale; }
/** * Get a hex name for a single emoji symbol * @param string raw bytes, e.g. "\xF0\x9F\x98\x81" * @return string hex name suitable for creating a class or ID e.g. "1f601" or "1f1ec-1f1e7" for compound symbols */ function twitter_api_emoji_ref($raw) { static $emoji; if (!isset($emoji)) { $emoji = (include twitter_api_basedir() . '/inc/return-emoji.php'); } if (isset($emoji[$raw])) { return $emoji[$raw]; } }