Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions build/build_map.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@

$maps["unified_to_html"] = make_html_map($catalog);

$maps["prefixes"] = fetch_prefixes($maps['names']);

$maps["prefixes_unified"] = fetch_prefixes($maps['names']);
$maps["prefixes_not_unified"] = fetch_prefixes(array_merge(
$maps["docomo_to_unified"],
$maps["kddi_to_unified"],
$maps["softbank_to_unified"],
$maps["google_to_unified"]
));

#
# output
Expand Down
2 changes: 1 addition & 1 deletion build/emoji-data
Submodule emoji-data updated 4939 files
10 changes: 8 additions & 2 deletions build/inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ function emoji_get_name($unified_cp){
return $GLOBALS['emoji_maps']['names'][$unified_cp] ? $GLOBALS['emoji_maps']['names'][$unified_cp] : '?';
}

function emoji_contains_emoji($text){
function emoji_contains_emoji($text, $search_for_unified = true){

if ($search_for_unified) {
$path = 'prefixes_unified';
} else {
$path = 'prefixes_not_unified';
}

$count = 0;
str_replace($GLOBALS['emoji_maps']['prefixes'], '00', $text, $count);
str_replace($GLOBALS['emoji_maps'][$path], '00', $text, $count);
return $count > 0;
}
9 changes: 9 additions & 0 deletions demo/table.htm
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ <h1>PHP Emoji Catalog</h1>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="emoji-outer emoji-sizer"><span class="emoji-inner emoji23cf"></span></span></td>
<td>eject symbol</td>
<td>\xE2\x8F\x8F</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><span class="emoji-outer emoji-sizer"><span class="emoji-inner emoji23e9"></span></span></td>
<td>black right-pointing double triangle</td>
Expand Down
Loading